Cutomize add product form in front-edition

  • Posts: 54
  • Thank you received: 2
9 years 4 months ago #208727

-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.5
-- Joomla version -- : 3.4.3

Hi,
My previous issue solved.
I have another issue with category selection and related product selection in "add product" page in vendor front-edition. When I select a category, its products and subcategories do not load. (As the attachement)
Thanks in advance.

Attachments:
Last edit: 9 years 4 months ago by mehdikazemi.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #208841

Hi,

When there is subcategories or products under a category, you can see some kind of "+" near the category icon.
If there is no symbol, it means that the category is empty.

In your example, the category is empty, there is no subcategory (or no product if it's a product selection).

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: 54
  • Thank you received: 2
9 years 4 months ago #209007

I found the problem. It is because of Sh404sef.
Sh404SEF cannot realize links you generate in javascript when click on categories tree.
Do you have any idea how can I solve this? or I should state the problem with Sh404SEF support team?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #209039

Hi,

Thanks for the report. I though that I fixed the different issues with SH404SEF.
The fact is the URL are generated dynamically by some Javascript which just replace a specific string by the ID of the selected product/category.
But the special string used for the replacement was using brackets ( {} ) and SH404SEF does not "like" these characters and remove them from the SEF url... So afterwards the javascript can't replace the ID and the URL does not work properly.

I will investigate more on the issue to find the parts I missed.
For the moment, you can see to allow the brackets in SH404SEF (there is an option for that) or you can simply tell SH404SEF to not SEF the HikaMarket URL and let Joomla SEF do it.

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: 54
  • Thank you received: 2
9 years 4 months ago #209160

I removed {} but problem occurs in different way. See the attachment.

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #209177

Hi,

Where do you remove the brackets ?

If you look at the network log, you can see the "XHR" calls (ajax calls) and see the URL which is used.
And you can also see the returned content. Knowing the used URL will help to understand the current issue.
If you do not know how to do it ; an access to your front-end will be required.

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: 54
  • Thank you received: 2
9 years 3 months ago #211950

Unfortunately I couldn't solve the problem.
Can you solve it? (I am going to send you admin password)

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #211968

Hi,

I edit your SH404 configuration to authorize the " {} " like explained in my previous messages.
pasteboard.co/2uNjCw.png

But unfortunately, I'm not an expert with SH404, I wanted to purge the cache but the specific URL I wanted to purge wasn't displayed in the interface...
So finally, i just deactivated SH404 for HIkaMarket URL and it's working better.

If you have the possibility to reactive SH404 for HikaMarket and have working URL, it will be a good news.
But I'm not familiar with SH404 so I'll recommend you to contact their support for more details.

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: 54
  • Thank you received: 2
9 years 3 months ago #212227

Thank you very much Jerome.
OK. Then, when do you think the next version of hikamarket will release and does this issue solved in the next version?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #212229

Hi,

Yes ; we are replacing as much as we can the " {ID} " in the URL by another keyword.
You can also modify the type namebox in HikaMarket and perform these replacements in the structure ( administrator/components/com_hikamarket/types/namebox.php )

	'tree_url' => 'category&task=getTree&category_id={ID}',
	'tree_key' => '{ID}',
By
	'tree_url' => 'category&task=getTree&category_id=HIKACID',
	'tree_key' => 'HIKACID',

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: 54
  • Thank you received: 2
9 years 2 months ago #212300

Thanks for your response.
It seems it doesn't work. HIKACID does not replace by any value in the Sh404SEF (see the attachment), while it does in the hikamarket requests. (see again the attachment).

Attachments:

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

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

Hi,

Okay ; so SH404 can't work with HikaMarket if it can't authorize URL with dynamic values.

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: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #212357

Hi,

One solution will be to modify the HikaMarket helper in order to handle SEF extensions.
You first need to re-set the "{ID}" in the URLs (instead of "HIKACID") and then replace in the HikaMarket helper

if($js) return str_replace('&', '&', $ret);
return $ret;
By
if(!$js)
	return $ret;

// Handle special dynamic parameters (like " {ID} ") which can be remove with SEF extensions
if(strpos($link, '{') !== false && strpos($ret, '{') === false)
	return JURI::root(true) . '/index.php?option='.$namespace.'&ctrl='.$link;
return str_replace('&', '&', $ret);
The idea is to detect when a bracket is removed from the URL and then, to not use a SEF url.
Because "HIKACID" is not removed from the URL we can't know that it won't support the dynamic parameter value afterwards ; so staying on "{ID}" will help us to see if the URL has been altered.

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.059 seconds
Powered by Kunena Forum