How to change the mod_virtuemart_cart display from total value to total quantity

4 years 2 weeks ago
Posts: 67
More
Topic Author
How to change the mod_virtuemart_cart display from total value to total quantity #2515
Dear Sirs

I am trying to modify / override the Virtuemart ajax dropdown cart module.
I am working on the file 'default.php' located in /templates/yoo_xxx/html/mod_virtuemart_cart/
I am trying to change the display of the left part of the cart button group from 'billTotal' to 'totalProducts'

e.g I changed lines 68 to 77 of default.php

from

<a class="uk-button <?php echo $primaryClass;?>" href="<?php echo $carturl; ?>">
<i class="uk-icon-shopping-cart"></i>
<?php echo JText::_('COM_VIRTUEMART_CART_TITLE');?></span>
<?php if ($show_price and $currencyDisplay->_priceConfig[0]) { ?>
-
<span class="total" >
<?php echo str_replace('Total :','',$data->billTotal); ?>
</span>
<?php } ?>
</a>

to

<a class="uk-button <?php echo $primaryClass;?>" href="<?php echo $carturl; ?>">
<i class="uk-icon-shopping-cart"></i>
<?php echo JText::_('COM_VIRTUEMART_CART_TITLE');?></span>
<?php if ($show_price and $currencyDisplay->_priceConfig[0]) { ?>
-
<span class="total" >
<?php echo str_replace('Total :','',$data->totalProduct); ?>
</span>
<?php } ?>
</a>

the issue we encounter is that when adding a product to cart, the total value of the cart is displayed again (not the total number of items in the cart as we'd wish). Once we refresh the page, the Total number of products is displayed.

could you please point me towards the file I have to modify to ensure that pressing "Add To Cart" results in the total number of products being written to the module's display?

Thank you in advance

Giacomo Bruzzo

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum

Latest News from JoomlaPro.com

VMuikit 5 is finally out!

Our next version of our popular VMuikit package is out. This time we have some quite nice new features.

Electroneum Joomla/VirtueMart plugins

JoomlaPro.com are not only web & Joomla enthusiast, we cannot stay away from checking other tech trends as well. The last few years its been hard to miss the crypto/blockchain ...

New plugin: Secure Joomla Login

We have released a new plugin that adds a extra PIN code and a reCaptcha v2 check on Joomlas login. Security is very important on all fronts of a website. One often missed one is ...

We accept PayPal, 2Checkout & Electroneum payments:

We accept PayPal payments    We accept 2checkout payments  electroneum payment


For news and updates please like :