VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: admiss on April 15, 2014, 13:36:39 PM

Title: Order Total in shopping cart
Post by: admiss 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.
Title: Re: Order Total in shopping cart
Post by: jenkinhill 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]
Title: Re: Order Total in shopping cart
Post by: admiss 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]
Title: Re: Order Total in shopping cart
Post by: JoomTut 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"
Title: Re: Order Total in shopping cart
Post by: admiss 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]