Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Per item shipping per zone?


Recommended Posts

Posted

I am helping someone with their store. Most of the time the forum gives me a good answer but I can't find one and want to avoid writting lots of code.

They charge a per item shipping charge. It has worked fine up until GB started ordering products. When they ship outside of the United States, they need to add $6.00 (US) to the order total. They do not use weight. So the zone table won't work for me. It would seem to me the ability to add addition charge for international shipping not based on weight probably has been done but I just can't find it. Any suggestions on how I can help my friend.

Posted
I am helping someone with their store. Most of the time the forum gives me a good answer but I can't find one and want to avoid writting lots of code.

They charge a per item shipping charge. It has worked fine up until GB started ordering products.  When they ship outside of the United States, they need to add $6.00 (US) to the order total.  They do not use weight. So the zone table won't work for me. It would seem to me the ability to add addition charge for international shipping not based on weight probably has been done but I just can't find it. Any suggestions on how I can help my friend.

I did find that contribution for a surcharge, but that is not working. It should be easy, if country does not equal United States add surcharge. But nope. Guess I will have to start writing. Any suggestions would be appreciated.

Posted
I did find that contribution for a surcharge, but that is not working. It should be easy, if country does not equal United States add surcharge. But nope. Guess I will have to start writing. Any suggestions would be appreciated.

 

 

Did you try world zones contribution. They have it so you can specify shipping tables based on countries already. You could just use that and for anything outside the US just add $6.00 to the US price. I may be wrong, but this does seem what you are looking for. If you want a cart with it installed by default checkout creloaded.com. It is a supercharged version of osCommerce and it is free.

 

I hope my problem is just as easy. I need to make a module that can look at the cart and determine what zone to use for shipping products. I have alcoholic beverages that can only be shipped to certain states and non-alcoholic that can be shipped to all states. The catch is you can order from any state and deliver to only states in the corresponding zones, aka if the cart has just one alcoholic beverage entered ship to only alcohol allowable. I have already revamped code to look at shipping zones based on the shipping zones activated via the modules activated. I plan on offering as a contribution if I can figure it out. All contributions so far do not seem to match this yet. I will section off categories into non-alcoholic and alcoholic beverages, so the code will be able to determne based on category which zone will apply. Manufacturers are also a possibility this way I can stay within certain themes.

Posted
Did you try world zones contribution. They have it so you can specify shipping tables based on countries already. You could just use that and for anything outside the US just add $6.00 to the US price. I may be wrong, but this does seem what you are looking for. If you want a cart with it installed by default checkout creloaded.com. It is a supercharged version of osCommerce and it is free.

 

I hope my problem is just as easy. I need to make a module that can look at the cart and determine what zone to use for shipping products. I have alcoholic beverages that can only be shipped to certain states and non-alcoholic that can be shipped to all states. The catch is you can order from any state and deliver to only states in the corresponding zones, aka if the cart has just one alcoholic beverage entered ship to only alcohol allowable. I have already revamped code to look at shipping zones based on the shipping zones activated via the modules activated. I plan on offering as a contribution if I can figure it out. All contributions so far do not seem to match this yet. I will section off categories into non-alcoholic and alcoholic beverages, so the code will be able to determne based on category which zone will apply. Manufacturers are also a possibility this way I can stay within certain themes.

 

doh wich I could figure how to edit last post. I know you are not using weight for shipping right now. You could do an alteration of world zones to not use weight, but go per item instead. Make a combination of the 2.

Posted
doh wich I could figure how to edit last post. I know you are not using weight for shipping right now. You could do an alteration of world zones to not use weight, but go per item instead. Make a combination of the 2.

I am trying the World Zone module this morning. And it will do everything correctly except that the weight comes into play. So I default it to a flat charge on the weight and that will work with your suggestion but the lady charges per item, so on a multiple order, the scheme doesn't work. So I am trying to think of a way of getting a combo of the two, zones and per_item, to work.

I did try to modify the perState perItem contribution but have had mixed results with that. That is the one I thought you might use with your shipping situation. The solutions are very easy, it is just trying to weave it into this program that is tough.

I really want to avoid tearing into this thing if there is something on the shelf. I told this lady I would do it as a favor as most of the time it takes me less than an hour to make something work for her. I should have looked closely before offering. Oh well. Have to go set up a server this morning so when I get back, I am going to see if I can modify the weight table to react per item. That would solve the problem if it could assign a default weight to each item. The weight wouldn't be real but the table would work based on the addition of "fake" weight. Then I could go with the World Zone. Now this lady may have a real good reason for not using weight so I will have to see if that will mess with her store.

Thanks for your suggestions

Posted
I am trying the World Zone module this morning. And it will do everything correctly except that the weight comes into play. So I default it to a flat charge on the weight and that will work with your suggestion but the lady charges per item, so on a multiple order, the scheme doesn't work. So I am trying to think of a way of getting a combo of the two, zones and per_item, to work.

I did try to modify the perState perItem contribution but have had mixed results with that. That is the one I thought you might use with your shipping situation. The solutions are very easy, it is just trying to weave it into this program that is tough.

I really want to avoid tearing into this thing if there is something on the shelf. I told this lady I would do it as a favor as most of the time it takes me less than an hour to make something work for her. I should have looked closely before offering. Oh well. Have to go set up a server this morning so when I get back, I am going to see if I can modify the weight table to react per item. That would solve the problem if it could assign a default weight to each item. The weight wouldn't be real but the table would work based on the addition of "fake" weight. Then I could go with the World Zone. Now this lady may have a real good reason for not using weight so I will have to see if that will mess with her store.

Thanks for your suggestions

 

 

Check out the contributions and type vendor, and click on the Individual Ship v4.2a. It will allow you to set shipping based on product, and some other stuff. Here is a quote from inside the readme. I think it will work for me as well:

 

"INSERT INTO configuration VALUES ('', 'Indiv Ship Outside Home Increase', 'INDIVIDUAL_SHIP_INCREASE', '3', 'Individual ship x increase for shipping outside home country. For example: If you set your item ship price to $50 and this value to 3 and ship outside your home country they will pay $150, and if this value was 2, they would pay $100.', 7, NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, NULL);"

 

I am thinking if you modify this module just a bit you can have it add $6 instead of multiplying the value. I don't see anywhere as yet. To add the contribution looks like a lot of work though and it still may be easier to mod the world zones files. I am going to add it now to mine to see what happens. However since I am using creloaded this may take some work to use.

 

I will also look at the world zones module to see if I can understand how to mod for both of us. It may be easier to modify, specially since I already have it installed.

Posted

It is possible to edit it very easy. You just take the part where it figures out shipping cost and just tell it to multiply it by the $total_count like in the module for regular per item shipping. Here is some code hope it helps, I am still trying to figure how to cure my problem.

 

I left in the original code and commented out pieces so you can see what I did. This assumes you only type in the amount that you will charge for the target country aka US on the text box that takes the weight. I commented out the part that turns it into an array and loops, it will only take one argument now. Then I multiply it by the total count of the cart like in regular per item shipping. If the target country is not in the first text box then it defaults to all others. All others has a handling fee of $6 plus the regular shipping.

 

$shipping = -1;

$zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone);

 

//$zones_table = split("[:,]" , $zones_cost);

$zones_table = $zones_cost;

$size = sizeof($zones_table);

//for ($i=0; $i<$size; $i+=2) {

//if ($shipping_weight <= $zones_table[$i]) {

//$shipping = $zones_table[$i+1];

$shipping = $zones_table;

$shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $order->delivery['country']['title'] . ': ';

if ($shipping_num_boxes > 1) {

$shipping_method .= $shipping_num_boxes . 'x ';

}

$shipping_method .= $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

//break;

//}

//}

 

if ($shipping == -1) {

$shipping_cost = 0;

$shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE;

} else {

global $total_count;

$shipping_cost = ($shipping * $total_count) + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);

// $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);

}

}

 

/*$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,

'methods' => array(array('id' => $this->code,

'title' => $shipping_method,

'cost' => $shipping_cost)));*/

 

$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' => $shipping_cost)));

//'cost' => (MODULE_SHIPPING_ITEM_COST * $total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

Posted
It is possible to edit it very easy. You just take the part where it figures out shipping cost and just tell it to multiply it by the $total_count like in the module for regular per item shipping. Here is some code hope it helps, I am still trying to figure how to cure my problem.

 

I left in the original code and commented out pieces so you can see what I did. This assumes you only type in the amount that you will charge for the target country aka US on the text box that takes the weight. I commented out the part that turns it into an array and loops, it will only take one argument now. Then I multiply it by the total count of the cart like in regular per item shipping. If the target country is not in the first text box then it defaults to all others. All others has a handling fee of $6 plus the regular shipping.

 

$shipping = -1;

$zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone);

 

//$zones_table = split("[:,]" , $zones_cost);

$zones_table = $zones_cost;

$size = sizeof($zones_table);

//for ($i=0; $i<$size; $i+=2) {

//if ($shipping_weight <= $zones_table[$i]) {

//$shipping = $zones_table[$i+1];

$shipping = $zones_table;

$shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $order->delivery['country']['title'] . ': ';

if ($shipping_num_boxes > 1) {

$shipping_method .= $shipping_num_boxes . 'x ';

}

$shipping_method .= $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;

//break;

//}

//}

 

if ($shipping == -1) {

$shipping_cost = 0;

$shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE;

} else {

global $total_count;

$shipping_cost = ($shipping * $total_count) + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);

// $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);

}

}

 

/*$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,

'methods' => array(array('id' => $this->code,

'title' => $shipping_method,

'cost' => $shipping_cost)));*/

 

$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' => $shipping_cost)));

//'cost' => (MODULE_SHIPPING_ITEM_COST * $total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

 

Excellent. I see where you are going. Ok I started by installing individual shipping 4.2a. The module side only had one problem, my typing. Other than that seems to work on the client side. The admin side is a different story. Although the module shows up, it does not allow me to enter the country code variable. So something is not showing up in the admin side and I will spend this afternoon debugging it. So it looks promising but I need to fix the admin before I can give you a report.

Thanks for your help.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...