WoodsWalker 0 Posted November 7, 2008 (edited) Hi Folks! I've been running my store for some time using a table rate contribution that allows me to add multiple zones, and to use the modes "Weight", "Price", "Percentage", "Item-count", or "Per_Item". I've been using the "Percentage" mode, calculating by a percentage of the order price, and that's been fine. However, sometimes this leads to unrealistically high shipping quotes, because some of my products are light, and others heavy. In order not to upset my set-up, which works well otherwise, I thought I might be able to calculate the shipping based on a percentage of a custom value that I would place in the "weight" column (instead of using the value in the "price" column). Just a simple change, but I'm not sure how to go about it. I've only recently begun to delve into PHP and the database itself, but will go there willingly with some help. I would be most grateful for some direction. Thanks in advance! ~Wendy Edited November 7, 2008 by WoodsWalker Share this post Link to post Share on other sites
WoodsWalker 0 Posted November 12, 2008 Well, necessity being the mother of invention, I eventually answered it myself! B) The key was to look in the shipping modules I was using (the file in the table rate contribtion I am using is called "regionsclass.php", but this procedure can be adapted to most shipping modules) for: $shipping = In my case, this appeared in this context: $shipping = ($regionsclass_table[$i+1] / 100) * $order_total_price; I looked around in the code for likely possibilities, and tried replacing "$total_order_price" with a string I saw in the "weight" option part of the file, "$shipping_weight", like so: $shipping = ($regionsclass_table[$i+1] / 100) * $shipping_weight; ...and it did exactly what I wanted. Shazam! ~Wendy Share this post Link to post Share on other sites
WoodsWalker 0 Posted November 15, 2008 In case anyone wonders what shipping module I am using, you can find the newest version of it here: State Based Rates Share this post Link to post Share on other sites