My requirement: display newest products on product details page from current product's main category. Basic idea is, If a user is viewing any product so it will be more relevant for him to few newly added product in same category.
I have created one Newest block, with Block content - Products, Filling - newest, Apparence - multicolumn on Product Page block.
Result : it is showing newest product added in store regardless of category.
Now when i created same block on category page, it is working perfect it is showing newest product of current category only. That is what i want for product details page (display newest products of current product's category)
I have tried to check it's code and found this file schemas\block_manager\structure.php, it is defining parameters and scheme settings for blocks.
$schema = array (
'products' => array (
'fillings' => array (
'newest' => array (
'params' => array (
'sort_by' => 'timestamp',
'sort_order' => 'desc',
'request' => array (
'cid' => '%CATEGORY_ID%'
in this code it is passing parameters for newest filling and it is assigning category id here don;t know how %category_id% works. But as it is assigning it in 'Request' array so I assume it is trying to access query string cid variable, and as it is available on category page on url, so it is working perfect and showing newest products only from current category. But cid variable is not available on product details page in Request array so it is showing last added new products.
So now is there any way to set any parameter for product page to display newest products from same category?I have tried to add a new filling but as I am not aware what to pass in cid variable how to get value of current product, not able to go further?
Any idea how to do it?
[b]Update: Post moved to new forum - [url=“How to: Set newest product filling on any particular category? - Developers' Corner - CS-Cart Community Forums”]How to: Set newest product filling on any particular category? - Developers' Corner - CS-Cart Community Forums