How can we show the newest products on each category page for the that category only and not all the categores.
Do we need to add diff blocks for each diff category or is there some way to pass the category to each category page block.
How can we show the newest products on each category page for the that category only and not all the categores.
Do we need to add diff blocks for each diff category or is there some way to pass the category to each category page block.
You can use the block with Similar filing. But small modification is required. Open the app/addons/bestsellers/schemas/block_manager/blocks.post.php and replace:
$schema[‘products’][‘content’][‘items’][‘fillings’][‘similar’] = array (with
‘params’ => array (
‘similar’ => true,
‘request’ => array (
‘main_product_id’ => ‘%PRODUCT_ID%’
)
)
);
$schema[‘products’][‘content’][‘items’][‘fillings’][‘similar’] = array (Then clear cache
‘params’ => array (
‘similar’ => true,
‘request’ => array (
‘main_product_id’ => ‘%PRODUCT_ID%’
),
‘session’ => array(
‘cid’ => ‘%CURRENT_CATEGORY_ID%’
)
)
);
Will it show the newest products which have gone live after approval ??
Will it show the newest products which have gone live after approval ??
Sure, the system will show newest products of the current category
WE donot have the code you mentioned
$schema['products']['content']['items']['fillings']['bestsellers'] = array ( 'params' => array ( 'bestsellers' => true, 'sales_amount_from' => 1, 'sort_by' => 'sales_amount', 'sort_order' => 'desc', 'request' => array ( 'cid' => '%CATEGORY_ID' ) ), );$schema[‘products’][‘content’][‘items’][‘fillings’][‘on_sale’] = array (
‘params’ => array (
‘on_sale’ => true,
‘sort_by’ => ‘on_sale’,
‘sort_order’ => ‘desc’,
),
);
The file is as above.
The version is MVE 4.2.4
For old version try to use the Newest filling for the block. Just open the app/schemas/block_manager/blocks.php file and replace:
‘newest’ => array (with
‘params’ => array (
‘sort_by’ => ‘timestamp’,
‘sort_order’ => ‘desc’,
‘request’ => array (
‘cid’ => ‘%CATEGORY_ID%’
)
)
),
(!) Not tested
‘newest’ => array (
‘params’ => array (
‘sort_by’ => ‘timestamp’,
‘sort_order’ => ‘desc’,
‘request’ => array (
‘cid’ => ‘%CATEGORY_ID%’
),
‘session’ => array(
‘cid’ => ‘%CURRENT_CATEGORY_ID%’
)
)
),
Can we create a separate block for newest items in a category like this below: Will it work or some other code is also required ?
'newest_in_category' => array ( 'params' => array ( 'sort_by' => 'timestamp', 'sort_order' => 'desc', 'request' => array ( 'cid' => '%CATEGORY_ID%' ), 'session' => array( 'cid' => '%CURRENT_CATEGORY_ID%' ) ) ),
Yes, additional filling can be added with the module. But more complex changes are required in this case.
'newest' => array ( 'params' => array ( 'sort_by' => 'timestamp', 'sort_order' => 'desc', 'request' => array ( 'cid' => '%CATEGORY_ID%' ), 'session' => array( 'cid' => '%CURRENT_CATEGORY_ID%' ) ) ),
This didnot work
PM me temporary FTP access so that we can check the issue.
P.S. Did you clear the cache?
PM me temporary FTP access so that we can check the issue.
P.S. Did you clear the cache?
This is a php code change does it require to clear cache?
This is a php code change does it require to clear cache?
Right! As all schemas are cached, it is required to clear cache