Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Allowing one free attribute

Allowing one free attribute

Locked

Views: 947

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
25 Jan 2008, 11:15 PM
#1
dchrastil avatar

dchrastil

New Zenner

Join Date:
Sep 2007
Location:
Colorado, USA
Posts:
68
Plugin Contributions:
0

Allowing one free attribute

I am facing a problem. I have an attribute setup for leash colors, you may choose up to 4 colors. (i already wrote the javascript to limit only 4 checkboxs) but here it the problem I am running into. They want the first color to be free. example:

LEASH
-color attribute:

[] blue: $10.00
[X] red: $10.00
[] yellow: $10.00
[X] orange: $10.00
[X] purple: $10.00
[] black: $10.00
[] green: $10.00

the total attribute charges should now be $20.00 (not $30.00)

Any ideas? Much appreciated. Thanks

26 Jan 2008, 4:41 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Allowing one free attribute

There isn't anything to build in a Free One and force a total of 4 on checkboxes ...

You could do dropdown sets where the first set is free and the other 3 cost $10 ... and force it so all 4 require 1 selection using the Default and Display only as one of the choices on each of the 4 sets ...

30 Jan 2008, 7:37 PM
#3
dchrastil avatar

dchrastil

New Zenner

Join Date:
Sep 2007
Location:
Colorado, USA
Posts:
68
Plugin Contributions:
0

Re: Allowing one free attribute

Hmm, that is an interesting approach to it. Thanks Linda.

I ended up just modifying the /classes/shopping_cart.php file to look for this One-time-charge, and if there are more than one selected it will ignore one of them. Wish there was an easier way to do that then modifying a class file but that seemed to do the trick.

If anyone wants a detailed description please let me know and I would be happy to post it here.