Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping based on item count rather than weight


iwik

Recommended Posts

Hi there,

 

I'm trying to work out exactly how I can sort out my postage costs. Rather than have it based on weight, i need it to be based on the total item count.

 

Like this:

 

Within country: 1-3 = $5, 4 or more = $8

Surrounding countries (close by): 1 = $8, 2 = $15, 3 = $15, 4 and over = $3 per additional item

International: 1 = $12, 2 = $18, 3 = $18, 4 and over = $4 per additional item

 

There are a few contributions that do something similar, but they're not quite what I need (with the differing zones and all).

 

These are:

 

Multiple flat shipping rates based on Order Total - http://www.oscommerce.com/community/contri...ons,2441/page,4

 

Table shipping based on number of items - http://www.oscommerce.com/community/contributions,928/page,6

 

Although, I think my shipping would need to be zone based, to account for the differing countries that I would be shipping to (we do have an international customer base, so I can't just cut them off).

 

Is it possible to alter the zones.php file to make it count the items in the cart, rather than add up the total cost or weight of the order to work out the shipping charges??

 

So instead of having the coding say:

 

function quote($method = '') {
? ? ?global $order, $shipping_weight, $shipping_num_boxes;

 

it has more along the lines of:

function quote($method = '') {
? ? ?global $order, $item_count, $shipping_num_boxes;

 

Our products vary in price and weight too, so setting it up to be weight or price based wouldn't really give an accurate shipping total.

 

If anyone could give me any clues on how to achieve this, that'd be awesome.

Edited by iwik
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...