Normal Zone Shipping currently is limited to:
- weight-based only
- based on incremental pricing only, so as weight goes up, price also has to go up (which means no volume discounts)
My thoughts:
Add a new configuration option in the admin that specifies which calculation method to be used:
incremental - (current default way) - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
volume of 0-5 = $10 shipping
volume of 6-10 = $20 shipping
decremental - decrease the shipping cost as the volume increases
a value of 10:10, 20:5 means
volume of 0-10 = $10 shipping
volume of 11-20 = $5 shipping
This could also be expanded to include an option that is price, weight, or item-count based. This would effectively merge the subtotal zone shipping contrib as well.
Price-based example:
incremental - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
cost of $0-$5 = $10 shipping
cost of $6-$10 = $20 shipping
Item-count based example:
incremental - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
0-5 items in the cart = $10 shipping
6-10 items in the cart = $20 shipping
Any other thoughts?
- weight-based only
- based on incremental pricing only, so as weight goes up, price also has to go up (which means no volume discounts)
My thoughts:
Add a new configuration option in the admin that specifies which calculation method to be used:
incremental - (current default way) - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
volume of 0-5 = $10 shipping
volume of 6-10 = $20 shipping
decremental - decrease the shipping cost as the volume increases
a value of 10:10, 20:5 means
volume of 0-10 = $10 shipping
volume of 11-20 = $5 shipping
This could also be expanded to include an option that is price, weight, or item-count based. This would effectively merge the subtotal zone shipping contrib as well.
Price-based example:
incremental - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
cost of $0-$5 = $10 shipping
cost of $6-$10 = $20 shipping
Item-count based example:
incremental - increase the shipping cost as the volume increases
a value of 5:10, 10:20 means
0-5 items in the cart = $10 shipping
6-10 items in the cart = $20 shipping
Any other thoughts?
Last edited by Qphoria on Tue Jan 27, 2009 11:52 am, edited 1 time in total.
Ok, it's done
Working perfectly
Working perfectly
DOWNLOADWhat does it do:
============
This module expands on the original zone shipping module to allow calculate zone shipping based not only on the weight, but also the subtotal or item count of the entire order. It also supports incremental and decremental ranges, useful for breaks on shipping costs if the customer purchases a large order.
Main features:
==============
* Zone Shipping can be based on Weight, Subtotal, or ItemCount
* Calculation ranges can be set to increase or decrease
* Hides option when rates are out-of-range instead of showing 0.00
Last edited by Qphoria on Tue Jan 27, 2009 12:00 pm, edited 1 time in total.
Done!
v079.2 - 2009-JAN-27 - Qphoria
- Added support for % based costs. For example, a subtotal zone with 10:25% means that a $10 cart total charges $2.50 shipping.
Good call Geek
Summary:
itemcount/incremental: 4:10%,8:20% - If there is 1-4 items in your cart, it takes 10% of the cart subtotal for the shipping cost. If there are 5-8 items, it takes 20% of the cart subtotal. If there are more than 8 items, it won't show this shipping option.
weight/incremental: 4:10%,8:20% - If the cart weight is 1-4 units, it takes 10% of the cart subtotal for the shipping cost. If the cart weight is 5-8 units, it takes 20% of the cart subtotal. If there are more than 8 units, it won't show this shipping option.
subtotal/decremental: 4:20%,8:10% - If the cart subtotal is 4-7 (dollars), it takes 20% of the cart subtotal for the shipping cost. If the cart weight is 8+ (dollars), it takes 10% of the cart subtotal. If there are less than 4 (dollars), it won't show this shipping option.
v079.2 - 2009-JAN-27 - Qphoria
- Added support for % based costs. For example, a subtotal zone with 10:25% means that a $10 cart total charges $2.50 shipping.
Good call Geek
Summary:
itemcount/incremental: 4:10%,8:20% - If there is 1-4 items in your cart, it takes 10% of the cart subtotal for the shipping cost. If there are 5-8 items, it takes 20% of the cart subtotal. If there are more than 8 items, it won't show this shipping option.
weight/incremental: 4:10%,8:20% - If the cart weight is 1-4 units, it takes 10% of the cart subtotal for the shipping cost. If the cart weight is 5-8 units, it takes 20% of the cart subtotal. If there are more than 8 units, it won't show this shipping option.
subtotal/decremental: 4:20%,8:10% - If the cart subtotal is 4-7 (dollars), it takes 20% of the cart subtotal for the shipping cost. If the cart weight is 8+ (dollars), it takes 10% of the cart subtotal. If there are less than 4 (dollars), it won't show this shipping option.
Last edited by Qphoria on Wed Jan 28, 2009 3:12 am, edited 1 time in total.
No prob, Qphoria.
A lot of the modules, so far that I have seen, don't include the ability for percentage. And
most of the retail industry deals with percentages. lol
edit:
It appears though that you have to use either you use a set dollar amount or percentages.
But, what if you wanted to added both in the cost field? I have been working on a module
to try and do that, but with my limited knowledge of PHP I am having a hard time doing that.
Still learning a lot with PHP though.
edit:
It appears that I was wrong. You can use both, I just had it setup wrong. HA!
But, now I have another problem. On the checkout page, I receive a parsing error at the top of the page.
Could it have been something I did to the code? Doubtful, cause I recopied the original module files into
the locations on the site and I still get the error. Any thoughts?
Error:
I am running OpenCart 0.7.9-RC6.
A lot of the modules, so far that I have seen, don't include the ability for percentage. And
most of the retail industry deals with percentages. lol
edit:
It appears though that you have to use either you use a set dollar amount or percentages.
But, what if you wanted to added both in the cost field? I have been working on a module
to try and do that, but with my limited knowledge of PHP I am having a hard time doing that.
Still learning a lot with PHP though.
edit:
It appears that I was wrong. You can use both, I just had it setup wrong. HA!
But, now I have another problem. On the checkout page, I receive a parsing error at the top of the page.
Could it have been something I did to the code? Doubtful, cause I recopied the original module files into
the locations on the site and I still get the error. Any thoughts?
Error:
Code: Select all
Parse error: syntax error, unexpected ')' in ../catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Last edited by Anonymous on Fri Jan 30, 2009 5:53 am, edited 1 time in total.
Qphoria? Anybody?
It all looks right to me in the code, but I need another set of eyes if possible.
It all looks right to me in the code, but I need another set of eyes if possible.
Maybe the return stuff isn't needed.
Can you edit the file in the error above and try
replacing:
with
If that don't work try:
If that don't work try:
Can you edit the file in the error above and try
replacing:
Code: Select all
if (eval("return($value $op $array[0]);")) {
Code: Select all
if (eval("$value $op $array[0]")) {
Code: Select all
if (eval("return $value $op $array[0];")) {
Code: Select all
if (eval('return $value $op $array[0];')) {
Last edited by Qphoria on Fri Jan 30, 2009 3:39 pm, edited 1 time in total.
Well, here are the results of the edit changes:
Replaced:
With:
Results:
So, that didn't work then I replaced it with:
Results:
Then I replaced that with:
Results of that:
Any other ideas?
Replaced:
Code: Select all
if (eval("return($value $op $array[0]);")) {
Code: Select all
if (eval("$value $op $array[0]")) {
Code: Select all
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected $end in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Code: Select all
if (eval("return $value $op $array[0];")) {
Code: Select all
Parse error: syntax error, unexpected ';' in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Code: Select all
if (eval('return $value $op $array[0];')) {
Code: Select all
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
Parse error: syntax error, unexpected T_VARIABLE in /mnt/w0205/d18/s13/b02dbab8/www/dev/opencart/catalog/extension/shipping/zoneplus.php(58) : eval()'d code on line 1
I'm unable to reproduce your error so if you could try uploading this attached version of the extension file to:
catalog/extension/shipping/
overwrite the existing zoneplus.php file
Let me know if that works. I think the problem is that sometimes array[0] could be "" and it is trying to evaluate (1 >= )
Now I check that array is populated before trying to run the equation
The thing is, array[0] should be populated assuming the admin stuff is set up correctly in "value:cost" pairs
catalog/extension/shipping/
overwrite the existing zoneplus.php file
Let me know if that works. I think the problem is that sometimes array[0] could be "" and it is trying to evaluate (1 >= )
Now I check that array is populated before trying to run the equation
The thing is, array[0] should be populated assuming the admin stuff is set up correctly in "value:cost" pairs
Last edited by Qphoria on Fri Jan 30, 2009 10:50 pm, edited 1 time in total.
Sorry for the delayed reply, please don't dock my pay as well. lol
I figured out it was the settings that was causing the problem. I had it set as decremental instead of incremental.
But, I was wondering, is there a way to set it up for a handling fee so it will display it in the checkout?
I figured out it was the settings that was causing the problem. I had it set as decremental instead of incremental.
But, I was wondering, is there a way to set it up for a handling fee so it will display it in the checkout?
handling fee? you mean like an additional fee?
There is the Calculate Surcharge contrib that I made that adds a surcharge based on weight and/or subtotal
You can add that as a separate calculation that will show on the checkout page.
I will be updating that one to include itemcount as well.
There is the Calculate Surcharge contrib that I made that adds a surcharge based on weight and/or subtotal
You can add that as a separate calculation that will show on the checkout page.
I will be updating that one to include itemcount as well.
Who is online
Users browsing this forum: No registered users and 28 guests