How to have 2 different labels for the same language constant

  • Posts: 14
  • Thank you received: 1
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
8 hours 9 minutes ago #370137

-- HikaShop version -- : 6.2.0
-- HikaMarket version -- : 6.0.0
-- Joomla version -- : 6
-- PHP version -- : 8.4
-- Browser(s) name and version -- : all

Hello Team

I have seen in both vendor and buyer section 'ORDER' has the language constant (see attachment)

in the Buyer panel I wanted to change the word 'Orders' in 'PURCHASED' (see attachment)
and in the Vendor panel I wanted to change the word 'Orders' in 'SOLD' (see attachment)

but then I realized it is the same language constant

How do I split them please?
Thank you

Attachments:
Last edit: 8 hours 9 minutes ago by lucad.

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

  • Posts: 26310
  • Thank you received: 4051
  • MODERATOR
1 hour 54 minutes ago #370141

Hello,

It is possible to use a view override to change the text without modifying the HikaShop or HikaMarket core files.

You need to override the view : vendormarket / cpanel

There, replace the content

<?php
	foreach($this->buttons as $btnName => $btn) {
		if(empty($btn))
			continue;
?>
By
<?php
	foreach($this->buttons as $btnName => $btn) {
		if(empty($btn))
			continue;
		if($btnName == 'order')
			$btn['name'] = JText::_('VENDOR_ORDERS');
?>
And you will be able to add/use a new translation for "VENDOR_ORDERS".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.075 seconds
Powered by Kunena Forum