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 ...
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 :)
Okay .. new method same file:
Code:// class methods function quote($method = '') { global $order, $total_count; // bof: charge $1 or $5.95 or $6.95 $new_shipping = 0; $chk_1 = 0; $chk_595 = 0; $chk_products = $_SESSION['cart']->get_products(); for ($i=0, $n=sizeof($chk_products); $i<$n; $i++) { if ($chk_products[$i]['weight'] == 1.00) { $chk_1 = $chk_1 + $chk_products[$i]['quantity']; } if ($chk_products[$i]['weight'] == 5.95) { $chk_595 = $chk_595 + $chk_products[$i]['quantity']; } // echo 'ID: ' . (int)$chk_products[$i]['id'] . ' Name: ' . $chk_products[$i]['name'] . ' weight: ' . $chk_products[$i]['weight'] . ' qty: ' . $chk_products[$i]['quantity'] . '<br>'; } $new_shipping = 0; if ($chk_1 > 0) { $new_shipping = 1; } if ($chk_595 > 0) { $new_shipping += 5.95; } //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) {
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!
Ajeh, thank you very much!
That is absolutely perfect!
Lifesaver
10 points
Mucho gracias
irayo
You are most welcome ... remember the Zen Cart Team when you are rich and famous ...![]()
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!