still working on Magento here.
Currently I’m looking at the product page’s “view” block, and in particular the block that is tagged with product_type_data in the as attribute. Its type is catalog/product_view_type_<type>, where <type> can be simple, configurable, etc.
I get what it’s for: displaying the availability of the product as well as its price, and with downloadable products it also shows the downloadable samples. Great.
The layout XML of the Checkout module also adds a block under the layout referral name product.info.<something>.extra where <something> is the product type (simple, configurable, etc). It is called by its parent block as product_type_data_extra. I found out that the Cataloginventory module adds its own block to this block and located the possible templates in the templates/cataloginventory/stockqty/ folder (default.phtml and composite.phtml).
Questions:
What is the block called as product_type_data_extra for?
Why can’t I see the additions I make in the aforementioned template files, even when they occur outside the if block placed around all of its usual content?
Thank you.
P.S. I’m using Alan Storm’s Commerce Bug and it says the block is being instantiated and the template it mentions is indeed the template I located (templates/cataloginventory/stockqty/default|composite.phtml)
EDIT:
The first question is answered below, the answer to the second question is:
Additions to that template aren’t visible because the “Only X left” threshold is configured to be zero or lower than the stock quantity of the product you are looking at.
To be honest, it looks like this is a placeholder block, to be used if required.
If you look at the
layouts/downloadable.xmlyou will see it references a template file for that block. Indeed it’s one of the template files you find with Alan Storm’s Commerce BugFrom what I understand of the Magento methodology, this will be so you can display extra data for a product, from an extension, without having to change a skin’s template files