add attribute in product information -> Inventory tab

痞子三分冷 提交于 2019-12-11 04:08:35

问题


Hey, I just realise how easy is to add attributes to the form products in ADMIN, and its working perfectly. So similarly to setting attributes for General, Prices, Meta Information, Images, Recurring Profiles, Design and More Information, how can I add an attribute to Inventory form?

Thanks in advance for any help.


回答1:


For me (in Magento v 1.3.2.4) creating attributes the usual way (Catalog>Attributes>Manage Attributes) didn’t work in this case, as the value for that attribute didn’t get saved. In order to be able to save it I had to create this attribute in database table ”cataloginventory_stock_item”.

Only then the value is saved for each product.




回答2:


Unfortunately, the Inventory form is not dynamic like others, and you can't just add an attribute to this form.

If you are good with Magento programming, than you can play with it's block: app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php

and with it's template: app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml



来源:https://stackoverflow.com/questions/5079549/add-attribute-in-product-information-inventory-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!