Hello,
I was wondering, is there a way of calculating the shipping and handling cost by taking the dollar amount total of an order and multiplying it by a percentage that is based upon a zone that uses the postal code to find the zone? I would also need to do this for multiple shipping possibilities. So, Ground would be one percentage and Rush would be another percentage that would show up on the checkout_shipping page so the customer would be able to chose which shipping method they would prefer. I have tried setting up different Zones, but I seem to get lost and confused when trying to set it up involving the postal codes. Any help would be great.
I am in the US for all those that would need to know
Example:
Say the total amount of the order is $623.75 and the zone for the postal code requires a 10% add on to the cost for shipping and handling for ground and 15% for Rush. So, we would take .10 x 623.75 = 62.375 and .15 x 623.75 = 155.9375 and then display it on the shipping page for the customer to choose.
I hope I explained this properly. Lol
You appear to be describing "subtotal combined with zone" based shipping. I am happy to be contradicted but I think you will need to roll your own shipping extension based on code in the subtotal based shipping contribution and the zone based shipping module.
Okay, well is there a way to edit the "Subtotal Shipping" module to include a percentage instead of a dollar amount?
I have been looking at it for hours and I think that I would change the file 'catalog\extension\shipping\subtotal.php' and I would change the code somewhere in here:
I am still new to PHP and any help would be great. Thanks. And I do apologize if I am a hassle or bother to anyone here.
I have been looking at it for hours and I think that I would change the file 'catalog\extension\shipping\subtotal.php' and I would change the code somewhere in here:
Code: Select all
$quote_data['subtotal'] = array(
'id' => 'subtotal_subtotal',
'title' => $this->language->get('text_subtotal_description'),
'cost' => $cost,
'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('subtotal_tax_class_id'), $this->config->get('config_tax')))
);
$method_data = array(
'id' => 'subtotal',
'title' => $this->language->get('text_subtotal_title'),
'quote' => $quote_data,
'tax_class_id' => $this->config->get('subtotal_tax_class_id'),
'sort_order' => $this->config->get('subtotal_sort_order'),
'error' => false
Found this -- thought i seen this
http://www.opencart.com/contribution/in ... tion_id/49
subtotal shipping mod
http://www.opencart.com/contribution/in ... tion_id/49
subtotal shipping mod
Luvz2drv wrote: You would not want to change the subtotal.php
you would want to extend or change the actual shipping module
hope this helps to point you in the right direction
I am basing the changes on the "Subtotal Shipping" module.Luvz2drv wrote: Found this -- thought i seen this
http://www.opencart.com/contribution/in ... tion_id/49
subtotal shipping mod
The code that I posted is from the actual shipping module for the "Subtotal Shipping" module and all I am trying to do is add to it, the ability to use percentages in the shipping rates. I know that it is possible cause I have seen it in other modifications and modules on other CMS Cart systems. But, like I said before, I am fairly new to editing and writing modules in PHP, so any help would be wonderful.
I'm very interested in this as well.
Does anyone have this PHP code of how to add shipping price based on percentage of order total in the cart and shipping option?
I am new to open cart and a PHP scripting newblet and trying to wrap my head around this is making me craZY!
Does anyone have this PHP code of how to add shipping price based on percentage of order total in the cart and shipping option?
I am new to open cart and a PHP scripting newblet and trying to wrap my head around this is making me craZY!
Thank you Bruce. I will try to explain better.
I need the shipping to be calculated in the cart.
I would like it to have two choices for shipping, Rush Delivery or Standard Ground.
Each shipping choice should apply a percentage to the total order in the cart (before tax) on a sliding scale.
For example, paypal allows me to put .01 to 100/10%, 100.01 to 300.00/12%, etc.
I can't use the paypal shipping calculation in my account because it will apply to all my websites that are different, which is why I would like a shipping module to make the cart do this before being transfered to paypal for payment processing.
So if anyone has something like this I would appreciate a copy
I need the shipping to be calculated in the cart.
I would like it to have two choices for shipping, Rush Delivery or Standard Ground.
Each shipping choice should apply a percentage to the total order in the cart (before tax) on a sliding scale.
For example, paypal allows me to put .01 to 100/10%, 100.01 to 300.00/12%, etc.
I can't use the paypal shipping calculation in my account because it will apply to all my websites that are different, which is why I would like a shipping module to make the cart do this before being transfered to paypal for payment processing.
So if anyone has something like this I would appreciate a copy
Who is online
Users browsing this forum: No registered users and 41 guests