Jump to content

change product combination after creation in PrestaShop 8.1.4


hogo20

Recommended Posts

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 by hogo20
clear the problem (see edit history)
Link to comment
Share on other sites

  • hogo20 changed the title to is it possible to change product combination attribute?

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? 

  • Like 1
Link to comment
Share on other sites

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

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

  • hogo20 changed the title to change product combination after creation in PrestaShop 8.1.4

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...