Product bundle woocommerce- minicart widget not show the correct count
-
Hi, im using product bundle plugin, but my mini-cart widget does not show the correct count of cart items. Bundle contents are not counted. A Bundle is counted as one item, no matter how many products it contains, the plugin support says that is because my theme.
They say this:
If your theme is counting cart items in a different way, ensure that it uses the WC()->cart->get_cart_contents_count() method to count cart items. If unsure how to verify this, share this information with your theme author(s).
Hello,
Thank you for contacting us. Currently, we are using this code WC()->cart->get_cart_contents_count
instead of this WC()->cart->get_cart_contents_count()
. To change it, try to add the following code snippet to the functions.php file in the child theme
function woodmart_cart_count() {
$count = WC()->cart->get_cart_contents_count();
?>
<span class="woodmart-cart-number"><?php echo esc_html($count); ?> <span><?php echo esc_html( _n( 'item', 'items', $count, 'woodmart' ) ); ?></span></span>
<?php
}
We will fix this in our next theme update as well.
Regards
Hi, i put the code but doesnt work, my button cart of my menu still register only one product, and not bundle items, and the widget cart doesn’t either
Hi,
Then you need to contact plugins developers for help since we added the code they asked about.
Ok, thanks i will talk to them, other questions i have problem with the translate, im using loco translate and i have the archive in wpcontent/language/…but doesnt change, can you help me with that please?
Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=tAFq1yTfWfU
Hi, yes i had already see the tutorial, but doesnt work either
Hi let me explain better, some words works but with others not, like the placeholder for the search
If you just update the theme, you need to go to Loco Translate, edit your current theme translation and click on “Sync” button to actualize the translation file.
Regards