I enabled the perweightunit shipping and I changed the code and got a shipping cost of $12. My units are all set to 1, shipping cost per unit set to 4.
My shipping cost per item needs to be $4, but min shipping charge is $20.
Printable View
I enabled the perweightunit shipping and I changed the code and got a shipping cost of $12. My units are all set to 1, shipping cost per unit set to 4.
My shipping cost per item needs to be $4, but min shipping charge is $20.
Sorry I boo booed ... :blink:
Try this code:
Code:$total_weight_units = $shipping_weight;
// bof: minimum 20.00
if ($total_weight_units < 20) {
$total_weight_units = 20;
}
// eof: minimum 20.00
Still isn't working right, now shipping is $20 regardless how many items are in the cart.
Is there a way to make this work using the item module rather than perweightunit module since I don't ship by weight?
See if this works on the Item Rate item shipping module:
Code:$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
'cost' => ((MODULE_SHIPPING_ITEM_COST * $item_total_count) < 20.00 ? 20.00 : (MODULE_SHIPPING_ITEM_COST * $item_total_count)) + MODULE_SHIPPING_ITEM_HANDLING)));
That's what I was looking for! :clap: Thanks!
Linda:
Did you already post the mod for 139h?
I had it working for 138 and ow need to do the same for 139. Thanks!
You lost me ...
This is a customization to the shipping ...
Customization of v1.3.8 vs v1.3.9 would be similar ...
What is it you are asking? :unsure:
I was under the impression from some of the 139 mods that not all the duplicate files of 138 need to be messed with in 139.
So It is still just the same usps.php that is tweaked?
Found it and fixed it. Thanks for brightening the light bulb, Linda.
includes/modules/shipping/usps.php
/*
$methods[] = array('id' => $type,
'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
*/
/*
$cost = preg_replace('/[^0-9.]/', '', $cost);
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
}
$this->quotes['methods'] = $methods;
*/
/* Minimum USPS Shipping */
if ($cost < 6.00) {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
}
$this->quotes['methods'] = $methods;
/* EOF Minimum USPS Shipping */
As long as you are using the January 2, 2011 C from post #26 from:
http://www.zen-cart.com/forum/showthread.php?t=171314
Then you have the latest USPS version that we have released ...
NOTE: this came out after v1.3.9 ...