Is it possible to print out how many times product has been sold in front end product details page?
If yes I would wish to have condition if in stock > 1 then print sold amount.
Thank you
Is it possible to print out how many times product has been sold in front end product details page?
If yes I would wish to have condition if in stock > 1 then print sold amount.
Thank you
Is it possible to print out how many times product has been sold in front end product details page?
If yes I would wish to have condition if in stock > 1 then print sold amount.
Thank you
Hello!
Yes, it is possible. You need to use the cscart_order_details table: sum amount column using product_id from request. What about In stock condition you can use:
{if $product.amount > 1}
Thanks but this is not much helpful to me :)
Note if the Bestsellers module is enabled, this code should work
{if $product.amount > 1} {$product.sales_amount} {/if}
(!) Note that this code does not take into account option combinations
This works well, thank you!
Note if the Bestsellers module is enabled, this code should work
{if $product.amount > 1} {$product.sales_amount} {/if}(!) Note that this code does not take into account option combinations
You are welcome! :)
This shows on some products > 0, on some products 0, on some products nothing.
why on some products nothing? Thanks!
Such products might be out of stock or with 1 item in stock.
This shows on some products > 0, on some products 0, on some products nothing.
why on some products nothing? Thanks!
Note that if the Bestsellers module was enabled recently, it does not take into account previous purchases