How to have 2 different labels for the same language constant

  • Posts: 22
  • Thank you received: 2
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
2 weeks 21 hours 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: 2 weeks 21 hours ago by lucad.

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

  • Posts: 26313
  • Thank you received: 4056
  • MODERATOR
2 weeks 15 hours 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.
The following user(s) said Thank You: oxido, lucad

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

  • Posts: 22
  • Thank you received: 2
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 6 days ago #370147

Thank you Jerome!

The following user(s) said Thank You: oxido

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

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