Jump to content

Number of products sold in homefeatured


Recommended Posts

Hi,

 

Not sure, I think you are asking us HOW TO right?

You want to keep a track of how much unity of this product you sold and display it? I'm quite confused with your post. It's not really a question neither an affirmation...Please be more specific.

 

Martin

Link to comment
Share on other sites

Okay....That's not the easiest thing to do. Simply put : The featured product module give an list of ARRAY that represents a product, each of them. These arrays are generated by Category.php (class), using the function getProducts.

 

I can't write you all the code since I don't need it (Free work ain't my type). But I can tell you what needs to be done :

 

You'll need to overide Category class and function getProducts to add the product number either in the SQL request (Best way for quality) OR call the parent function and add manually in PHP the count (Easier but can affect the performance whne you load a lot of products).

 

Hint for the mysql and php version : check or use ProductSale::getNbrSales($id_product).

 

Good luck with that.

Edited by Martin Uker K (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...