You'll first need to find the attribute_id value for 'status' for your Magento installation and replace 273 in this example.
The easiest way to tell is if you go into:
Admin > Catalog > Attributes > Manage Attributes
Then in the “Attribute Code” box, enter “status” then press “Search”. Click the attribute result “status” – then look at the digits at the very end of the URL …
In the code below (to be run via command line MySQL or phpMyAdmin), just replace %SKU% with your SKU identifier and use % as a wildcard or _ as a single character wildcard.
This will obviously apply to any other attribute, so just change the code as necessary.
enabled = 1 disabled = 2
After the MySQL above has run – you’ll need to let Magento take the reigns back a little to update the category indexes, this is quite straightforward, but a little time consuming.
Remove this line to disable all...
AND cpe.sku LIKE '%SKU%'
Login to your admin and go to System > Cache Management, the select Rebuild Catalog Index
- UPDATE catalog_product_entity_int cpei, catalog_product_entity cpe
- SET cpei.value = "2"
- WHERE cpe.entity_id = cpei.entity_id
- AND cpe.sku LIKE '%SKU%'
- AND cpei.attribute_id = 273
CommentsSubscribe to comments
You need to login to post a comment.