price

Screen reader is not reading the price (“$47.49”) properly

China☆狼群 提交于 2019-12-11 02:37:41
问题 I am trying to make the screen reader (NVDA) to read my currency value (US dollar) $47.49 as "47 Dollars 49 Cents", but the screen reader is reading my currency value as "Dollar 4749". <div class="perVendorCarDetails"> <span class="carCurrencySymbol">$</span> <span class="carPriceDollar">38</span> <span class="carPriceDot">.</span> <span class="carPriceCents">57</span> </div> 回答1: Your example is spoken by NVDA/Firefox as "dollar thirty-eight dot fifty seven." This is not good. If you just

Custom decimals in WooCommerce product prices for a product category

雨燕双飞 提交于 2019-12-11 00:36:24
问题 Currently we have set up two decimal places for pricing as a default. The problem: we have a product category which needs to show three decimal points for prices. All other shop products/categories should remain 2 decimal places. Does anyone have a handy snippet or suggestion how to achieve this? 回答1: Bellow you will ind a custom function hooked in wc_get_price_decimals filter hook, that will set 3 decimals product prices for a defined product category in product pages, shop page, category

Overriding properly WooCommerce function WC_Price() in a clean way

醉酒当歌 提交于 2019-12-10 17:05:04
问题 What is the best way to properly override a pre-existing WooCommerce function? In this case I want to modify the wc_price() function. I don't need to do anything crazy with it, I literally just need to add an HTML <span> attribute around the price. I know the code is as follows: function wc_price( $price, $args = array() ) { extract( apply_filters( 'wc_price_args', wp_parse_args( $args, array( 'ex_tax_label' => false, 'currency' => '', 'decimal_separator' => wc_get_price_decimal_separator(),

Display the default variation price and savings amount on Woocommerce 3

五迷三道 提交于 2019-12-10 11:25:12
问题 I need to display default variation price & with regular price & savings amount on my Woocommerce Homepage & Category Page I found following code on this links answer Display lowest variation price and discounted percentage in WooCommerce add_filter( 'woocommerce_get_price_html', 'custom_price_format', 10, 2 ); add_filter( 'woocommerce_variable_price_html', 'custom_price_format', 10, 2 ); function custom_price_format( $price, $product ) { // Main Price $regular_price = $product->is_type(

What is the meaning of the priceRange property in Schema.org?

☆樱花仙子☆ 提交于 2019-12-08 19:28:57
问题 What does the property priceRange mean in Schema.org? https://schema.org/priceRange I don't understand what is mean that, I live in Kazakhstan, maybe my culture or language does not give clear. Can you give me example for Kazakhstan country, where we use tenge currency. 回答1: The Schema.org property priceRange gives the range of approximate prices of the products/services typically offered by that LocalBusiness . There seem to be two formats used in examples: Specify as many currency symbols

When price is 0 change add to cart button to “request quote” [duplicate]

大兔子大兔子 提交于 2019-12-08 11:44:45
问题 This question already has answers here : Replace product zero displayed price with a custom text in Woocommerce 3 (1 answer) Customize “Add to cart” button for a specific product category in WooCommerce (2 answers) Closed last year . I have a product X in several sizes (added as variation products of the main product X). For small sizes the price is available and customers can shop it online. However, for large sizes of this product X, it is not shopable online. Therefore for some variations

Display lowest variation price and discounted percentage in WooCommerce

人盡茶涼 提交于 2019-12-08 06:53:00
问题 Based on this post : Displaying the lowest variation price of variable products And this topic : Display the discounted percentage near sale price in Single product pages for WC 3.0+ I've been trying to show everywhere on my website the lowest variation price with the associated discount %, for variable and non variable products. Here is the current code that I am using: add_filter( 'woocommerce_variable_price_html', 'bbloomer_variation_price_format', 10, 2 ); function bbloomer_variation

Set cart item price from a hidden input field custom price in Woocommerce 3

浪尽此生 提交于 2019-12-08 06:46:03
问题 In Woocommerce, I used jQuery to calculate a custom price on a single product pages, and now need to pass this value to the cart. The desired behavior is to pass the new price retrieved from the hidden field to the cart item price. Here is my actual code: // Hidden input field in single product page add_action( 'woocommerce_before_add_to_cart_button', 'custom_hidden_product_field', 11, 0 ); function custom_hidden_product_field() { echo '<input type="hidden" id="hidden_field" name="custom

Displaying price only when the variation is selected and discount in percentage relatively to the regular price

一个人想着一个人 提交于 2019-12-08 04:52:36
问题 I've this problem. Let me show pictures so I can explain better. Variation product selected but because all the variations have the same price the price do not show in the bottom: Variation product selected, because they have different PROMO prices they show on top and the regular-promo price after selection: What I need is that only after selected the variations the price is show in the bottom like the second image and calculation the discount between the promo variation price and the

Display price on add to cart button from the functions.php file in Woocommerce

落花浮王杯 提交于 2019-12-08 02:02:01
问题 Been trying to find something about this, but the solutions I found so far here do not work. I need, in the single product page, to display the add to cart button like this: ADD TO CART - JUST $PRICE It needs to be done from the functions.php file in the child theme. Thanks a lot! 回答1: To handle the display of the product price in add-to-cart button for all product prices on shop, other archives pages and single product pages, without any need of overriding templates , using dedicated