1

I have a configurable product that has a few custom options.(i.e. custom text, font color) The product can be ordered with custom text on it and custom font color. What I am trying to achieve is, if the color of the product is black, I want to hide 'black' from the font color custom options drop down list.

Basically I need to set up some rules so that the customer does not order a dark colored product and also attempts to have a dark font color printed on it. What would be the best direction for me to take on achieving this?

1
  • your best bet for this is most likely a small javascript script to check for user selection of product color and then change the available font color options based on that Sep 19 '14 at 16:12
0
  1. Get all the labels of color attribute for the product (as an array) [http://ka.lpe.sh/2012/09/13/magento-get-product-attribute-select-option-idlabelvalue/]
  2. Get all the custom option labels for the product (make sure this labels matches color attribute labels) (as an array) [https://stackoverflow.com/questions/2829164/how-to-get-custom-options-programmatically-in-magento]
  3. Write a jquery which triggers when color attribute value is changed, observe the current color label and hide same in custom option label. [https://stackoverflow.com/questions/6600281/jquery-if-select-option-equals-value-remove-value-on-second-select]

Make sense?

1
  • 1
    yes! thank you for providing links , i'm going to make an attempt.
    – iPetey
    Sep 19 '14 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.