This shipping module will allow you to set an individual shipping price for each product. This module is kind of like the 'Shipping rate per product', or 'prodrate' shipping module designed by Joe Janos, except this module does not use the 'weight' field. Instead, this module adds a new field to your products table to hold the individual shipping price data. This means that you can use this module with any other module if you like. Intigration with the contribution 'multi-vendor shipping' is also explained.
Support forum thread at: http://forums.oscommerce.com/viewtopic.php?t=50221
Legend: 
Download

Report
if no products exists in the shopping-box and if then the user like to pop-up the shipping-cost information - an sql-error are displayed.
I corrected the code so that the individual shipping methods (defined within the product) only displayed if the box is not empty.
=============================
backup backup backup backup backup
=============================
catalog/includes/classes/shipping.php
---------------------------------------
Find (around row 20-58):
// INDIV_SM BEGIN (this is messy i know)
global $cart;
// New to fix attributes bug
$cart_products = $cart->get_products();
$real_ids = array();
foreach($cart_products as $prod){
$real_ids[] = tep_get_prid($prod['id']);
}
$sql = "SELECT shipping_methods FROM ".TABLE_PRODUCTS." WHERE products_id IN (".implode(',',$real_ids).") AND shipping_methods IS NOT NULL AND shipping_methods <> ''";
$query = mysql_query($sql);
// End new bug fix
$allow_mod_array = array();
while($rec = mysql_fetch_array($query)){
if(empty($allow_mod_array)) $startedempty = true;
$methods_array = array();
$methods_array = explode(';',$rec['shipping_methods']);
if(!empty($methods_array)){
foreach($methods_array as $method){
$allow_mod_array[] = $method;
}
}
if($startedempty){
$startedempty = false;
}else{
$temp_array = array();
foreach($allow_mod_array as $val){
$temp_array[$val]++;
}
$allow_mod_array = array();
foreach($temp_array as $key => $val){
if($val > 1){
$allow_mod_array[] = $key;
}
}
}
}
// INDIV_SM END
and replaced it with:
// INDIV_SM BEGIN (this is messy i know)
global $cart;
// New to fix attributes bug
$cart_products = $cart->get_products();
if (tep_not_null($cart_products)) {
$real_ids = array();
foreach($cart_products as $prod){
$real_ids[] = tep_get_prid($prod['id']);
}
$sql = "SELECT shipping_methods FROM ".TABLE_PRODUCTS." WHERE products_id IN (".implode(',',$real_ids).") AND shipping_methods IS NOT NULL AND shipping_methods <> ''";
$query = mysql_query($sql);
// End new bug fix
$allow_mod_array = array();
while($rec = mysql_fetch_array($query)){
if(empty($allow_mod_array)) $startedempty = true;
$methods_array = array();
$methods_array = explode(';',$rec['shipping_methods']);
if(!empty($methods_array)){
foreach($methods_array as $method){
$allow_mod_array[] = $method;
}
}
if($startedempty){
$startedempty = false;
}else{
$temp_array = array();
foreach($allow_mod_array as $val){
$temp_array[$val]++;
}
$allow_mod_array = array();
foreach($temp_array as $key => $val){
if($val > 1){
$allow_mod_array[] = $key;
}
}
}
}
}
// INDIV_SM END
second change (around row 63-73):
Find:
// INDIV_SM START
$temp_array = $this->modules;
$this->modules = array();
foreach($temp_array as $val){
if(mysql_num_rows($query)==0 || in_array(str_replace('.php','',$val),$allow_mod_array)) {
$this->modules[] = $val;
}
}
// INDIV_SM END
and replace it with:
// INDIV_SM START
if (tep_not_null($cart_products)) {
$temp_array = $this->modules;
$this->modules = array();
foreach($temp_array as $val){
if(mysql_num_rows($query)==0 || in_array(str_replace('.php','',$val),$allow_mod_array)) {
$this->modules[] = $val;
}
}
}
// INDIV_SM END
Thats all. Hope this solve it for everyone, within my shop it works. ;-))
I've attached my shipping.php -- use winmerge or other tools to compare it with your own version! I've installed some other contribution that changed this file.
kind regards
peter
This is a full file set again, with updated instructions and a bug fix to the home country Indvidual Ship Rate.
I forgot to include the sinstructions to install the module and setup some admin configurations. Here is the full set of files with these included.
Ed
I have included a full file set, tested and working which can be unzipped and uploaded to a new install, based on the post prior to mine. That's it! The instructions include info to install in a modified OSC site.
Look luck, Ed
This is to fix a bug in the install
10-categories.php
a missing ')' causes a mysql error when you try to duplicate an item in your catalog.
I was asked by a client to get this working for him as the initial instructions were sketchy.
This takes the mod right back to V2.0 MS2.2 by Farrukh Saeed. After successful installation the upgrade path should not be difficult if you need it.
You can upload the packaged files to a FRESH MS2.2 and need to alter no files, just follow the read.me to add a table to the DB then set it up in admin.
Bug fix and language file included.
Bug fix1
classes/shipping
changed and moved
if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) {
if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') //NEW
$this->shiptotal *= INDIVIDUAL_SHIP_INCREASE;
else $this->shiptotal += INDIVIDUAL_SHIP_INCREASE; //NEW
}
#2 forgot to add to new install instructions
'invcost' => $shipping_modules->get_shiptotal()
in checkout_shipping
This has homewetbar changes, some bug fixes and ability to add '0' shipping price.
There are changes to indvship.php.
Includes
Instructions for 4.1/4.2 and new install.
indvship.php file (goes in modules/shipping)
Individual Ship v4.2a
CHANGES
- Minor bug fix in order.php now it will display the shipping method + the amount of additional shipping in the order confirmation screen.
TO UPGRADE:
classesorder.php
FIND:
'shipping_method' => $shipping['title'],
CHANGE TO:
'shipping_method' => $shipping_title, //individual ship
CHANGE
Individual Ship v4.2
ADDITIONS:
- You can now set in admin a default country and an amount to charge extra if shipping outside the default country.
- Code to display how much the extra freight will be to your customers in your product_info.php
CHANGES:
- Removed shipping.php from application_top.php, and it now works in conjunction with other ship methods. Previously if you tried to use other ship methods with this contribution it make them unusable. All credit goes to Frank M. for this change to the code.
This is the update for Advanced Individual Shipping which supports other shipping methods.
If you have a problem
1-check posts first
2-then ask for help
here http://forums.oscommerce.com/index.php?showtopic=50221
2 Steps forgot to add in instructions.
starting at step 7
7- catalog/checkout_confirmation.php
8- catalog/checkout_process.php --new
9- catalog/checkout_paypalipn.php --new
If you have
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
comment out
//require(DIR_WS_CLASSES . 'shipping.php');
//$shipping_modules = new shipping($shipping);
That is the only change here. Fix in download
Updated download.
Includes language file from original release.
I have added my classes/ files here. DO NOT ADD THE TO YOUR CATALOG. Just use as a reference. There are other contributions here and you WILL get an error if you use these.
Note I am using a loaded version of osc I tried to make the instructions apply to both. No instructions here see previous files.
WHAT V4.1 does?
If product count = 1 and indvship
Shows only invdship for that product.
If product count = 1 and no indvship
Show all other methods
If product count > 1 and none are indvship
show all other methods
If product count >1 and one or more has invship
show invship total and all other methods
at checkout shipping
If product count >1 and one or more has invship
show all other methods to choose from with statement
"You have x products with individual shipping value of $y. This will be added to the method you select"
If only indv shipping only shows total shipping no choices.
At checkout adds all shipping methods to total shipping.
http://forums.oscommerce.com/index.php?showtopic=50221
Credit
D. M. Gremlin for starting this and creating the original contribution.
Farrukh Saeed for updating it.
1 file to add/replace
1 table to add
8 files to modify
I have changed several things from the original release of indv shipping.
Major changes
Created separate table for products TABLE_PRODUCTS_SHIPPING (products_shipping), you do not need to ceate a separate table if you have already installed this, however I do recommend it. If you do not create a table when that table TABLE_PRODUCTS_SHIPPING is mentioned replace TABLE_PRODUCTS. Note: Having one table with too many fields slows performance and the table will heave high Overhead and need to be optimized frequently.
Moved several items out of shopping_cart and into shipping class (this is a shipping contribution).
If you have the older indv shipping contribution I suggest you go through the original steps and remove it.
I was planning on adding multiple individual shipping options like express, two day and international but I think Rick Wise beat me to it. I have not tried it yet. http://www.oscommerce.com/community/contributions,2918 but will look into it and see if I can add it here. Also I may add Eyal Shoabi addition to display price at a later date.
This works on all sites I have tried.
HOWEVER I might have forgotten to add steps in instructions.
If you have problems email (see file)
This will simply add a line with the current ship price of an item so customers will have an idea on total price of the item.
Fixed some minor bugs.
Now it also supports Additional Shipping Prices per product.
This adds the ability for each additional product after the first to have a lower or different shipping price. (By chuck)
Discuss here:
http://forums.oscommerce.com/viewtopic.php?t=56123
Hi
I have just updated the Individual Product Shipping Prices v1.0 by dm.gremlin for Milestone 2.2
I have added all the necessary files.
Added Feature:
If the Individual Shipping Prices is enabled and the price set in the Admin => Categories => Products
At checkout_shipping.pho page, only Individual Shipping Module will be visible and available. And if the Individual Price is not set for a product. You will get other Shipping Modules which you might be running besides Individual Shipping Mod.
Discussion here: http://forums.oscommerce.com/viewtopic.php?t=56123
This shipping module will allow you to set an individual shipping price for each product. This module is kind of like the 'Shipping rate per product', or 'prodrate' shipping module designed by Joe Janos, except this module does not use the 'weight' field. Instead, this module adds a new field to your products table to hold the individual shipping price data. This means that you can use this module with any other module if you like. Intigration with the contribution 'multi-vendor shipping' is also explained.
Support forum thread at: http://forums.oscommerce.com/viewtopic.php?t=50221