Jump to content
Latest News: (loading..)

Table Rate By Price Limited Weight and Post Code

Recommended Posts

Hi there,

I am trying to setup my shopping cart with table rate and limited by product weight and postcode, and here is so far I can think about.


1. I setup the Table Rate charge by price,


so all orders over 49.01 will be free shipping.

2. Because I only want to offer free shipping to a small and medium size package, not the large item. I add the following code to /includes/class/shipping/ table.php




return $this->quotes;



  if (($cart->show_weight() < 50 )) {
           return $this->quotes;

This will limit the shopping cart total weight while they check out.

So, how do I change this to each item's weight instant of total cart weight?

If customer order 2 x 21 lbs item will give total weight 52 lbs, the free shipping can't apply to order.

So how can I change shopping cart total weight to heaviest items on the shopping cart's weight?



3. I also trying to limit the service only available in city area, so I will need to adding the restriction on postcode,


 if (($cart->show_weight() < 50 ) && $order->delivery['postcode'] != 'v6y 3j8')  {
           return $this->quotes;



so how can I setup multiple valuable for delivery postcode and only check if first 3 characters match?


thank you



Share this post

Link to post
Share on other sites


I'm wondering Ken if you could duplicate the table rate module, use that for weight, then check if under weight it then references the price table rate module? Just a thought.

Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now