sakgiok / codwfeeplus

A prestashop module for implementing Cash On Delivery with a fee with a lot of options,
GNU General Public License v3.0
59 stars 20 forks source link

Assign an existing product ID #12

Closed Robur07 closed 3 years ago

Robur07 commented 3 years ago

Hi,

I´m using CODWFEEPLUS on prestashop 1.6, and now i´m moving to 1.7, on a new version of my store, from the start.

I have imported products from my old store... and now when installing codfeeplus it has created a new product id on the database, but i had one already, and i would have to import more products still, and I´m afraid some would overwrithe the new product ID created today.

Can I force codwfeeplus to take an existing product ID instead creating a new one when is installed?

Thanks!

sakgiok commented 3 years ago

The only way to assign an existing product id to the cod product is to open in the database, the "ps_configuration" table with a mysql browser (e.g. phpMyAdmin) and assign the new product id to the value "SG_CODWFEEPLUS_PRODUCT_ID".

Otherwise, you can just delete the new cod product that was created during the installation of the coswfeeplus, delete the old cod product as well (no actual need to do it, just to keep the database clear), import all the products you need and then go into the module config and press the "Reset COD Product" button on the top-right to recreate the cod product.