Product option dependency

Ali Heristchian asked on November 23, 2014 15:29

Hi, Consider size and color options for products. There is a product with Medium/Green options but not Small/Green. As I know, Kentico 7 can't handle dependency between two different options and unfortunately customer can choose Small from size and Green from Color. How can I create this functionality?

Correct Answer

Josef Dvorak answered on November 25, 2014 10:34

Hi Ali,

The only way to achieve this in Kentico 7 is via customization. The best location is probably in AddProductToShoppingCart method of ShoppingCartItemSelector Control, which serves as add to shopping cart button. Here you can include your custom logic that validates the ProductOptionsParameters before allowing adding to shopping cart. You may of course want to add a similar validation directly to the shopping cart logic.

Kentico 8 comes with this feature out of the box with the new Variants feature. You could save yourself the work on this customization by upgrading your project.

1 votesVote for this answer Unmark Correct answer

Recent Answers


David van Geel answered on November 24, 2014 13:31

Hi Ali,

Maybe you should take a step back and look at how you are setting up the options. Conceptually - and without knowing a lot about the underlying data- I suggest you try to look at the combination of the two criteria as a option. So instead of the options green, medium and small you get the option medium/green.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.