Zen Cart Logo
Forums / General Questions / disable shipping modules on product variable

disable shipping modules on product variable

Locked

Views: 909

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
19 May 2010, 5:35 PM
#1
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

disable shipping modules on product variable

It's possible disable the storepickup shipping module only for those products that have a simple flag, like as 1 into a new database product field named "no store"?
If yes, how can i do it?
Thank you

19 May 2010, 6:03 PM
#2
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: disable shipping modules on product variable

or able storepickup shipping module only for certain customer.

22 Jun 2010, 3:18 PM
#3
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: disable shipping modules on product variable

It's possibile disable cash on delivery payment only for some product? How can I do it?

23 Jun 2010, 1:56 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: disable shipping modules on product variable

100asa:

It's possibile disable cash on delivery payment only for some product? How can I do it?

This reply applies equally to your other questions.

Near the start of the code for each of the modules you'll see a variable being tested that is called "$this->enabled".

If this variable evaluates to "true" the module is enabled. Otherwise it is disabled. The actual value determined here is from the admin setting used to enable/disable the module.

To make any of the modules available (or not available) based of some other condition, you only need to "reset" the "$this->enabled" variable based on your test case.

eg:
if (product == "bar of gold" ) { "$this->enabled" = "false" ; )

or

if (product_field == "no store") { "$this->enabled" = "false" ; ) or perhaps
if (product_field != "no store") { "$this->enabled" = "true" ; )

Needless to say, you'll need to you valid code and legitimate tests, but the the methods and principles are sound.

Cheers
Rod

24 Jun 2010, 8:49 AM
#5
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: disable shipping modules on product variable

Thanks so much!
I'll do tests and tell you.