From price different in product listing in other language

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
3 years 3 weeks ago #331476

-- url of the page with the problem -- : luciferart.nl/
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25

Hi Guys,

I'm having a bit of trouble pin pointing this issue.

In the Dutch language the display of the "old" price is perfect ( Dutch product listing )
it shows the "From" price as the original price.

But when you look at the English listing it's showing the discount amount ( English product listing ).

Did I miss a setting ?

It would also be a great help of there would be a separate string with it's own class for creating a look like in the Dutch listing. I had to make a small modification in the view to make the separate styling of the amounts possible. Maybe something for the future release?

Last edit: 3 years 3 weeks ago by Joomill. Reason: solved

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
3 years 3 weeks ago #331486

Hi,

1. In the settings of your English menu item, under the "products options" tab, you have an option "discount" to select what to display for discounted prices so make sure you have it set to the same as the dutch menu item and it will display the same.

2. What modification did you have to make exactly ?

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

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
3 years 3 weeks ago #331488

Hi, thanks, the change worked. Still don't know how I could have missed that :blink:

The mods I made for the price markup in my case are these :

On line 106 I changed it to :

echo '<span class="hikashop_product_price_before_discount">'.JText::_('PRICE_BEFORE_DISCOUNT_START') . '<span class="test1">';

And on line 135 I changed it to :
echo '</span>'.JText::_('PRICE_DISCOUNT_END').'</span>';

I used some language strings :
PRICE_DISCOUNT_START="From : "
PRICE_DISCOUNT_END="<br />For : "

And a bit of styling:
.test1 {
	text-decoration: line-through;
}

.hikashop_product_price.hikashop_product_price_0.hikashop_product_price_with_discount {
	color: green;
	font-size: 2em;
	font-weight: 500;
	font-style: italic;
}

Off course this is just for my situation but it just makes it easier to style the separate amounts.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
3 years 2 weeks ago #331496

Hi,

I don't think the changes in the view would be necessary for that.
For example, for the line:

echo JText::_('PRICE_DISCOUNT_END').'</span>';
instead of changing it to :
echo '</span>'.JText::_('PRICE_DISCOUNT_END').'</span>';
you could change the translation override from:
PRICE_DISCOUNT_END="<br />For : "
to:
PRICE_DISCOUNT_END="</span><br />For : "
and for the line:
echo '<span class="hikashop_product_price_before_discount">'.JText::_('PRICE_DISCOUNT_START');
you could use in the same way the translation override:
PRICE_DISCOUNT_START="From : <span class='test1'>"

So you should already be able to do what you want with just translation overrides.
However, I agree with you that you would be a good idea to add an extra span with a class there so that people wanting to style the price itself won't have to use translation overrides and can just add their CSS.
So I'll do something for that. Thanks for the feedback.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum