Skip to main content

Replace discount display with text

More
12 years 10 months ago #134009 by Tahiera
For the page that displays all the products, how can I make this change to discount prices:

Now it says:
$-1.50 $3.50 each

I want it to say:
SALE! $3.50 each

So have 'SALE!' text instead of the discount amount. I'm looking in product / listing_.php in the back end, but I'm not sure what exactly to change, or if that's the correct view. (It's for Hikashop Business.)

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #134023 by Mohamed Thelji
Hi,

If you want your price to be displayed this way, you should probably :
1. Set the "Show discounted price" option of the page "Hikashop->System->Configuration->Display" to NO.
2. Edit your translation file through "Hikashop->System->Configuration->Language->YourLanguageFile" and change this line :
Code:
PRICE_BEGINNING=""
By :
Code:
PRICE_BEGINNING="SALE! "

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #134030 by Tahiera
Thanks! This seems to add 'SALE!' to all prices though, whether or not the item is on sale. Is it possible to add it only to sale items?

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #134131 by Xavier
Hi,

You will have to edit the view "product / listing_price" via the menu Display > Views and in the discount part replace:
Code:
echo '<span class="hikashop_product_discount">'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this->row->discount->discount_flat_amount,0,5)!==0){ echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id); }elseif(bccomp($this->row->discount->discount_percent_amount,0,5)!==0){ echo -1*$this->row->discount->discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'</span>';
By:
Code:
echo '<span class="hikashop_product_discount">'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this->row->discount->discount_flat_amount,0,5)!==0){ //echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id); }elseif(bccomp($this->row->discount->discount_percent_amount,0,5)!==0){ //echo -1*$this->row->discount->discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'</span>';

Then in the translation file add the following line in the override part:

PRICE_DISCOUNT_START="SALE! "


In the "Show discounted price" option, select "Display the discount amount".

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds
Powered by Kunena Forum