Hi.
I have two shipping prices on my shop.
Anything is £5.95 shipping
But products that are only £1 should have £1 shipping
Is there any way to achieve this?
(I'm comfortable editing code)
Regards,
Denver
Hi.
I have two shipping prices on my shop.
Anything is £5.95 shipping
But products that are only £1 should have £1 shipping
Is there any way to achieve this?
(I'm comfortable editing code)
Regards,
Denver
If this is based on Product Quantity * 5.95 or 1.00 depending on the Product, you could use the Per Unit perweightunit where you set the Product Weight to be the actual shipping charge, as in this case, either 5.95 or 1.00 and set in the Configuration ... Shipping/Packaging ... the Maximum Weight to 5000 and the Tare Rates to 0:0 ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Hi
I have done this, but now whenever I view my cart with 2 or more products in it and estimate the shipping, it ends up with X * 5.95 or X * 1.00.
The desired shipping should be either 1.00 or 5.95 whether 1 product or 200
I have looked about in the admin panel and googled a little but still unable to find a solution
What should happen if I have 1 Product that should be $1.00 shipping and 1 Product that should be $5.95 shipping in the order?
What should happen if I have 5 Product that should be $1.00 shipping and 1 Product that should be $5.95 shipping in the order?
What should happen if I have 1 Product that should be $1.00 shipping and 5 Product that should be $5.95 shipping in the order?
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
1) $5.95 (preferred) - $6.95 (acceptable)
2) $5.95 (preferred) - $6.95 (acceptable)
3) $5.95 (preferred) - $6.95 (acceptable)
The $1.00 shipping should only be applied if all items in the cart are $1.00
Here is the plan ...
Still use the Product Weight of 1.00 to 5.95 to indicate the shipping charge on Products ...
To charge either $1.00 or $5.95 or $6.95 based regardless of quantity use the Per Item item shipping module and add the code in RED:
If you decide you do not want the $6.95 charge if both 1.00 and 5.95 is in the cart and just want $5.95, then remove the + on this line:Code:// class methods function quote($method = '') { global $order, $total_count; // bof: charge $1 or $5.95 or $6.95 $chk_1 = $_SESSION['cart']->in_cart_check('products_weight','1'); $chk_595 = $_SESSION['cart']->in_cart_check('products_weight','5.95'); $new_shipping = 0; if ($chk_1 > 0) { $new_shipping = 1; } if ($chk_595 > 0) { $new_shipping += 5.95; } //echo 'Products for 1 lb: ' . $chk_1 . '<br>'; //echo 'Products for 5.95 lb: ' . $chk_595 . '<br>'; //echo 'New shipping charge: ' . $new_shipping . '<br>'; // adjusted count for free shipping $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items(); $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' => $new_shipping + MODULE_SHIPPING_ITEM_HANDLING))); // eof: charge $1 or $5.95 or $6.95 if ($this->tax_class > 0) {
Code:$new_shipping = 5.95;
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
That part works fine, however (you're bound to hate me right now)
These two lines:
$chk_1 = $_SESSION['cart']->in_cart_check('products_weight','1');
$chk_595 = $_SESSION['cart']->in_cart_check('products_weight','5.95');
need to be:
$chk_1 = $_SESSION['cart']->in_cart_check('products_attributes_weight','1');
$chk_595 = $_SESSION['cart']->in_cart_check('products_attributes_weight','5.95');
as each product has two entries in the products_attributes table.
I've attempted to make the necsessary changes to includes/classes/shopping_cart.php but it just comes up with an error
Error:Code:Line 1539: $product_check = $db->Execute("select " . $check_what . " as check_it from ".TABLE_PRODUCTS_ATTRIBUTES." where products_id='" . $testing_id . "' limit 1");
WARNING: An Error occurred, please refresh the page and try again
Yes ... I hate you ...
When I get some time later on tonight I will work out a new way to do this for you ... meanwhile, don't break the shopping_cart class as there are other things that may be using the function ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Blame my boss, not me
I'll revert all the changes I made and thank you for all your time :)