Jump to content

Exclude out of stock from bestsellers-block?


Recommended Posts

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 by thepan (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...