NB: This article requires an understanding of SQL for backing up the database and updating a table.
In this article we will go through the steps for re-creating an attribute that has been created by a WebShopApps extension. This example will use package_id, which is the shipping group attribute created by Product Matrix.
- Take a backup of the database. Although not necessary for this guide we do strongly recommend doing so prior to modifying the database for any reason.
- Create an export of your products from System > Import/Export > Export.
- In the export screen, select “Products” as the “Entity Type”
- Select “CSV” as the “Export File Format”. The attributes required are SKU and package_id in this instance.
- Click “Continue” and the CSV file will be generated.
- Some attributes (such as “warehouse” in Dropship) will need to be set to user-defined, otherwise the attribute cannot be deleted. This is not the case for package_id.
- In your database edit the eav_attribute table and change `is_user_defined` to ‘1’ for `attribute_code` ‘package_id’
- Navigate to Catalog > Attributes > Manage Attributes and select the package_id attribute.
- Click “Delete Attribute”
- Follow this guide to re-run SQL. You will need to delete the resource, not roll it back.
- Check to ensure that the attribute has been re-created as per step #4
- Re-import the CSV file from step #2
- Navigate to System > Import/Export > Import
- From the Import screen ensure that “Entity Type” is set to “Products” and “Import Behaviour” is set to “Append Complex Data”.
- Click “Browse” and choose the CSV file that was exported earlier in this guide.
- Click “Check Data”. If all is ok, continue to import.
- If products are not found, check the CSV that was exported. The SKU may have been affected by the export. Preceding zeroes, for example, may have been omitted.
- If the import errors, try consolidating the CSV to only the SKU and packge_id columns. Be sure to make a copy of the CSV first if you do!
- Ensure that all of your products have been re-assigned to their corresponding shipping group.