I want to set a default value of an attribute for all product.
相关问题
- Custom Attribute to Process info before a method i
- Magento 1.7.0.2 Index Management overwriting URL R
- Magento: Best way to avoid extension conflicts
- Magento Fatal error: Maximum execution error solut
- FlagsAttribute what for?
相关文章
- Get WooCommerce featured products in a WP_Query
- Passing static array in attribute
- Magento, translate validation error messages
- What other neat tricks does the SpecialNameAttribu
- Any way in Visual Studio to not break on throwing
- How can I type hint an attribute in Python 3.5?
- Magento API order id vs. increment id
- Unique constraint violation on Magento 1.4.0 to 1.
As stated here:- http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-attributes-custom-fields
So, I think it only applies for New products that you create after you create that attribute. Hence, the attribute's default value setting might not be applied to those products which were created before creating the attribute.
I had the similar issue and to solve it, I wrote the following code in the file where I want to display the attribute's default value:-
You can also solve the problem by doing a massupdate for all products. Go to the Manage Products paga and Select All followed by Update attributes.
You can do it in Attribute management
Admin panel - Catalog - Attributes - Manage Attributes
Select attribute - Properties - Attribute Properties - Default value
I had same problem before,when i added 11096 product(downloadable products) in my store then client told me to add new attributes in product so i create 1 attribute (Type is Yes/No) and set to attribute set. Now my problem is how can i edit all product and set that attribute yes or not.if i not set then value is null so i wrote few line code.
Please check this code may be it'll helpful to you.