Duplicating options and products

Important to remember

The most important part of the options' settings is Field slug.

The two most essential concepts:

1) slugs are unique across the site; you cannot have two options with the same name; when you try to save a new option with the existing slug name, it will display the error and will suggest an alternative name;

2) you have to save option with a new slug to actually make this option operational; it means, when you click "Save" button in the module's settings modal window all settings including the unique slug are getting saved to DB and the option becomes operational. After the first save setting "Field slug" will be disabled for editing.

Duplicating options

Each option is saved inside database (DB) by its unique name/slug. By doing sync/unsync you connect/disconnect an instance of the option to/from the options' setting saved inside DB. When the option is synced and you make any changes in its settings and save them this operation actually overwrites option's data. Individual option's data ONLY! Such operation does not modify any other instances of same option in any other products! When you go to another product and open its builder mode and reviewing its builder content - you are reviewing option's instance data. It may not be the same as the data stored in DB for this option! So, by changing settings and saving them you actually overwrite this option and all other instances in any other products may become broken! Attention!

Creating a new instance of the option

1) Add new option by dragging and dropping it from the builder panel to the builder content.

2) Open options' settings, on General tab (the first one) choose connect or duplicate, then click on 'blue arrow' icon to fetch the list of options' of the same type stored in DB.

3) Click 'Submit' button.

Done! You successfully re-used stored in DB option by creating its new instance in another product!

The following procedure is a proper algorithm of re-using (i.e. using again same option, by creating its new instance in another product) the option when you want to edit the option and/or when you want to change the option's field slug!

2) Change the option's slug as you usually do. Also change any other settings you like.

3) Save the settings.

Duplicating products

WooCommerce has its own 'duplicate' functionality. By using it you can duplicate the product. But sometimes it just fails and did not copy over some meta fields, like NOVs or maybe something else. So, I would suggest using Duplicate and/or Import/Export configs functionalities available in the pro version of Uni CPO.

👉 Duplicate and Import/Export configs functionalities are available in the PRO version in General Settings modal window, the fourth tab.

By duplicating product's configuration you are copying over the new product all the Uni CPO related data. Everything. So, the new product receives the exact copy of the same configuration used in the chosen product. All options' instances are connected and operational. All NOVs, formula conditional logic etc - everything is copied.

By importing product's configuration you basically do the same as per duplicating, but this time you do not choose another product that is existed in your site, but use config's data from the file. Another difference is that all options' instances may not work as you may not have them saved to DB on the site where you do import. That's why I would suggest manually sync all options.

Last updated