I have a configurable product configurable on two attributes, colour and inventory_site. The first is a customer related attribute while the second is a backend admin attribute for inventory control at various shipping sites from which we ship product. This attribute is irrelevant to a customer and should be hidden from them. Unfortunately Magento displays the inventory attribute on the customer viewable product page even though the "visible on product view page on front end" is set to "no". If this setting does not hide this attribute, what does it do? Is there an alternative way to accomplish what we are trying to do?
2 Answers
Depending if you want to manage this information of the product in the view product, programmatically and customize the view.phtml or wherever product is called with Catalog Product View. Magento automatically will include in obj created. For example create a new Attribute then in the view check calling $_product->getData() in a array an print in the page or if you running your local with PhpStorm + xdebug add a break point there and see if the information is there.
Best, Alejandro.
When you create a configurable product, you are telling magento which configurations that you want the customer to select. These are the "root" of this configurable product. So by picking inventory_site as one of the configurable items then sure enough the customer is going to need to see it so that they can select a value for it. When you create a configurable product, in this instance, only select color, then the customer will be able to select color, but not inventory_site, and inventory_site will obey your visible on product page option. By making it a "root" part of the configurable product it will override the "view on product page" variable.
-
I understand but still consider this a flawed limitation in the utilization of this feature. Customer selection is not the only reason for attributes in a configurable product. Inventory control, especially when inventory is distributed to distinct locations other than a central warehouse, is an area that Magento is very weak. There are work arounds but they are not very elegant. Probably a consideration for inclusion in a future Magento release.– HowiCommented Jun 3, 2016 at 21:43