Forums / Setting Up Categories, Products, Attributes / Disable Add-to-cart when Display-only Attribute is Selected

Disable Add-to-cart when Display-only Attribute is Selected

Locked

Views: 982

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
8 May 2010, 5:28 PM
#1
david_johns avatar

david_johns

New Zenner

Join Date:
Mar 2010
Posts:
5
Plugin Contributions:
0

Disable Add-to-cart when Display-only Attribute is Selected

I need a way to alert the user that they need to select a valid option when they try to press add-to-cart and a display-only attribute is selected. Currently it doesn't add the item to the cart, but does navigate to the shopping cart and doesn't explain to the customer why it didn't add the item to the cart. I'd like it to through a MsgBox with an error message or add an error message in red at the top of the page or something like that. I thought this might be part of the standard package when I saw the display-only option for attributes. That didn't do it. Then I saw the "Read Only option type - Ignore for Add to Cart" option and thought when you have it set to "0" it would actually not show the add-to-cart button when the selected attribute is display-only. It turns out that's not what it does apparently. Is there a way to do this without code modifications?

I'm using version 1.3.8a.

Thanks,
David

8 May 2010, 9:00 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Disable Add-to-cart when Display-only Attribute is Selected

Is there a way to do this without code modifications?
Basically, No BUT there is a proper way to make selecdting an attribute mandantory - by adding one additional such as "Please Choose" and mking it display only and default

https://www.zen-cart.com/tutorials/index.php?article=57

Zen-Venom Get Bitten