Home Forums WoodMart support forum Quantity button in loop/shop pages Reply To: Quantity button in loop/shop pages

#217802

abbyrockas
Participant

Ok the guys were super quick. They give this answer:

Why does the cart widget in the menu not showing the right amount items, when using decimal quantity?

Some themes are converting the decimal quantity to an integer: Example: The cart will write “0 Items”, even though it has 0.75 items in it.

To solve this, you have to change it in the theme:

Example from storefront:

In the file \inc\woocommerce\template-tags.php line 19.

Find: _n( ‘%d item’, ‘%d items’, WC()->cart->get_cart_contents_count(), ‘storefront’ )

Change to: _n( ‘%s item’, ‘%s items’, WC()->cart->get_cart_contents_count(), ‘storefront’ )

Do you think this is the problem?