Change 'sold by' text, second text for vendor name

  • Posts: 28
  • Thank you received: 1
9 years 7 months ago #199551

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.4.38
-- Browser(s) name and version -- : Safari 8.0.5(Mac), Chrome (Mac) 41.0.2272.118 (64-bit)

Hello!

I would like to know how to get the following to happen. Please see the before/after image below for clarification.

1) How can I modify the text 'Sold by', cannot find it in Translate

2) Right now I type in Vendor name and location together. I would like to add a text per vendor to show the location (or just a line of text) separately, preferably with an icon. Which type of custom field should I add so that I could create just one additional text per vendor (it will show up the same for all their products) and have it displayed directly underneath the Vendor name when their item is shown on any product listing page and product detail pages?

I have read the page below but I'm not a coder so it would be best if someone could tell me which exact file and where I need to add/modify to make this happen. If I do it on my own, I'm afraid I will break the site like I did the last time.
www.hikashop.com/support/support/documen...ize-the-display.html




Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #199593

Hi,

1/ The translation is near the beginning of the translation file. You can add a translation override using that :

SOLD_BY_VENDOR="Sold by: %s"

2/ You need to create a "vendor" custom field ; In the HikaShop custom field, when you will create a new one, you will see the type "vendor" in the list.
If you're using a text custom field, the easier will be to not display the custom field in the vendor page (in the "display" block) and use a view override to display manually the custom field in the vendor page.

In the "vendormarket | showcontainer_default", you will be able to place that code
echo '<span class="vendor_location">' . $this->vendor->vendor_location . '</span>';
to display the custom field "vendor_location" (that does not exist ; just an example) in a span.

To show that custom field in the product page ; it will be a little more complicated because it will require to modify a core file or to use a custom plugin.
I will see if I can improve some things in HikaMarket to make the "vendor display" in the product page more flexible.

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: 28
  • Thank you received: 1
9 years 6 months ago #200230

Hello:

"use a view override to display manually the custom field in the vendor page."

1) Could you tell me how this is done? It coding we have to add and if so, which page do we add it to?

"To show that custom field in the product page ; it will be a little more complicated because it will require to modify a core file or to use a custom plugin."

2) I have a programming friend who would like to try. Could you tell me which page he must modify in order to make this field appear on our product pages?

3) I wonder if this is related... our 'designed by (vendor name)' is oddly located at the top of the product image. Could you tell me which page we should edit if we want to move this information, along with the new vendor field, to underneath the images or to the area between 'add to cart' and SKU info?


Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #200281

Hi,

1/ For the vendor page, in my previous message, I explained the view to edit and the code to place.
So I'm not sure I understood correctly your question or you understand my previous message.

2/ HikaMarket add the vendor object in parameters of the view (when the product have a vendor).
Because it load the raw data of the vendor you will have access to all custom field content.

echo '<span class="vendor_location">' . $this->element->vendor->vendor_location . '</span>';
But if you using other things than a text custom field, it becomes more complicated.
When you are displaying a "list" custom field, it will require to load the custom field configuration in order to have the link between the value and the text ; the custom field just contain the value and if you want to display the corresponding text, you need to read it from the custom field itself.

3/ The "sold by vendor" is display in the extra data "topEnd" which is displayed thanks to that code:
<?php if(!empty($this->element->extraData->topEnd)) { echo implode("\r\n",$this->element->extraData->topEnd); } ?>
You can move that block somewhere else in the product page if you want to move 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.
Last edit: 9 years 6 months ago by Jerome. Reason: Fix "topBegin / topEnd"

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

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