X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   General questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=66)
-   -   Product Options (https://forum.x-cart.com/showthread.php?t=76819)

Tronware 02-08-2019 01:22 PM

Product Options
 
:D/ :D/ I wanted my customers to select a Product-Specific attribute before they add the product to the cart. If the Customer adds the product to the cart without selecting an attribute. I want an alert saying "Please choose a product option". Below used to be a code that I would in old Version before XCart 5.

I used product options JavaScript enhancements which can be set on the same product -> Product Options tab in admin area. For example let's say you have an option named Test, in this case you may use the following enhancement:

Code: text
if (product_option('Test').selectedIndex == 0) {
alert("Please choose a product option");
return false;
}
return true;

Just wondering how I would be this to work with XCart 5?:D/


All times are GMT -8. The time now is 03:49 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.