Jump to content

Adding attribute stock to a module


Recommended Posts

Hello all,

 

I've recently installed a module that allows the user to select product attributes straight from the home page. I'm using it so the user can select the size of the product and add to cart which is nice because by default having an add to cart button on products on the homepage or category is pretty pointless and it forces them to select the default size.

 

I've installed the module and it all works great however it displays all available attributes even if they aren't in stock. I want to add an extra if statement that checks if the attribute has a stock value greater than 0 before displaying the attribute but as far as I'm aware the module doesn't pass this data to any of it's arrays. I've managed to find the overall product quantity but not the quantity of each attribute. I'm assuming I need to modify a controller to allow this information to be picked up but I'm unsure how that can be done. If I can get it to show up through the module I'm certain that I can figure out the rest  but I'm not very confident with playing around with the controllers so if anyone can shed some light on this it would be greatly appreciated.

 

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...