hardcoded version of the ecom 'Product' block
Permalink
I can see many examples of the AutoNav block hardcoded with is options explained.
This is probably the best exmaple the AutoNav :http://c5blog.jordanlev.com/blog/2012/04/hard-coded-autonav-options...
I would like experiment with a hardcoded version of the ecom 'Product' block.
So... I think it start something like this.....
Looking in the blocks/product/controller.php some of the options appear to be
but I'm not sure on the other options and how to actaully make it work - Does anyone have a confirmed working bit of code?
Many thanks if you can help
-Paul
This is probably the best exmaple the AutoNav :http://c5blog.jordanlev.com/blog/2012/04/hard-coded-autonav-options...
I would like experiment with a hardcoded version of the ecom 'Product' block.
So... I think it start something like this.....
$showproduct = BlockType::getByHandle('Product'); --more options here-- $showproduct->render('view');
Looking in the blocks/product/controller.php some of the options appear to be
displayPropertyOrder displayName displayDescription displayDiscount displayDimensions displayQuantityInStock displayPrice displayImage (need to set dimensions?) displayQuantity maybe: hideSoldOut displayLinkToFullPage hideIfSoldOut displayAddToCart
but I'm not sure on the other options and how to actaully make it work - Does anyone have a confirmed working bit of code?
Many thanks if you can help
-Paul