hogo20 Posted February 26 Share Posted February 26 (edited) hello everyone I create a product combination: shirt(color:red) I need to modify this combination as: 👉shirt (color:red, design: mountain) 👈add new attribute or 👉shirt(color: green) 👈Edit an existing attribute (I've already prepared following features: color :red, blue, black,... size: S, M, XL,... design: mountain, fox, sea,...) (I don't like to delete previous combination and creare new for many reason) Thank you for hear me. Edited March 6 by hogo20 clear the problem (see edit history) Link to comment Share on other sites More sharing options...
Andrei H Posted February 26 Share Posted February 26 Hello, The expected outcome would be to replace the 'size' attribute with the 'design' one in your combination? Or just add the 'design' one to the existing combination but without removing the 'size' one? Do you want this change for all the product combinations? Or only for certain products? 1 Link to comment Share on other sites More sharing options...
hogo20 Posted February 27 Author Share Posted February 27 hello dear I want to replace the design instead of the size (remove size:XL and add design: mountain) This is for a specific product only. For other products, I want to substitute another type of feature. I noticed that it is not possible to edit the created combination in PrestaShop. In such cases, the previous combination should be deleted and a new combination should be created. This is not a good thing. Link to comment Share on other sites More sharing options...
Andrei H Posted February 27 Share Posted February 27 Hello, Indeed, PrestaShop does not let you edit the combinations, only to add new ones. A module would be best fit in this situation, but unfortunately I'm not aware of any. You can also achieve this with some database queries, but these will require manual work. There are two options: 1. Manually swap the attributes (S -> mountain, M -> fox, XL -> sea etc.). This can be achieved with a SELECT query and an UPDATE query for each swap. It might take a lot of time depending on how many swaps you need to perform, but it will get the job done. 2. Create a stored procedure. You input the product ID, the attributes that need to be swapped and the new attributes and the stored procedure will loop through the values inputted and perform the updates. This one can significantly reduce the time, but it requires more time to build the initial code, as it is not that simple as a SELECT/UPDATE query. If you want, I can provide more details into the above and maybe provide some code examples as well. Link to comment Share on other sites More sharing options...
hogo20 Posted February 28 Author Share Posted February 28 Hi. Good time. As you say, the first option is not what I want. As for the second option، I don't know what you mean. Should the module be built for this? 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