# [Contribution Update] Individual Shipping Price v 2.0 MS 2.2

## Recommended Posts

Hi,

I have some trouble with the contribute "Individual Product Shipping Prices". The Installation was okay and now I have two groups of products to ship: One group for free and free shipping und the other with a fixed price and a defined shipping charge of 2?. All is okay, if I order every productgroup for itself.

Now I can't mix these groups, I can't do what my customers probably will: They will order a free product and one or more from the other group. Now if I have a free product and another one in my basket, the free one will hit the shipping charge to zero. What's that??

Is there anyone, who has an idea. Thanks

Guntram

I had the same challenges and decided to re-write the math in this module to meet my needs. It's very specific to my store and probably not acceptable for others but basically this is the logic I assembled:

-if there is more than one product in the basket, add them all up then divide by the number of products to get the shipping average. I also put a clause in to ignore if it was free shipping not to sway the shipping charges.

like i said, very specific to my business and works fine for me. the math is pretty simple so you should be able to tweak the code fairly easily to get your desired results.

##### Share on other sites
I had the same challenges and decided to re-write the math in this module to meet my needs. It's very specific to my store and probably not acceptable for others but basically this is the logic I assembled:

-if there is more than one product in the basket, add them all up then divide by the number of products to get the shipping average. I also put a clause in to ignore if it was free shipping not to sway the shipping charges.

like i said, very specific to my business and works fine for me. the math is pretty simple so you should be able to tweak the code fairly easily to get your desired results.

which file would i edit to achieve this?

##### Share on other sites

okay i made a quick little hack to make it show the individual shipping module will show up if theres a product with free shipping in the shopping cart.

in your includes/classes/shipping.php file...find these lines

``` ? ? ? ? ? ? ?// Don't show Individual Shipping Module
? ? ? ? ? ? ?if (\$class != 'indvship') ?{
? ? ? ? ? ? ? ?\$include_modules[] = array('class' => \$class, 'file' => \$value);
? ? ? ? ? ? ?}```

and just comment it out like so:

```/* ? ? ? ? ? ? ?if (\$class != 'indvship') ?{
? ? ? ? ? ? ? ?\$include_modules[] = array('class' => \$class, 'file' => \$value);
? ? ? ? ? ? ?}*/```

Edited by kinetek

##### Share on other sites

this is a quick little hack to add a base price to your individual shipping price. so let's say you always want to charge a flat base price of \$4.95 for all orders and have some items add unto that price.

in your includes/classes/shopping_cart.php file find these lines:

```// mod indvship
\$this->shiptotal = 0;
// end indvship```

change the 0 to whatever you want as your base price. mine is set at \$4.95 so mine looks like:

// mod indvship

\$this->shiptotal = 4.9500;

// end indvship

##### Share on other sites
I had the same challenges and decided to re-write the math in this module to meet my needs. It's very specific to my store and probably not acceptable for others but basically this is the logic I assembled:

-if there is more than one product in the basket, add them all up then divide by the number of products to get the shipping average. I also put a clause in to ignore if it was free shipping not to sway the shipping charges.

like i said, very specific to my business and works fine for me. the math is pretty simple so you should be able to tweak the code fairly easily to get your desired results.

which file would i edit to achieve this?

/includes/classes/shopping_cart.php

modified the calculate function....

##### Share on other sites

:unsure: I haven't installed the mod yet, but it looks like it does what I need, except for one thing... I need to tack on additional fees for shipping internationally. How could I best accomplish this?

Thanks for any and all advice.

##### Share on other sites

I've now added the mod to my development store. The mod shows up and appears to work properly in the admin, but doesn't appear in the customer side of the store.

Any ideas on what's happening? :unsure:

I should add that I'm using osCommerce 2.2 Milestone 2

Edited by gawain

##### Share on other sites
I've now added the mod to my development store. The mod shows up and appears to work properly in the admin, but doesn't appear in the customer side of the store.

Any ideas on what's happening? :unsure:

I should add that I'm using osCommerce 2.2 Milestone 2

what shows up on the customer side?

##### Share on other sites

It just appears as though nothing had been installed at all. No errors, but no new options in the shipping selection either. Another strange anomaly is that the ship charges applied to products in the admin don't "take." In other words, I add a ship charge for a product, click Preview, then Update... When I go back to the product, the ship charge has reverted to zero. Something strange is definitely going on. I may try the installation again.

Am I correct in assuming that in order to install I just add or replace the OSC files included in the version 3.1 distribution? I had gone through the installation procedure mentioned in the documentation (and discovered several places where the code to be searched for didn't match in categories.php) before I realized the mod replaces those files anyway...

Once again, I'm using osCommerce 2.2 Milestone 2, downloaded in mid July.

##### Share on other sites

did you update the database?

##### Share on other sites

Yes. I added the two columns to the products table.

##### Share on other sites

###

ALTER TABLE products ADD products_ship_price DECIMAL(15,4) NOT NULL;

###

ALTER TABLE products ADD products_ship_price_two DECIMAL(15,4) NOT NULL;

##### Share on other sites
Yes. I added the two columns to the products table.

are the new shipping values getting written to the db?

if not, i would suggest adding the values manually using PHPMyadmin and then check to see if they show up during checkout. if so, you know the problem is with the admin piece. if they don't show, you have bigger problems.

##### Share on other sites

This looks kind of what I am looking for, but...

I'm working on putting together a store where I have quite a variety of items - some very light which will ship UPS, some which are too heavy for UPS and will have to go Freight. No problem there, since the UPS module returns an error when the weight is too much for UPS.

However... I also have some items that need to have an additional UPS HazMat charge added to them - and to those products only... Any ideas? I still want to be able to ship by weight, and would rather not have to add the HazMat charge to the price of the item since there are going to be some local pickups, or store deliveries...

Thanks!

Kris

##### Share on other sites

I'm using CVS 2.2. Can I use an older version or should I bite the bullet and get 2.2 MS2?

Thanks for the help

~spectr17

##### Share on other sites

Farrukh,

Did you ever figure out how to integrate your indvship with multi-vendor shipping for the newest milestone release? (2.2)

Thx,

-Codi

Carpe Carp: Seize the Fish.

##### Share on other sites

hello all

i am trying to install this contrib but i get this error on the

Fatal error: Call to a member function on a non-object in /www/catlog/includes/classes/shipping.php on line 20

on

\$cart->get_shiptotal()

any ideas.

i appears that the \$cart does not exist yet in this function

##### Share on other sites

Hi,

I have installed this contrib and copied and pasted the changes as per instruction. However for some reason, when I checkout the shipping cost is always 0.

Individual product shipping cost have all been inserted. Db table changes have been successful as well. The module shows up fine in the admin.

Any idea where to look?

+chh

##### Share on other sites

I just installed individual shipping contribution and when i log into an account on the shopping cart and i try to access the page 'shopping_cart.php', i get the following error:

Fatal error: Call to undefined function: get_shiptotal() in includes/modules/shipping/indvship.php on line 53

but i added the function get_shiptotal() into the shopping_cart.php file,

any idea why i would be getting this error?

##### Share on other sites

Just want to correct my last post, i only get the error mentioned above when trying to access the page checkout_shipping.php,

does anyone know why?

##### Share on other sites

Fatal error: Call to undefined function: tep_get_customers_groups_id() in /home/tradertt/public_html/catalog/includes/boxes/specials.php on line 15

Anyone know why I get this error?

##### Share on other sites

Just a question before i install this contribution - it seems to fit my needs, but - does it support Zones? ie. different individual prices for different zones?

I am using Zoneworld / Zones International by elari to have 3 different flatrates... of course i would need 3 different individual prices - 1 for each zone. Does this contribution provide this feature?

##### Share on other sites

Well i installed it now and it doesn't seem to provide it. I think i am going to merge it with Zones International myself to be able to get the needed features, unless someone knows a contribution which already provides it....

##### Share on other sites

I have installed the 1.0 version of the Individual Shipping Module and have a problem. I am quite sure that all the files are correct. When a user makes a purchase the shipping is always "0", it says best way - flat rate (individual) but no value.

##### Share on other sites

HI

I was wondering if anyone could assist me by caculating the shipping with the highest shipping cost...

for example... If i have Product A 2.00 ( fist shippping) and 1.00 (second)

and Product B 1.00 ( first) and 0.50 (second)

If i buy Product A & B my shipping should be

2.00(First of Product A) + 0.50 (second of product B)

At the moment it is caculating the shipping of both the first shipping rates.

2.00+1.00.

Any ideas.