Skip to main content

replace link to hikamarket vendor profile with link to jomsocial profile

5 years 5 months ago #332845 by jokysax
Its possible replace link to hikamarket vendor profile with link to jomsocial profile on product view?

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

5 years 5 months ago #332846 by Jerome
Hello,

You have to disable the setting to display that link and use a view override (in HikaShop product page) in order to add your link to jomsocial.
In the view you will have access to the "$this->vendor" object which contains the details of the vendor. So you should have the necessary information to create your link.

Regards,

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

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

5 years 5 months ago - 5 years 5 months ago #333009 by jokysax
Hi,

I am disabled Show main vendor in listing in hakamarket market options, but I dont know witch view file I have override to add jomsocial link?
Thank you for help.
Marcel
Last edit: 5 years 5 months ago by jokysax.

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

5 years 5 months ago #333010 by Jerome
Hello,

You should use "Display view files" in order to know which view you want to edit depending where you want to display the information.
CF : www.hikashop.com/support/documentation/5...g.html#advanced_main

Regards,

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

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

5 years 5 months ago #333184 by jokysax
Hello,

its show_default.php , but I dont find "$this->vendor" and in the code nothing about vendor ?
Thank you for help.
Marcel

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

5 years 5 months ago #333190 by Jerome
Hello,

My bad, for the HikaShop product page, it's under
Code:
$this->element->vendor
Regards,

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

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

5 years 3 months ago - 5 years 3 months ago #334630 by jokysax
I have this code in show_product.php:
Code:
<?php if(!empty($this->element->extraData->topEnd)) { echo implode("\r\n", $this->element->extraData->topEnd); } ?> <? $username = $this->element->vendor_username; echo '<a style="font-size:12px;" href="https://www.xxx.xx/'.$username.'" target="_blank" ><i class="fa fa-home fa-fw" aria-hidden="true"></i> https://www.xxxx.xx/'.$username.'</a>'; ?>
but it not works. How can i retrieve jomsocial username?
Thank you for help
Last edit: 5 years 3 months ago by Jerome. Reason: [code] tag is nice

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

5 years 3 months ago #334632 by Jerome
Hi,

You should take a look at other code in the forum, like :
www.hikashop.com/forum/23-market-how-to/...egration.html#297606

As mentioned in my previous post, you can access the vendor object via
Code:
$this->element->vendor
It gave you an object, which means you have to "interrogate" the object to retrieve a sub-element, you can use "var_dump()" function to see the content of an object ; it will be better to see what is available in the object and not perform a lot of try and retry.

Regards,

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

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

5 years 3 months ago #334667 by jokysax
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.106 seconds
Powered by Kunena Forum