Forums / Built-in Shipping and Payment Modules / Table rate by items needs to disappear at a specific point.

Table rate by items needs to disappear at a specific point.

Views: 697

Results 1 to 4 of 4
12 Jun 2012, 2:08 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Table rate by items needs to disappear at a specific point.

Customer wants 1-2 items to be a flat rate and 3-4 items to be a flat rate. Then the table rate needs to go away because they aren't doing by item after 4.

Can someone give me a bit of code to turn off the table rate under those circumstances. Would be very appreciative.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

12 Jun 2012, 9:32 PM
#2
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Table rate by items needs to disappear at a specific point.

I may be incorrect, but I think Table Rate already functions the way you describe. For example, if you setup the table rate as shown below, that would enable those rates UP TO that number of items:

2:5.00,4:10.00

Make sure 'Item' radio button is selected under Table Method. Try it and let me know if it works!

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

12 Jun 2012, 11:07 PM
#3
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Table rate by items needs to disappear at a specific point.

It is set up that way but if someone puts more than 4 it still shows up but with a zero cost.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

12 Jun 2012, 11:21 PM
#4
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Table rate by items needs to disappear at a specific point.

Adding something like this to /includes/modules/shipping/table.php around line 63 should do the trick:

// disable when there are more than 4 items
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->total_count() > 4) {
$this->enabled = false;
}

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.