Re: Adding $1.00 for each aditional item?
No, you have a full IF setup in your perweightunit.php module so you are replacing it ...
I am pretty sure the changes that should stand out are:
Code:
// if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
if ( $chk_gowns == 0 && (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => (15.00)
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => $chk_gowns_shipping + (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units < 15 ? 15.00 : $total_weight_units))
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
}
Re: Adding $1.00 for each aditional item?
ok so I copied that but its still miscalculating. If you can put a gown in the cart, then say two other gowns in the cart and then the cowboy hat on this page. Hat
For some reason the shipping is not right, and then if you remove the gowns the shipping is right for the hat. But if you add 3 other different gowns with the same hat the shipping amount is different than the first time... geez, I hope this isn't another case of weird. Remember when I had files crossing over to each other? But since we fixed that mix up I haven't changed anything, it was just by accident that I realized the shipping wasn't right.
I have to run out for an hour but I will come back...
Lisa :smile:
Re: Adding $1.00 for each aditional item?
I am having a great coding day ... :blink:
Give me a few to work with this one ...
What is your Shipping Cost per Unit set to? 1 or 5?
Re: Adding $1.00 for each aditional item?
I reverted the file back to the way it was this morning just incase I have traffic. I have the Shipping Cost per Unit set at 5.
No such thing as a bad coding day in my books, I haven't a clue how you do all of this! :blink:
Lisa:smile:
Re: Adding $1.00 for each aditional item?
So you take the Product Weight * 5 for all of the products that are not gowns ... and if the amount of the calculation of the:
Product Weight * 5 < 15
You want to charge $15.00 ...
Then if there are gowns you want the gown rates plus either the:
Product Weight * 5
Or plus $15.00, which ever is greater ... correct?
Re: Adding $1.00 for each aditional item?