we dont want to show the product which go out of stock in the On-Sale Block option?
we dont want to show the product which go out of stock in the On-Sale Block option?
Hi ,
you can hide out of stock product from your store ( go to Settings -> General -> untick Show out of stock products )
if you need only for product showcase block (onsale block) then i think code modification will be require .
app/addons/bestsellers/schemas/block_manager/fillings.post.php
replace:
$schema['on_sale'] = array ( 'limit' => array ( 'type' => 'input', 'default_value' => 10, ), 'cid' => array ( 'type' => 'picker', 'option_name' => 'filter_by_categories', 'picker' => 'pickers/categories/picker.tpl', 'picker_params' => array( 'multiple' => true, 'use_keys' => 'N', 'view_mode' => 'table', ), 'unset_empty' => true, // remove this parameter from params list if the value is empty ), );
with
$schema['on_sale'] = array ( 'limit' => array ( 'type' => 'input', 'default_value' => 10, ), 'cid' => array ( 'type' => 'picker', 'option_name' => 'filter_by_categories', 'picker' => 'pickers/categories/picker.tpl', 'picker_params' => array( 'multiple' => true, 'use_keys' => 'N', 'view_mode' => 'table', ), 'unset_empty' => true, // remove this parameter from params list if the value is empty ), 'amount_from' => array ( 'type' => 'input', 'default_value' => 1, ), );
The clear cache, open block settings and you will see new input field with the ability to specify minimum stock value for the block items