Best seller icon
hi everyone,
i would like to indicate on a product that it is a best seller with say a Hot icon or some sort of image. how would one go about doing so? instead of listing the best sellers have an icon bu the products title does anyone have any ideas? |
Re: Best seller icon
You can create e.g. a Smarty modifier that will return the necessary HTML code when product is a Bestseller and further use it in the templates like this:
Code:
{$product.productid|is_bestseller} |
Re: Best seller icon
Quote:
hi i tried to put this next to the product title and it didnt work Code:
{if $product.productid|is_bestseller} nothing shows up, and it breaks my template im using 4.2.2 |
Re: Best seller icon
You should create a smarty modifier before it can be used in templates.
Check this post http://forum.x-cart.com/showpost.php?p=309487&postcount=2 Note: It is only a sample of how to create your own modifier, not the exact one to be used for this very mod. |
Re: Best seller icon
ok i have figured this problem out:
my objective was to show a flame icon next to a products name if it was a bestseller. well with enough tinkering and hair pulling it was quite simple, i used this following piece of code wherever i want the icon to appear in my case in the products_t.tpl Code:
{if $product.views_stats > 1000} so i decided to set it to how many times a product has been viewed. if you want it to be for how many times a product has been sold use this: product.sales_stats you can have a look here: Phoenix Tech - Widescreen LCD Monitors this is a live store so no test purchases. hope this helps anyone else out there that was looking for something similar |
All times are GMT -8. The time now is 09:31 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.