Forums / Built-in Shipping and Payment Modules / Force customer to use a certain Shipping for a certain category.

Force customer to use a certain Shipping for a certain category.

Started by hylt on 20 Sep 2012, 9:54 AM · Views: 1,261

Results 1 to 8 of 8
20 Sep 2012, 9:54 AM
#1
hylt avatar

hylt

New Zenner

Join Date:
Oct 2007
Posts:
20
Plugin Contributions:
0

Force customer to use a certain Shipping for a certain category.

Hi There,

I've been trying to sort this out for a few days on and off now, and I'm going around in circles! Any kind help would be gratefully received.

The shop I'm building wants to offer different postage using table rates, for each different category. I'll try and explain that better:

Category (CAT ID 1) - Thole pins 1-49 pins (£6.50 postage) 50-99 pins (£8 postage) and 100 plus pins (FREE POST)

Category (CAT ID 2) - Chalkboards £9.99 each, £2.70 Postage for the first, £4.20 Postage for 2, £8 Postage for 3+

Category (CAT ID 3) - Comic Letters £1.05 each, Postage £1.20 for the first, and 45p for each one after that for postage

I managed to get the postage for the Thole pins setup and working so that it worked only for that category using the following code in table.php:

// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
}

// disable for one master_categories_id
  if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','2') > 0)) {
      $this->enabled = false;
  }
  
  // disable for one master_categories_id
  if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','3') > 0)) {
      $this->enabled = false;
  }

Then I installed the Cloned table rates mod and set up the postage for Comic letters in Table Rate2 which works fine.

However now I'm getting both table rates and Table rates2 as a shipping choice when I add a single item into the shopping basket.

You can check out the problem here http://www.woodcutcomponents.co.uk/shop (Apologies if I'm not supposed to add URLS in a post)

The more I try to sort this the more I get confused?

Kindest Regards

Hylton

23 Sep 2012, 2:39 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Force customer to use a certain Shipping for a certain category.

Which one should show for:
Cat 1

Which one should show for:
Cat 2

Which one should show for:
Cat 3

What should happen on Mixed Cart from the three categories?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Sep 2012, 12:14 PM
#3
hylt avatar

hylt

New Zenner

Join Date:
Oct 2007
Posts:
20
Plugin Contributions:
0

Re: Force customer to use a certain Shipping for a certain category.

Hi There,

Thank you for your reply.

Hope I'm supplying the correct information you required, please let me know if I miss-read your post.

For Cat 1 I'm using Table Rates

Cat 2 I'm using Table rates2
Cat 3 I'm using Table rates3

For a mixed cart the items shipping would be totalled together.

Kindest Regards

Hylton

24 Sep 2012, 1:13 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Force customer to use a certain Shipping for a certain category.

For a mixed cart the items shipping would be totalled together.

And then which of the Table Rates are used? Or, are you saying you some how need the two rates to some how work together to make one rate?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Sep 2012, 3:40 PM
#5
hylt avatar

hylt

New Zenner

Join Date:
Oct 2007
Posts:
20
Plugin Contributions:
0

Re: Force customer to use a certain Shipping for a certain category.

Hi There,

Thank you for your reply.

If somebody purchased an item from each category then they would be shown a combined postage price for all three items.

At the moment zencart gives them a choice of which shipping they wish to use.

Hope this is making sense, it is in my head while I'm typing it.

Kindest Regards

Hylton

24 Sep 2012, 3:50 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Force customer to use a certain Shipping for a certain category.

Can you go to the Modules ... Shipping ... and then:

Click on Table Rates and show what is in the right hand column ...

Next, click on Table Rates2 and show what is in the right hand column ...

Then, click on Table Rates2 and show what is in the right hand column ...

NOTE: You may need to make a separate post for each one, I forget the limit on the length of the posts ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

25 Sep 2012, 11:30 AM
#7
hylt avatar

hylt

New Zenner

Join Date:
Oct 2007
Posts:
20
Plugin Contributions:
0

Re: Force customer to use a certain Shipping for a certain category.

Hi Ajeh,

OK here are the table rates:

Table Rate

Enable Table Method
True

Shipping Table
49:6.50,99:8.00,100:0.0

Table Method
item

Handling Fee
0

Handling Per Order or Per Box
Order

Tax Class
--none--

Tax Basis
Shipping

Shipping Zone
--none--

Sort Order
0

And here are the Table2 Rates:

Table2 Rate

Enable Table Method
True

Shipping Table
1:1.20,2:1.65,3:2.10,4:2.55,5:3.00,6:3.45,7:3.90,8:4.35,9:4.80,10:5.25,11:5.70,12:6.15,13:6.60,14:7.05,15:7.50,16:7.95,17:8.40,18:8.85,19:9.3 0,20:9.75,21:10.20,22:10.65,23:11.10,24:11.55,25:12.00,26:12.45,27:12.90,28:13.35,29:13.80,30:14.25,31:14.70,32:15.50,33:15.60,34:16.05,35:16 .50,36:16.95,37:17.40,38:17.85,39:18.30,40:18.75

Table Method
item

Handling Fee
0

Handling Per Order or Per Box
Box

Tax Class
--none--

Tax Basis
Shipping

Shipping Zone
--none--

Sort Order
0

Haven't set up Table3 Rates as yet until I figure it all out.

Kindest Regards

Hylton

7 Oct 2012, 2:32 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Force customer to use a certain Shipping for a certain category.

Unfortunately, your pricing isn't following any real pattern ... and without Table3 to see where you are going with that, it is even harder to figure out your shipping rates ...

You might be able to build a formula for your shipping as your Table2 is a Handling fee of $0.75 plus $0.45 per item ...

Do you have any idea what your plan is for Table3?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!