php item Weight

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

php item Weight

Post by YoussefSiblini »

Hi Guys,
I am creating a shopping cart.
I have 3 items:

Red (1kg) (shipping cost is: £ 3.85)
Blue (2kg) (shipping cost is: £ 3.95)
Black (3kg) (shipping cost is: £ 4.85)

What I want to achieve is for the shipping cost to stay the same for up to 3kg once weight is above 3kg the shipping goes up by 20% per kg (which is 20% of the 3.85).
I am desperate for some help I don't have an idea from where to begin even.

Youssef
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php item Weight

Post by Celauran »

YoussefSiblini wrote:I have 3 items:

Red (1kg) (shipping cost is: £ 3.85)
Blue (2kg) (shipping cost is: £ 3.95)
Black (3kg) (shipping cost is: £ 4.85)

What I want to achieve is for the shipping cost to stay the same for up to 3kg once weight is above 3kg the shipping goes up by 20% per kg (which is 20% of the 3.85).
So shipping cost is dependent on both the item's weight and its cost? If I had two items that weighed the same, the more expensive item would cost more to ship?
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Re: php item Weight

Post by YoussefSiblini »

No shipping cost is only dependent on item weight.
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Re: php item Weight

Post by YoussefSiblini »

I sorted it out Thank you any way :)
Post Reply