Author Topic: Order Total in shopping cart  (Read 1261 times)

admiss

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.0.26 d
Order Total in shopping cart
« on: April 15, 2014, 13:36:39 pm »
Hi,

I use VM 2.0.26d width Joomla 2.5.17
Is there any option to show order total amount in shopping cart? I mean it would be more useful, if it could be visible in shopping cart instead of "items total (x products)"
Thank you.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28307
  • Always on vacation
    • Jenkin Hill Internet
Re: Order Total in shopping cart
« Reply #1 on: April 15, 2014, 13:43:33 pm »
The default VM Shopping cart module does display the total. I guess you are using a third party module or module template overrides.


[attachment cleanup by admin]
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

admiss

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.0.26 d
Re: Order Total in shopping cart
« Reply #2 on: April 15, 2014, 13:53:40 pm »
I use VM-cart
Could you tell  me please, where to configure this setting?
Thank you

[attachment cleanup by admin]

JoomTut

  • Jr. Member
  • **
  • Posts: 64
    • How to Joomla!
Re: Order Total in shopping cart
« Reply #3 on: April 15, 2014, 14:34:45 pm »
There are no configuration for this option. Just go to your template/html then check the file in folder named "mod_virtuemart_cart"
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

admiss

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.0.26 d
Re: Order Total in shopping cart
« Reply #4 on: April 15, 2014, 15:20:53 pm »
Yes, I found it, and searched for "total".
Line 47
<div class="total" style="float: right;">
      <?php if ($data->totalProduct and $show_price) echo  $data->billTotal; ?>
   </div>
   <div class="total_products"><?php echo  $data->totalProductTxt ?></div>
   <div class="show_cart">
      <?php if ($data->totalProduct and $show_price) echo  $data->cart_show; ?>
   </div>
   <div style="clear:both;"></div>
   
   <noscript>
   <?php echo JText::_('MOD_VIRTUEMART_CART_AJAX_CART_PLZ_JAVASCRIPT') ?>
   </noscript>
   </div>
<?php }else{ ?>
   <!-- Default of smart -->
   <div class="vmCartModule <?php echo $params->get('moduleclass_sfx'); ?>" id="vmCartModule">
      <h3 class="title"><a href="index.php?option=com_virtuemart&view=cart">
      <?php echo JText::_('MOD_VIRTUEMART_CART_YOUR_CART_MESSAGE') ?>
      </a></h3>
   <?php
      if ($show_product_list) {
         ?>
         <div id="hiddencontainer" style=" display: none; ">
            <div class="container">
               <?php if ($show_price) { ?>
                 <div class="prices" style="float: right;"></div>
               <?php } ?>
               <div class="product_row">
                  <span class="quantity"></span>&nbsp;x&nbsp;<span class="product_name"></span>
               </div>
      
               <div class="product_attributes"></div>
            </div>
         </div>
         <div class="vm_cart_products">
            <div class="container">
      
            <?php
               foreach ($data->products as $product)
            {
               if ($show_price) { ?>
                    <div class="prices" style="float: right;"><?php echo  $product['prices'] ?></div>
                  <?php } ?>
               <div class="product_row">
                  <span class="quantity"><?php echo  $product['quantity'] ?></span>&nbsp;x&nbsp;<span class="product_name"><?php echo  $product['product_name'] ?></span>
               </div>
               <?php if ( !empty($product['product_attributes']) ) { ?>
                  <div class="product_attributes"><?php echo $product['product_attributes'] ?></div>
      
               <?php }
            }
            ?>
            </div>
         </div>
      <?php } ?>
   
   
      <div class="total_products">(<?php echo  $data->totalProductTxt ?>)</div>
   

From this, I still don't see the solution. Is there missing something?
You can find an attachment about current cart-view.

And I have another peoblem. When I add a product to the cart, I have to click on Continue shopping or Show cart. The product doesn't occur in the cart until page does not reload/refresh.
I'm planning to make a setTimeout, to avoid unnecessary clicks. However I don't know, if it will have some influence on showing added products in cart.


[attachment cleanup by admin]