Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How to Disable Add to Cart if no Attribute is Selected?

How to Disable Add to Cart if no Attribute is Selected?

Locked

Views: 8,520

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
11 Jul 2006, 7:43 AM
#1
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

How to Disable Add to Cart if no Attribute is Selected?

Hi, I have quite a no. of products with attributes. How can I advise a customer that s/he has not selected an attribute when they click on the "Add to Cart" button? I suppose a pop-up is not advisable since there are pop-up blockers. Any advise is much appreciated.

11 Jul 2006, 2:27 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Make at least one of the attributes required.

11 Jul 2006, 3:14 PM
#3
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Thank for your reply Kim, I suppose you are refering to the Attribute Flag: "Attribute Required for Text". What I did was:

  1. None of the attributes are selected as default
  2. Set the "Attribute Required for Text:" to "Yes" for 1 of the attribute
  3. Test by clicking on the "Add to Cart".

Unfortunately, I am still able to add the item to the cart without selected any of the attributes. Is there anything that I might have left out? TIA.

P.S. I read this posting but wasn't able to fully comprehend it. :cry:

11 Jul 2006, 8:17 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

Let's say you have Colors ...

Option Name: Colors

Option Values:
Red - sort order 10
Yellow - sort order 20
Green sort order 30
Select a color ... - sort order 0, Default, Display Only

What this will do is make the Option Value for the Colors:
Select a color ...

Be the Default (selected) option value, but not allow it to be added to the cart because it is marked Display Only

12 Jul 2006, 7:02 AM
#5
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Hi Linda, thanks for your clarification. I kinda understand the concept after reading it and another reply of your in this posting.

Correct me if I am mistaken. Your suggestion is more for the use of a dropdown rather than Radio buttons right? Coz I did as you recommended using radio buttons and the result looks a little funny. I had a default radio button called "Select Color" along with a number of radio buttons with different colors name. The "Select Color" radio button looked out of place :no:

Wld you mind elaborating on Kim's suggestion to make at least 1 attribute required? I tried that w/o much success.

13 Jul 2006, 3:49 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

Do you have an URL to this Product?

13 Jul 2006, 4:04 AM
#7
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Hi Linda, you can find the product at this URL.

I have since removed the default "Select Color" radio button because it's a live site. Thanks for your time.

13 Jul 2006, 4:10 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

If you put back the Option Value ...
Select Color

And added it as an Attribute to the Product and marked it:
Sort Order 0
Display Only YES
Default YES

Then it would be the selected option ...

If the customer hits add to cart ... then they get yelled at because Display Only attributes cannot be added to the cart ...

This prevents:
1 No Selection

2 Incorrect Selection

13 Jul 2006, 8:33 AM
#9
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Got it! :thumbsup:

Thanks for your time and effort Linda. I appreciate it much.

If you don't mind, I am facing an issue in getting the Special Price to work. Pls. help. The posting is accessible here. Thank you once again.

13 Jul 2006, 2:47 PM
#10
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

I hope I am not hijacking this thread, but I have a similar situation. I have products with a lot of options and attributes, see http://www.photoimprints.com/custom-ceramic-mug-white-11-ounce-p-2.html for example. I have it set up so that it shows "Please Select" in all the dropdowns as a Display Only. So, if you forget one, yes it will prompt you to fix it before you can add to cart, but.... it reloads the page and you lose all your selections in the dropdowns. I have already had complaints about this. Is there any way around this?
Thank you in advance

13 Jul 2006, 2:50 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

I was noticing that little obnoxious issue myself ... :blink:

Radio buttons are smart ... but the dropdowns are not too bright ...

We will be looking into this issue ...

UPDATE: This was fixed in v1.3.7/v1.3.8

23 Apr 2007, 1:16 PM
#12
cjjune avatar

cjjune

Zen Follower

Join Date:
Apr 2007
Posts:
139
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Hi Ajeh,

I have this design as shown on attachment.

As the user click Yes, the cart should prompt buyer to fill in the text fields. How do to achieve this? As for now when buyer click yes and then add cart, the system will prompt to fill in the text section.

23 Apr 2007, 3:29 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

Dependant attributes are not part of Zen Cart at this time ...

23 Apr 2007, 3:49 PM
#14
cjjune avatar

cjjune

Zen Follower

Join Date:
Apr 2007
Posts:
139
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Well any idea we can work around this by not changing the codes? Maybe mark the text as a required field and the buyer can just enter a space? What do you think?:blush:

23 Apr 2007, 4:12 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

That would only work if you split the Product into 2 Products where 1 is personalized and the other is not ...

The required Text is required or it is not ... it would not know when "not" to be required ...

23 Apr 2007, 7:40 PM
#16
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

So are you saying a text attribute can not be set as 'required'? That's what I'm trying to figure out how to do.

23 Apr 2007, 11:00 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

When adding the Attribute ... there is a setting for:

Attribute Required
for Text:
No Yes

24 Apr 2007, 1:35 AM
#18
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: How to Disable Add to Cart if no Attribute is Selected?

Maybe I'm misunderstand something. When I add the attribute (a text field) and select yes as the Attribure Flag for Attribute Required for Text: I can still add the item to the cart with the field left blank.

I want the field to be required, what am I doing wrong?

24 Apr 2007, 2:24 AM
#19
ajeh avatar

ajeh

Oba-san

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

Re: How to Disable Add to Cart if no Attribute is Selected?

Check if this is a problem with your template by switching to Classic Template ...