1

At the moment there seems to be no UI / function for changing the product type for an existing product?

I see theres a typeId column in the products table. Would it be as simply to change this? Would this cause any issues elsewhere?

1

I personally think mucking with the schema here is bound to get you in trouble. Very easy to miss something.

If you don't have much data in yet, simply start again, and chalk it down to learning/experience. (Personally I think there should be a 'Start This Way' page in the Commerce docs that emphasises Data Modelling for product types is where you should begin!).

If you do have a lot of data in, best to export & then re-import your data using e.g. FeedMe - https://sgroup.com.au/plugins/feedme/getting-started/introduction

(You will need the Pro version which support Products)

| improve this answer | |
  • We can easily change entry type of entry and nothing says that it is something bad. Changing product type would be the same. – piotrpog Oct 22 at 1:01
0

Assuming this is because you've got a ton of products already setup?

There are productTypeId columns in other tables you'd want to consider as well. craft_commerce_discount_producttypes, craft_commerce_producttypes_i18n, craft_commerce_producttypes_shippingcategories, craft_commerce_producttypes_taxcategories, craft_commerce_sale_producttypes just from a quick scan of the schema.

As always, make sure you backup your database first and test thoroughly afterwards.

| improve this answer | |

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.