Magento Forum

   
Update all of the products to not allow gift messages
 
hez
Sr. Member
 
Avatar
Total Posts:  103
Joined:  2008-02-02
 

Hi - I set all my products to allow gift messages but have decided I don’t want that.

I’ve had a look in the database but can’t seem to locate it. 

Is there a way to do this in the Admin panel - or could you just point me in the right direction for where it’s loaded in the database?

Also - is there a database schema anywhere?

Thanks,
Heather

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

If you look at eav_attribute table, you’ll see that 435 is attribute_id for the attribute_code = ‘gift_message_available’

So you should have a look into changing values for rows having attribute_id=435 in catalog_product_entity_varchar table for the products/store (=entity_id / store_id) that you wish to change.

This is not tested, please backup first before doing any changes smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
hez
Sr. Member
 
Avatar
Total Posts:  103
Joined:  2008-02-02
 

Fab!  That worked a treat.

Just FYI for those who come later and might want to do the same thing

1. Backup your database
2. Run this query - UPDATE `catalog_product_entity_varchar` SET `value`=NULL WHERE attribute_id=435

Thanks Heaps - That saved me a mountain of time.

Heather

 
Magento Community Magento Community
Magento Community
Magento Community
 
SeL_
Magento Team
 
Avatar
Total Posts:  1140
Joined:  2007-10-10
Paris, France
 

Another way to do it (only from version 0.7.15480) without MySQL command.
Go to admin panel: Catalog > Manage products
Click on ‘Select All’ link on top of the table. You should see ‘105 items selected’ if you have 105 products in your database.
Then in Actions dropdown menu, select ‘Update attributes’. Submit and wait.
On the attributes page, check ‘Allow Gift Message’ change checkbox and select No. Save.
That’s it.

You may have to do it for your default values and for your store (don’t forget to check the dropdown menu on top left of the page).

 
Magento Community Magento Community
Magento Community
Magento Community
 
hez
Sr. Member
 
Avatar
Total Posts:  103
Joined:  2008-02-02
 

Thanks SeL!

I’ll give that a go if I need to change something similar in future. 

H

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top