I am setting a XML to use in Google Shopping and I just realized that there is an attribute which Google Shopping requires and I don\’t have it in my products. The problem is that we have already 6000 SKU\’s in Magento, enter one by one to set this new attribute would be a lot hard.
The good thing is that the Value of this attribute will be equal to all Products
Is there a way to create a new attribute an set the value to all products in an easier way?
Hi welysson,
At first you create your missing attribute and assign it to each and every attribute set used by your products. Once that’s done, open Catalog > Manage Products > select desired products by checkboxes and choose Update Attributes from the Actions menu (to the left of Submit button). From here you will be able to assign the required value for all the products at once.
1. Select “Attributes” -> “Manage Attributes” from the “Catalog” menu in the Magento admin panel.
2. Click “Add New Attribute”.
3. Enter an attribute code – we’ve used “ingredients” here.
4. Select the scope – we’ve selected “global” but you could select store as well.
5. Select the attribute type – we’ve selected text area because we want the user to be able to enter free-form text (we’re using the wysiwig editor for Magento so they’re actually entering html).
6. Go to the “Manage Label/Options” tab and enter a label to be used for the new attribute.
7. Save the new attribute.
Attribute Sets
Once you’ve added the new attribute, you have to add it to the attribute set that you use for your products. (If you have more than one attribute set for your products, you’ll have to add it to all of the sets you want it to appear in).
1. Select “Attributes” -> “Manage Attribute Sets”
2. Select your attribute set (if you haven’t created new attribute sets, it’ll be called “Default”)
3. Drag your new attribute from the list of “unassigned attributes” on the right into the list on the left (where you drop it will be where the admin will see it)
4. Save the attribute set.
Using the new attribute in the page
So, that’s the easy part. Actually, using the attribute in the page is pretty easy, once you’ve got the right syntax! Assuming the id of the product you are using is in $productid then:
If you’re managing a store with a bunch of attribute sets, adding a new attribute to each set can be a pain. I’ve seen stores with 100 different attribute sets and adding a new attribute to each one can take hours. If that sounds like your problem, check out our extension that allows you to very quickly add an attribute to all of your attribute sets in seconds.