Forums / Setting Up Categories, Products, Attributes / Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Locked

Views: 1,742

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
3 Apr 2008, 7:25 PM
#1
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Forgive me if this has been answered, I couldn't find an answer!

I have a product (we'll say a serving set) that is allowed to have engraving done, and there are several engraving options to choose from IF they in fact choose to have it engraved (they can have their First names on line one and their wedding date on line two. They can also choose from a few typestyles.) If they choose ANY engraving option, there is a $4.00 charge. Right now the only way I can see how to set it up is to have a charge of $4.00 on each attribute, but I'd like to just set it to a one time $4.00 charge if they choose ANY of those options. Now, granted they won't be choosing a typestyle without first having their names or dates stated, but they CAN have EITHER their names, date, or names AND dates engraved, and I can't really put a $4.00 charge on both the Names attribute and Date attribute, because it would then charge $8.00 total. Does all that make sense? I just want a flat $4.00 charge if any at all are chosen, no matter how many attributes they choose.

Anyone know how to do this?

Thanks in advance!

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

3 Apr 2008, 7:41 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

You could set up a RADIO BUTTON option called:-

Engraving Required? Yes / No (default is NO)

If yes, hit them with 4 bucks, by putting a $4 charge on YES option.

Then, don't apply any cash values to your text fields.

Unfortunately, there is no field validation facility in the current version of zencart. If there was, you'd be able to make at least ONE of the text fields "required" when the radio button selection is "yes".

(I'm no javascript expert, but there MAY be a way to hack a validation using javascript .... any javascript/zencart gurus out there... ?)

3 Apr 2008, 8:23 PM
#3
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

By "Required" in your example I assume that's just for the example, right? You don't really mean it's "required"? Because, it's not. They can just buy the product with no engraving. But I think I see what you're saying though. I could also call it: Would you like your product engraved? Yes/No (default No). And then I can leave the other options, like you said, with no cash value to be charged. I'd have to leave a note that says, "This option MUCH be checked to be valid" or something like that. That way they can't just write their text and skip out on the actual option that has the charge. Well, they COULD, but it wouldn't be valid. It's too bad there isn't a mod for what I'm trying to do, but this sound like a good alternative. Thanks!

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

3 Apr 2008, 8:43 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Well, with my "solution" (above) a shopper may select YES PLEASE - Engraving required, but may "forget" to compose any text in any of the text fields.

If they then click "Add to Cart", they will have the YES option selected, but will not have provided any text in any field.

You will get an order that says YES for engraving and which will have added $4 to the charge on the customer - but there will be no accompanying text to engrave the goods! (The shopper forgot to type it in!)

So, ideally, we need field validation - a technique that says:-
**
"If default selection is chosen - (in this case "NO" on the radio button) - then allow add to cart without any text field needing input.

If non-default selection is chosen (YES on the radio button) - then do not allow Add to Cart unless at least ONE text field contains data."**

I know it sounds ridiculous, but customers WILL click YES, get hit four bucks, and FAIL to insert any text for you to engrave!

Validation is simply a "failsafe" for this eventuality.

3 Apr 2008, 8:45 PM
#5
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

... and with my "solution", you cannot make any text fields "required", because the customer will then be forced to input text - even if the radio button is left to NO.

3 Apr 2008, 8:48 PM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Oh... I see what you mean...

Engraving Required?... you could just say "Do you want any engraving?", or "Engraving Needed?"

Choose whatever label suits you...

3 Apr 2008, 8:50 PM
#7
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

I completely agree. I was even thinking the same thing myself as I was setting it up. I still think it's the best way around the original issue though, so for now (until a validation mod is made!) I will just deal with customers who check Yes and forget to fill in the text.

Just a note, I decided to go with the checkbox (with only one value option: Yes!) instead of the radio button for the option, that way there's less on the page. If they want it, they can check the Yes! and if they don't, they can leave it blank.

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

3 Apr 2008, 8:53 PM
#8
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

If you choose checkbox, and give it only ONE option value, it will default to a radio button in your product_info_display screen.

Might as well go for radio buttons anyway - since that's what will display with just one option value.

3 Apr 2008, 8:56 PM
#9
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Here's a link to a page with an example of how I have it set up, in case you're curious. http://accessory-avenue.com/hbhcatalog/index.php?main_page=product_info&cPath=9_36&products_id=60 (For those that may read this long after it was posted, that link may look entirely different now!) The only thing I really have left to do is add an image to the typestyle option, but I'm trying to figure out the best way to have a small picture with the popup option (I know there are some mods, but I haven't checked into which one I need. If you have any suggestions, let me know!)

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

3 Apr 2008, 8:58 PM
#10
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

OOPS... NO...

You HAVE to have TWO values - YES and NO - becuase you need to attribute $4 to "YES" and $null to "NO", and make sure you make "NO" default.

If you have ONE option (YES) then everyone is forced to have engraving at $4. !

3 Apr 2008, 9:14 PM
#11
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

Well... if you look at that link, I only have the one checkbox option (Yes!) which is NOT checked by default and only charges the $4 if it IS checked. Try it out. Add it to the cart without the box checked (then delete it in the cart) and then do it again with the box checked. It seemed to work fine for me, with the correct pricing both ways.

The only thing I'm trying to figure out now is how to have the Please Choose option default in the typestyle without having to choose an option (I set it to "Used For Display Purposes Only" so that the customer HAD to choose one if they wanted engraving, but I guess that's another validation issue. I only want them to HAVE to check it if they DO choose to have the engraving. So I guess I will just take off the "Used For Display" bit.)

For the purpose of trying out the checkbox though, since there's no charge for the typestyle and it's currently set to "Used For Display Purposes Only", choose a typestyle and add it to the cart both ways (with the Yes! unchecked and then checked).

This is getting confusing!

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

3 Apr 2008, 9:22 PM
#12
celtickatt avatar

celtickatt

Zen Follower

Join Date:
Mar 2005
Location:
Tulsa, Ok
Posts:
174
Plugin Contributions:
0

Re: Charge For ANY Attribute Chosen, If Chosen (Not a Charge PER Attribute)

SIDE THOUGHT:

I changed the "Used For Display Purposes Only" option for the typestyle dropdown. Is there a way for me to see a list of which products I have given that specific attribute, so I can just go in and change those specific ones?

"You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus