| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Total weight of all products on the Invoice | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() How do you display the total weight of all products ordered on the Invoice?
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#2
|
|||||||
|
|||||||
![]() I tried using the mod here: http://forum.x-cart.com/showthread.php?t=5315 but using the skin1/customer/main/cart_totals.tpl file
didn't work...
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#3
|
|||||||
|
|||||||
![]() I'm surprised no one knows how to do this... not even a idea?
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#4
|
|||||||
|
|||||||
![]() Ok so how about having the total weight appear somewhere else I can reference for any given order?
__________________
Dawn ![]() X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#5
|
|||||||
|
|||||||
![]() Please don't double post, I have removed your second post on this topic. If you aren't getting an answer from the forums, post a ticket with X-Cart via your help desk. Thanks
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
![]() *bump*
Anyone found a way of how to do this yet?
__________________
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 |
|||||||
#7
|
|||||||
|
|||||||
![]() Basically you need to add the following function to func.php
function func_my_total_weight ($products) { $myweight = 0; foreach ($products as $key => $value) { if (isset($products[$key]['weight'])) { $mytempweight = $products[$key]['weight'] * $products[$key]['amount']; $myweight = $myweight + $mytempweight; } } return $myweight; } I created my own because the xcart function (func_weight_shipping_products) doesn't count the weight of free shipping products and I wanted the actual weight. Then add the following line in the func_place_order function right before the order insert statement. $my_order_weight = func_my_total_weight($products); Then add a field in the xcart_orders table called my_order_weight and modify the insert statement to insert $my_order_weight in into the my_order_weight field in the xcart_orders table. Then you should be able to output that field in the invoice template i.e. $order.my_order_weight I did the first part but am using the weight for other things...it only took 15 minutes to make the necessary changes. My funky naming convention is so I can tell the difference between xcart coding and mine and my variables won't conflict with xcarts. I just slapped this post together so not everything above may be perfect but you get the idea. I hope that helps. Keep in mind that mods like this make it impossible to upgrade your cart later. I just used xcart as a starting point and have been making it my own from that point on. G
__________________
Greylar X-cart Gold 4.0.12 [linux] |
|||||||
|
|||
X-Cart forums © 2001-2020
|