midana Posted April 21, 2015 Share Posted April 21, 2015 How can I exclude products that are out of stock from the bestsellers-block? Link to comment Share on other sites More sharing options...
thepan Posted April 21, 2015 Share Posted April 21, 2015 That would require some code modification. But it could be a good feature for the module. I might just add it on git hub tonight and post result here. Link to comment Share on other sites More sharing options...
midana Posted April 21, 2015 Author Share Posted April 21, 2015 Would be awesome!! Link to comment Share on other sites More sharing options...
midana Posted April 23, 2015 Author Share Posted April 23, 2015 Where can I find it? Link to comment Share on other sites More sharing options...
thepan Posted April 23, 2015 Share Posted April 23, 2015 (edited) I spend some time investigating how to solve this. First of all I realised that the bestsellers shown on the homepage in the tab next to the "New Arrivals, Popular and Specials" tabs is not feeded by the blockbestsellers module. For the rest someone needs to figur out how to filter out "OUT OF STOCK" products in this if statement here: LINK I would introduce a new switch in the backoffice tab here: LINK Something like this array( 'type' => 'switch', 'label' => $this->l('Display out of stock products'), 'name' => 'PS_BLOCK_BESTSELLERS_DISPLAY_OUT_OF_STOCK', 'desc' => $this->l('Show out of stock products in the bestseller block'), 'is_bool' => true, 'values' => array( array( 'id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled') ), array( 'id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled') ) ), Just lacking time this week. Will work on it as soon as if no one else does. Edited April 23, 2015 by thepan (see edit history) Link to comment Share on other sites More sharing options...
midana Posted April 23, 2015 Author Share Posted April 23, 2015 Wonderful! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now