Re-creating an Attribute

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.

  1. 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.
  2. Create an export of your products from System > Import/Export > Export.
    1. In the export screen, select “Products” as the “Entity Type”
    2. Select “CSV” as the “Export File Format”. The attributes required are SKU and package_id in this instance.
    3. Click “Continue” and the CSV file will be generated.
  3. 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.
    1. In your database edit the eav_attribute table and change `is_user_defined` to ‘1’ for `attribute_code` ‘package_id’
  4. Navigate to Catalog > Attributes > Manage Attributes and select the package_id attribute.
  5. Click “Delete Attribute”
  6. Follow this guide to re-run SQL. You will need to delete the resource, not roll it back.
  7. Check to ensure that the attribute has been re-created as per step #4
  8. Re-import the CSV file from step #2
    1. Navigate to System > Import/Export > Import
    2. From the Import screen ensure that “Entity Type” is set to “Products” and “Import Behaviour” is set to “Append Complex Data”.
    3. Click “Browse” and choose the CSV file that was exported earlier in this guide.
    4. 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!
  9. Ensure that all of your products have been re-assigned to their corresponding shipping group.

 

0 votes

Leave a Reply

Featuring WPMU Bloglist Widget by YD WordPress Developer