| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
display the total weight on the view cart page | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
display the total weight on the view cart page
How do you display the total weight of all products on the "view cart" page?
|
|||||||
#3
|
|||||||
|
|||||||
I am referring to the cart.php - I need to display the total weight of all products in the shopping cart. This needs to be displayed on the shopping cart page - cart.php
Quote:
|
|||||||
#4
|
|||||||
|
|||||||
display the total weight on the view cart page
Hi,
I have the same problem with kumar, any one has idea to show the total weight in view cart page? Thanks a lot. Regards, Andy X-cart 4.0.13 |
|||||||
#5
|
|||||||
|
|||||||
----------------------------------------------------------------------------------
In /shipping/shipping.php, add: Code:
Code:
Then, to call this simply edit /skin1/customer/main/cart_totals.tpl and place this wherever you want to show it: Code:
__________________
X-Cart version 3.5.4 Gold, PHP 4.3.6, Web server Apache/1.3.29 (Unix), Operation system Linux, Perl 5.006001, XML parser (expat) 1.95.6, Net::SSLeay 1.08, libCURL, CURL executable curl 7.9.5, OpenSSL executable OpenSSL 0.9.6c 21 dec 2001 |
|||||||
#6
|
|||||||
|
|||||||
display the total weight on the view cart page
Hi lookformeb,
It is great and it is working for me and that's what I want. Thanks a lot for your help. Regards, Andy X-cart 4.0.13 |
|||||||
#7
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Nice one lookformeb, that worked a treat.
I made it appear in the middle of 'Subtotal' & 'Shipping Cost' like so: http://www.arcadiaconsoles.co.uk/images/total_weight.jpg Now I need to figure out how to make it appear in the Invoice...
__________________
Location: UK X-Cart: Gold 4.4.2, Status: Finalizing Template: Colors Free Mods: Colour Coded Orders, FAQ Manager Paid Mods: None... yet. Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13 |
|||||||
#8
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Moving to Custom Mods
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#9
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
I also used this mod. Thank you, lookformeb.
I use grams for shipping, and the problem I have is that there is several decimal places. This is a little bit of overkill. Is there a way to round to a whole number? I modified my shipping.php file slightly to add 15% to the weight total, to allow for packing materials. Here is what it looks like, in case this is where I have to modify for rounding: $total_weight = 0; foreach ($products as $product) { if (@$product["deleted"]) continue; # for Advanced_Order_Management module if ( ($product["free_shipping"] == "Y" && ($config['Shipping']['free_shipping_weight_select'] != 'Y' || ($config['Shipping']['free_shipping_weight_select'] == 'Y' && !$ignore_freight))) || ($active_modules["Egoods"] && $product["distribution"] != "") || (!$ignore_freight && $config["Shipping"]["replace_shipping_with_freight"] == "Y" && $product["shipping_freight"] > 0) ) { continue; } $total_weight += $product["weight"] * $product["amount"]; } $total_weight *= 1.15; return $total_weight;
__________________
4.1.11 Rob Dolliver www.jessicasonline.com Xcart Skin - Fashion Mosaic X-Cart 4 Level Horizonal Flyout Menus alteredCart One Page Checkout alteredCart Buy Together CDSEO |
|||||||
#10
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
I also applied this to my cart and it works great!
Thanks!
__________________
X-Cart 4.4.5 PHP 5.3.14-1 MySQL 5.0.51 Linux + Apache Mods: AlteredCart SmartSearch w/ AJAX Predictive Search w/ Extras Add-On v2, BuyTogether, Checkout One, OnSale ********* PowerFilter WebsiteCM CDSEOPro Phpmagicscripts Reviews-Controller CFL Systems Products Page Layout, System Messages mod Custom work by CFLSystems Custom work by us |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|