kuch Posted May 27, 2020 Share Posted May 27, 2020 (edited) Hello, I have several products in the store, classic template. Each of them has several combinations based on the color attribute. I added an additional value for the color attribute - "Custom Color" and for the product in the Options tab I added a field in Customization. There is a field next to the product to be filled in by the customer. The idea is to show this field only if the customer has selected a "Custom color" from the color list. In the /themes/classic/templates/catalog/_partials/product-customization.tpl file I added: Instead {if! $ configuration.is_catalog} I added {if! $ configuration.is_catalog && $ product.attributes[1].id_attribute == 33} 33 is the id of my "Custom Color" in the attributes. Now when you click the custom color, the product combination switches and the customization box appears. Similarly, after changing to a different color, the field disappears. I could leave it like that and in total it would fulfill the function but it is known that customers are extremely smart and problems may arise, e.g. 1. After selecting "custom color", the customization box appears. The customer enters there what color he would like. Saves the customization. Switches to a different combination (color). The customization field disappears but still has the customer value assigned. After adding to the basket, one of the standard colors will appear, but with a description that should be only with the custom one. Can I somehow force this customization field to be cleared after switching to another product combination? 2. I would like to select the option that this customization field should be required, but when I do it, it becomes required for the entire product, so also other combinations (with no customization field visible). The product cannot be added to the cart because it is waiting for the adjustment value. Is there any trick that the customization field is required only for the selected attribute / combination? Edited May 27, 2020 by kuch (see edit history) Link to comment Share on other sites More sharing options...
drchad Posted August 4, 2020 Share Posted August 4, 2020 Hey there, wondering if you ever found a solution to this problem?? I'm having the exact same issues and wondering if there is a fairly easy fix. Thanks! Link to comment Share on other sites More sharing options...
JaimeAQ Posted March 17, 2021 Share Posted March 17, 2021 Hello! I'm interested too if there is a way to do this. It certainly is a feature that I would like to have. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now