Try the Demo

Magento Forum

   
Is there an easy way to create attributes and apply to all products at once? 
 
welysson
Jr. Member
 
Total Posts:  3
Joined:  2012-04-22
 

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?

 
Magento Community Magento Community
Magento Community
Magento Community
 
AITOC
Guru
 
Avatar
Total Posts:  605
Joined:  2009-02-19
US
 

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.

 Signature 

AITOC Mods for Magento
Join AITOC on Facebook for exclusive deals

 
Magento Community Magento Community
Magento Community
Magento Community
 
Monty22
Guru
 
Avatar
Total Posts:  686
Joined:  2013-01-01
 

Hi Welysson,

To create an attribute:

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:

<?php

$productModel 
Mage::getModel('catalog/product')->load($productid);

$ingredients $productModel->getIngredients();

echo 
$ingredients;

?>

Monty
iLoveMage

Get 25% discount on all our Magento Extensions.

 Signature 

Get 15% discount on all our extensions Use code MON15 | Risk-free purchase with our 14 days Money Back Guarantee policy!

 
Magento Community Magento Community
Magento Community
Magento Community
 
redstage
Sr. Member
 
Avatar
Total Posts:  170
Joined:  2009-12-04
Hoboken, NJ
 

Hi!

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.

Add attribute to Multiple Attribute Sets

Come by the store and chat if you have any questions. 

Thanks!

 Signature 

For stable and cutting edge Magento extensions, check out the Redstage Extensions Store!

Having done work on over 200 Magento sites, Redstage is the most advanced and experienced agency in the industry.  Interested in working with us?  Check us out

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