pafranklin Posted February 12, 2009 Share Posted February 12, 2009 Hi, Having just moved to a weight based shipping module, we are still learning and updating product weights etc. However, it would be really useful to show the total weight of the order if possible on the orders.php page as this would help us to make sure that we have charged enough, got the weight right and importantly not over-charged the customer. I am really struggling with this and so far have tried the following and none have worked. Please would someone assist in what the correct code should be? $order->info ['show_weight']; $cart->show_weight() $cart->show_weight()+SHIPPING_BOX_WEIGHT; $total_weight = $cart->show_weight(); None of these seem to work so I am hoping fthat someone could help me identify the code needed to add the total weight of the total order into the orders.php page. Many thanks. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
pafranklin Posted February 12, 2009 Author Share Posted February 12, 2009 Hi, Having just moved to a weight based shipping module, we are still learning and updating product weights etc. However, it would be really useful to show the total weight of the order if possible on the orders.php page as this would help us to make sure that we have charged enough, got the weight right and importantly not over-charged the customer. I am really struggling with this and so far have tried the following and none have worked. Please would someone assist in what the correct code should be? $order->info ['show_weight']; $cart->show_weight() $cart->show_weight()+SHIPPING_BOX_WEIGHT; $total_weight = $cart->show_weight(); None of these seem to work so I am hoping fthat someone could help me identify the code needed to add the total weight of the total order into the orders.php page. Many thanks. Paul Can anyone help please?? You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
pafranklin Posted February 13, 2009 Author Share Posted February 13, 2009 Can anyone help please?? Anyone please with a suggestion or two? You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
burt Posted February 13, 2009 Share Posted February 13, 2009 Whereabouts in Gloucestershire are you? You would need to make sure that the weight value (of the order) is called by the order class file. I can't remember if it is or not off the top of my head. Link to comment Share on other sites More sharing options...
pafranklin Posted February 13, 2009 Author Share Posted February 13, 2009 Whereabouts in Gloucestershire are you? You would need to make sure that the weight value (of the order) is called by the order class file. I can't remember if it is or not off the top of my head. Hi there and thanks for the response. I am actually in Gloucester. Are you in the same area? I have sort of worked out that I may need to reference a class but to be honest am not sure where to look / move to next? I don't think that there is a reference to this class so what would I need to do if it isn't? Many thanks again. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
burt Posted February 13, 2009 Share Posted February 13, 2009 I am in the City Centre. You would need to amend the file called /admin/includes/classes/order.php Grab the weight value of the total order in that file. Output the value in the orders.php file. Link to comment Share on other sites More sharing options...
burt Posted February 13, 2009 Share Posted February 13, 2009 Won't be as easy as I first thought as I think the order weight value is not stored anywhere in the DB. You'd need to store this data first (as part of the checkout process), before doing the above. Link to comment Share on other sites More sharing options...
pafranklin Posted February 13, 2009 Author Share Posted February 13, 2009 Won't be as easy as I first thought as I think the order weight value is not stored anywhere in the DB. You'd need to store this data first (as part of the checkout process), before doing the above. Wow, very small world! Thanks again for the comments. I am a relative newbie with PHP and MySQL so still not sure how to amend the /admin/includes/classes/order.php file and then how to grab the weight. Also not sure how to store the weight in the dBase. All of a sudden this is looking like a bigger piece of work just to display the weight in the admin side Feel free to let me have any other thoughts and thanks again.!! :rolleyes: I have just had a look at your Club OSC Site. A nice Wordpress site and see that you also do custom coding work! Cheers. Paul You will never learn if you don't try. And boy am I trying....! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.