Skip to main content

How to display the vendor name without the link

More
7 months 3 weeks ago #370193 by lucad
-- HikaShop version -- : 6.2.0
-- HikaMarket version -- : 6
-- Joomla version -- : 6.0.2
-- PHP version -- : 8.4
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : none

Hi Team

is there a way to show the vendor name without link please?

Thank you

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

More
7 months 3 weeks ago #370195 by Jerome
Hello,

Can you please precise where you want to display the vendor name?
Is it in a product listing? The product page? etc.

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: lucad

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

More
7 months 3 weeks ago #370204 by lucad
Hi Jerome, it appears on the auction page and category listing page (see attachment)
Thank you

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

More
7 months 3 weeks ago #370207 by oxido
In Hikashop go to: Configuration >System > Advanced tab and set the Display view files:YES, Save and go to front-end.
Refresh the page and you will see something similar to my attachament. For you, in that section you will see the view name, you need to find that view in: Hikaauction > Views, filter by template you use in front-end. (you can also search the veiw by name).
Then you can edit the view and remove the <a href=... > around username.
After you finish, don't forget to set Display view files:NO
The following user(s) said Thank You: lucad

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

More
7 months 3 weeks ago - 7 months 3 weeks ago #370208 by lucad
Thank you Oxido
Unfortunately, it's the only one with any reference (see attachments)
Last edit: 7 months 3 weeks ago by lucad.

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

More
7 months 3 weeks ago #370209 by oxido
Ok, so for the first screenshot, the view is product / show_auction.php, this is what you need to find in Auction > Views.
For the second one, it will be the first view name you see in that page.
You can identify where that view belongs by the doted lines, see attachaments
The following user(s) said Thank You: lucad

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

More
7 months 3 weeks ago - 7 months 3 weeks ago #370210 by lucad
Thank you

in HikaAuction - productauction / show_auction.php (see attchment)

I founf this code but can't find what to edit
Code:
Please do not publish full content of HikaShop/HikaMarket/HikaAuction files
Last edit: 7 months 3 weeks ago by Jerome. Reason: Removing full file content

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

More
7 months 3 weeks ago #370211 by Jerome
Hello oxido,

Thank you for your help but HikaMarket integration is not working like that.

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: lucad

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

More
7 months 3 weeks ago #370212 by lucad
Thank you Jerome

Do you have any solution please?

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

More
7 months 3 weeks ago - 7 months 2 weeks ago #370214 by Jerome
Hello,

HikaMarket adds the tag with the vendor name via the HikaShop "slots" system.
The data is generated in the HikaMarket product class and there is, for the moment, no setting to change how it is done.

Instead of adding a setting, I think it might be better to continue using the translation system, which is already used for the translation entry "SOLD_BY_VENDOR".
The idea would be to use another entry "SOLD_BY_VENDOR_HTML" which will define only the creation of the link ; but if you do override the translation, you could display only the vendor name...

To do so, you need to edit the file : administrator/components/com_hikamarket/classes/product.php
There, you will find the line
Code:
$vendorLink = '<a href="'.hikamarket::completeLink('vendor&task=show&cid=' . $vendor->vendor_id . '&name=' . $vendor->alias . $url_itemid).'">' . $vendor->vendor_name . '</a>';
for the generation of the vendor link during the display of a product page.

And the line
Code:
$vendorLink = '<a href="'.hikamarket::completeLink('vendor&task=show&cid=' . $vendors[$id]->vendor_id .'&name=' . $vendors[$id]->alias . $url_itemid).'">' . $vendors[$id]->vendor_name . '</a>';
for the generation of the vendor link during the display of a product listings.

The idea behind the patch is to change that generation.
Here for the product page :
Code:
$vendorLinkTpl = JText::_('SOLD_BY_VENDOR_HTML'); if($vendorLinkTpl == 'SOLD_BY_VENDOR_HTML') $vendorLinkTpl = '<a href="%s">%s</a>'; $vendorLink = sprintf($vendorLinkTpl, hikamarket::completeLink('vendor&task=show&cid=' . $vendor->vendor_id . '&name=' . $vendor->alias . $url_itemid), $vendor->vendor_name);

For the product listing, it's nearly the same patch but it's best to put the creation of the variable $vendorLinkTpl outside the foreach...
So the three first lines must be before the foreach and the line which will create the $vendorLink variable would be:
Code:
$vendorLink = sprintf($vendorLinkTpl, hikamarket::completeLink('vendor&task=show&cid=' . $vendors[$id]->vendor_id .'&name=' . $vendors[$id]->alias . $url_itemid), $vendors[$id]->vendor_name);

You can already apply the modification for the product page, create the translation, and give us your feedback.

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.
Last edit: 7 months 2 weeks ago by Jerome. Reason: Fix
The following user(s) said Thank You: lucad

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

More
7 months 2 weeks ago #370340 by lucad
Thank you Jerome

this time it took me a while this time to do that

Unfortunately the result of those changes is that the seller's name is not displayed anymore

Is there a way for you to check please?

Thank you

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

More
7 months 2 weeks ago #370343 by lucad
example attached

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

More
7 months 2 weeks ago #370353 by Jerome
Hello,

Do you have the three lines to declare the $vendorLinkTpl variable?
Code:
$vendorLinkTpl = JText::_('SOLD_BY_VENDOR_HTML'); if($vendorLinkTpl == 'SOLD_BY_VENDOR_HTML') $vendorLinkTpl = '<a href="%s">%s</a>';
Did you add a translation for the key "SOLD_BY_VENDOR_HTML" or not yet?

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: lucad

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

More
7 months 2 weeks ago #370370 by lucad
Yes, added translation and code portion, see screenshots attached
portion-code.jpg
and
translation.jpg

after added those:
1) The vendor name is not appearing in category page see screenshot category.jpg

2) but it is appearing wrong in the product page see screenshot product-page.jpg

I must be mistaken somewhere :pinch:

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

More
7 months 2 weeks ago - 7 months 2 weeks ago #370377 by Jerome
Hello,

Sorry, there was a typo introduced by a wrong copy/paste.
In your first screenshot, we can see the content
Code:
$vendors[$id]->vendor_name
When there is no multiple vendors, so the variable does not exist. The content
Code:
$vendor->vendor_name
must be used instead.

For your translations, please use the "%2$s" format to choose the second parameter instead of the first one.
The translations uses 2 parameters, the fist is the URL and the second is the vendor name.
See : www.php.net/manual/en/function.sprintf.php#example-3

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.
Last edit: 7 months 2 weeks ago by Jerome.
The following user(s) said Thank You: lucad

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

More
7 months 2 weeks ago - 7 months 2 weeks ago #370382 by lucad
Thank you Jerome

I changed $vendors[$id]->vendor_name with $vendor->vendor_name

When you write
'For your translations, please use the "%2$s" format to choose the second parameter instead of the first one'

you mean

SOLD_BY_VENDOR="Seller: %s"
SOLD_BY_VENDOR_HTML=" %2$s"

if yes , it works on the product page

but still doesn't work on the category page... maybe because in /public_html/administrator/components/com_hikamarket/classes/product.php I still see some others $vendors[$id]->vendor_name ?
Last edit: 7 months 2 weeks ago by lucad.

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

More
7 months 1 week ago #370398 by Jerome
Hello,

I don't know.
"still doesn't work on the category page" does not explain what is the issue, so I can't perform any deduction or else.

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: lucad

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

More
7 months 1 week ago #370405 by lucad
ok thanks anyway Jerome

Any chance you can add an option in the next release 'remove link for vendor' or something similar please?

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

More
7 months 1 week ago #370425 by Jerome
Hello,

The patch I proposed you has been added into HIkaMarket ; so it will be include in the next release.
I will perform further tests to see if I can understand what is your "category page issue" ; or if you can provide details, it will help!

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: lucad

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

More
7 months 1 week ago #370426 by lucad
Wow, thank you once again Jerome

that patch looks like has gone away after I updated to the latest version of Hikaauction couple of days ago

However

I managed to have it without link on the product page ... a page like demo.hikashop.com/index.php/en/hikashop/...product/4-brow-shoes

and it was not appearing on the category page... category page like demo.hikashop.com/index.php/en/hikashop/...listing/13-men-shoes

I am pretty sure it was my mistake since coding is not my thing...

Thanks again

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

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