Jump to content

Discount tag on product image


asood

Recommended Posts

Hi

 

 

 

What i am looking for is that a discount tag or label should appear on the product image. The normal price and the price after discount should be displayed along with the product.

 

the way product is shown in the specials block on the home page

(in the same way the product should be shown everywhere - whether in the features product block on the home page or in the products page )

 

Can anyone tell me the solution for my query pls

Link to comment
Share on other sites

1."What i am looking for is that a discount tag or label should appear on the product image

 

Use our Stickers Pro module or lay the discount image upon product image in product.tpl template.

 

2."The normal price and the price after discount should be displayed along with the product." :

 

Replace ProductController.php, using the override function. Add the following:

$old_price = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT price FROM `'._DB_PREFIX_.'product` WHERE id_product = '.(int)$this->product->id); Place this result in Smarty

product.tpl: adjust styles according to your preferences

<span style="text-decoration:line-through ">{convertPrice price=$old_price}</span>

 

3."the way product is shown in the specials block on the home page

 

You need to acquire the module that displays products with discounts on homepage. You can also check the standard blockspecials module and, perhaps, add in public function install ()

{

return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header') AND $this->registerHook('home'));

}

and public function hookHome($params)

{

return $this->hookRightColumn($params);

}

 

Hope it will help.

 

Sincerely,

BelVG Team

[email protected]

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