Override namebox - Error

  • Posts: 428
  • Thank you received: 19
2 years 2 months ago #344175

Hello, I want to ask how I can fix the following problem. I override the file /administrator/components/com_hikamarket/types/namebox.php but I get multiple errors like this: Class "hikamarketNameboxType" not found. All other overrides work fine any ideas how to fix it. I want to replace oTree image folder path by changing this code

$namebox_options = array(
			'mode' => $typeConfig['mode'],
			'img_dir' => HIKAMARKET_IMAGES, //must be replaced
			'map' => $map,
			'min' => $shopConfig->get('namebox_search_min_length', 3)
		);

if there is a way to change from this code that would be great
<?php
echo $this->nameboxType->display('data[product][categories]',$categories,hikamarketNameboxType::NAMEBOX_MULTIPLE,'category',array('delete'=>true,'sort'=>true,'root'=>$this->vendorCategories,'default_text'=>JText::_('HIKA_NONE')));
 ?>

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344181

Hello,

What is your HikaMarket version number ?
How are you performing the override ?

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.

  • Posts: 428
  • Thank you received: 19
2 years 2 months ago #344183

HikaMarket v4.0.0
/templates/template_name/html/com_hikamarket/administrator/types/namebox.override.php
the namebox.php file is renamed to namebox.override.php and class hikamarketNameboxType renamed to class hikamarketNameboxTypeOverride, without any other modifications.
When, for example, I want to add a product (HikaMarket Front-end) and not only there, it will display the above error.

Last edit: 2 years 2 months ago by neo191987.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344202

Hello,

Unfortunately, that is not how overrides should be done.
And it's not how the samples are provided by the support team (in old forum threads).

The issue you have is a coding issue and the error message is already giving you the needed elements to fix it.
Since the nature of your issue and the fact that you're HikaMarket licence is expired ; I'm afraid that I can't help you further.

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.

  • Posts: 428
  • Thank you received: 19
2 years 2 months ago #344204

Hi, thanks for the reply. I have found a solution to the problem. Of course, I will renew my licenses as soon as possible - I don't need a product that is not supported. I've made a few changes refining some of the code as described above and there are no issues, it's only this code that I'm having issues with that's why I'm contacting you as well. It might be some kind of incompatibility with Joomla 4 because I'm testing on it now. Check this issue though.

Last edit: 2 years 2 months ago by neo191987.
The following user(s) said Thank You: Jerome

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

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