Ascending/Descending Language Overrides

  • Posts: 24
  • Thank you received: 0
9 years 2 months ago #243571

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 7.0.7
-- Browser(s) name and version -- : Chrome

Hi there,

I currently have a "sort" filter that sorts price, product name and clicks. I've put in the language overrides:

SORT_DESCENDING_CLICKS="Most Popular"
SORT_ASCENDING_CLICKS="Least Popular"

I'd like to also change:

Price ascending -> Lowest Price
Price descending -> Highest Price
Product name ascending -> A-Z
Product name descending -> Z-A

However, there doesn't seem to be overrides for this instead the only extra cases of ascending/descending languages used are "SORT_ASCENDING="%s ascending"", "SORT_ASCENDING_RECENT="Older"", "SORT_ASCENDING_SALES="Worst sales"", "ASCENDING="Ascending"" (and the same for descending).

Is there a way to override the language used for those two filter options? Also, is there a way to remove one option (such as "Least Popular") but keep the other option (such as "Most Popular")?

Thanks heaps :)

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 2 months ago #243588

Hi,

There is.
You can use such translation keys:
SORT_ASCENDING_PRODUCT_NAME
SORT_DESCENDING_PRODUCT_NAME
SORT_ASCENDING_PRICE
SORT_DESCENDING_PRICE
There is no option to keep one type of sorting and remove the other.
You would have to go in the code in administrator/components/com_hikashop/classes/filter.php to skip the display of the ones you don't want.

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

  • Posts: 24
  • Thank you received: 0
9 years 2 months ago #243791

Hi there,

Those keys worked great, thanks :) This is the language file I have to made overrides (where I appear to be unable to find those keys) pastebin.com/JjbNKvEJ

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 2 months ago #243797

Hi,

Yes, the translation keys don't exist be default. You need to add them in the override area of your translation file if you want to use them.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum