Jump to content
PanMS

[SOLVED] Add number of sold items counter on the product page

Recommended Posts

Hello.

I need to add a counter of sold items on the product page. I have already found this two methods for achieving this goal, but both of them are not compatibly with 1.5 version:

 

1) http://alvinjiang.bl...splay-sold.html

This method suggests to find two small lines and add some code before them:

include_once(dirname(__FILE__).'/init.php');

in product.php

 

and

 

<p class="price">

in product.tpl

 

But there is no such lines in 1.5 version.

 

2) http://www.prestasho...counter-module/

this modul also needs some coding and requests for the lines:

<!-- Out of stock hook -->
<p id="oosHook"{if $product->quantity > 0} style="display:none;"{/if}>
{$HOOK_PRODUCT_OOS}
</p>

 

and

'HOOK_EXTRA_RIGHT' => Module::hookExec('extraRight'),
'HOOK_PRODUCT_OOS' => Hook::productOutOfStock($product),
'HOOK_PRODUCT_FOOTER' => Hook::productFooter($product, $category),

 

in product.tpl

And there is no such lines also.

 

I have even thought about modifying the "products in stock" counter on the product page by adding a simple arithmetics (like if there was 1000 items in stock in the beginning then the number of sold items will bw 1000-"items in stock") but this was also unsuccessful because I did not manage to find the parameters to change in the product.php (and how to code this too).

 

Can you please suggest me something.

Thank you

Edited by PanMS (see edit history)

Share this post


Link to post
Share on other sites

Good morning,

 

If you are looking for a module that shows how many products have been sold on each product page then click HERE, it is good for PS 1.2 to PS 1.5 and it is free.

 

Hope this helps

 

Paul

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More