X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   How to link 2 attributes together (https://forum.x-cart.com/showthread.php?t=71124)

juancho 02-04-2015 07:54 PM

How to link 2 attributes together
 
Would it be possible to link one attribute to another based on the option selected in the first one?

For instance. In the example at the bottom part of http://kb.x-cart.com/display/XDD/Managing+attribute+values

The "Cotton Solid Bath Towel" has 2 attributes:
1) monogram this item?
2) Monogram text

However the second attribute only makes sense if the first one is selected. A solution could be to display the second only when the first one is selected. Any ideas how to do it?

I don't think that the module "product variants" can be used in this situation.

Thanks

qualiteam 02-04-2015 10:00 PM

Re: How to link 2 attributes together
 
There is no such a feature in the "stock" X-Cart 5. However, you can create a custom module that adds javascript hiding the second attribute when the first option is selected.

juancho 02-05-2015 04:24 PM

Re: How to link 2 attributes together
 
I see that Tony has posted a tutorial on how to modify the logic of the cart:
http://kb.x-cart.com/display/XDD/Forcing+product+quantity+while+adding+to+cart

In my case, what would the JS look like?
Thanks


All times are GMT -8. The time now is 10:24 AM.

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