Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

display the total weight on the view cart page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 04-02-2013, 07:48 AM
 
dmpinder dmpinder is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 86
 

Default Re: display the total weight on the view cart page

Thanks for the advice drheath, however we want a visual display on the cart which tells them they need to have over 12 in weight in order to continue.

Anyone know how to achieve this mod in 4.5.1?
__________________
Darren

X-Cart Gold 4.3.1
Reply With Quote
  #22  
Old 04-02-2013, 08:09 AM
 
dmpinder dmpinder is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 86
 

Default Re: display the total weight on the view cart page

Well after about an hour of butting my head against my desk, I've realised why it wasn't working: because I wasn't logged in as a customer. The smarty variable gets assigned once the address is known.

Obviously not all customers will be logged in, so you need to select the "Presume that a not logged in customer is from the default country" checkbox in the general settings in order for this to work.
__________________
Darren

X-Cart Gold 4.3.1
Reply With Quote
  #23  
Old 04-02-2013, 08:31 AM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: display the total weight on the view cart page

Nice, sometimes the simplest solutions are the best ones. Did you end up having to make any additional changes to the code other than the 2 you mentioned?
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #24  
Old 11-23-2014, 05:36 AM
 
Lloyd Hosting Lloyd Hosting is offline
 

Member
  
Join Date: Aug 2013
Posts: 16
 

Default Re: display the total weight on the view cart page

Trying to figure out how to do this on 4.6.5 but QT decided to move shipping.php from /shipping... trying to find where they've moved it to.

Found it - include/func/func.shipping.php

Interesting, QT have already included this bit for us:
Code:
$smarty->assign("total_weight_shipping_valid", $total_weight_shipping_valid);
So I added this to /skin/common_files/modules/One_Page_Checkout/Summary/cart_totals.tpl
Code:
<tr> <td class="total-name">Total Weight:</td> <td class="total-value">{$total_weight_shipping_valid}g</td> </tr>

after
Code:
{if $cart.display_discounted_subtotal ne $cart.display_subtotal} <tr> <td class="total-name">{$lng.lbl_discounted_subtotal}:</td> <td class="total-value">{currency value=$cart.display_discounted_subtotal}</td> </tr> {/if}
__________________
Lloyd Hosting
www.lloydhosting.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:14 AM.

   

 
X-Cart forums © 2001-2020