How to: Show Manufacturer on Product Page

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4155

Hi,

I recently purchased the Business version of Hikashop and after playing with it for a couple of days, I am very happy with the possibilities.

However my client's shop sells art and on each product page they want to show the artist of the product and other products by the same artist. I thought I had this working, but unfortunately the artist that is shown is the first artist from the database and not the artist of the product. Showing the other products of the same artist works fine.

I am using the module that is shown in the picture to achieve this. I also tried to set the synchronize option to yes, but then nothing is shown on the product page.

Any help would be greatly appreciated.

Gert.

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4156

Hi,

It's indeed not possible to show a category syncrhonized with a product. In such case the system will use the parent category and display a listing its subcategories.

What you could do is create a custom product field (menu Display->Custom fields) of type single dropdown and with the values being the artists. Then, for each products, set that custom field and it will appear on the product page. You'll probably want to change the default "Specifications" text by something else or remove it by editing the translation file in the configuration under the tab languages.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4158

Thanks Nicolas and that on Christmay Day!

Would it be possible to add this as a feature request? It is not very friendly to have the information to be entered twice.

Bonne Noël,

Gert.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4160

Nicholas,

In addition to my previous post, I need to show the artist picture and a description as shown below. I believe this is not possible with a custom field as there is no custom field type picture.

Any other suggestions on how I could achieve this?

Gert.

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4164

What we can do is modify the code a bit to display a listing of the categories of the product when the module is syncrhonized and on a product page.
But that's not what you want either as I understand since you want to somehow map a category in a list of categories with a product...But the system doesn't know how...

For your second question: you can create two custom fields.
One with the URL of the image and the second with the description and not display them on the front end.

Then, you can edit the file show of the view product via the menu Display->Views and add a few lines of code to display them the way you want. You will find their data in the variable $this->element->FIELD_COLUMN_NAME where FIELD_COLUMN_NAME is the column name of the field.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4291

Hi Nicholas,

I'm not quite sure whether I understand your explanation correctly.

What I would like to achieve is the following:

I have to category groups defined:

1. Product Category
2. Artist

What I would like to achieve on the product page is to be able to show all artists the are assigned to the product. Basically I think this should be possible, but again maybe I understand you wrong.

In the meantime I will try out the solution you proposed. Thanks for that.

Gert.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4292

Nicholas,

I managed to get the artist description to appear in the way you described. But the picture is not working.

I entered the following value in the picture field: <img alt="Nit Kantawong"
src=" www.thaihandmadecraft.com/cms/images/sto...ts/Nit_Kantawong.jpg "
height="213" width="213">

But the system doesn't accept this.

I also tried: www.thaihandmadecraft.com/cms/images/sto...ts/Nit_Kantawong.jpg

This is accepted, but nothing shows on the product page.

What is the correct format I should use?

Gert.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4293

Nicholas,

Little update on my last post.

Got your suggestion working already.

Thanks for the tip.

Still interested in a permanent better solution ofcourse.

Gert.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4294

Nicholas,

One more thing. How can I set a custom field to accept html?

Gert.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4295

You can look at that post for html in custom field : www.hikashop.com/en/support/forum/2-gene...uggestions.html#4249
That will be implemented in next version so you will be able to update while keeping what you want.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4309

Hi Nicolas,

I implemented this:

1. Indeed HTML tags are removed from custom fields for security reasons.
You can change the line
Code:
$object->$column = strip_tags($value);
to
Code:
$safeHtmlFilter = & JFilterInput::getInstance(null, null, 1, 1); $object->$column = $safeHtmlFilter->clean($value, 'string');
in the file administrator/components/com_hikashop/classes/field.php

However, my html code is still stripped.

Anything else I should do?

Gert.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4312

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4358

Hi Nicholas,

I ran into one other problem using the solution of a custom field.

My site is multilingual and for extra fields I can only translate the labels through Joomfish, not the content.

Is there a solution to this?

Gert.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4360

Values of custom fields can be translated as well.

For example, you can enter in your custom field the text: MY_CUSTOM_TEXT
Then, in the config under the tab languages, you can add for each language the line:
MY_CUSTOM_TEXT="My translated custom text"
And that text will appear translated.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4369

Hi Nicholas,

I followed your suggestion. This is what happens.



Did I do anything wrong?

Gert.

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4370

Yes. In joomla translation files you can't use quotes as they are used to delimit the translation strings.
You need to use simple quotes instead. Otherwise, joomla will discard the translation.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4371

Nicholas,

All the translation strings start and end with ".

As a test I tried both the following:

MY_CUSTOM_TEXT='Nit Kantawong'
MY_CUSTOM_TEXT="Nit Kantawong"

In both cases the product page still shows MY_CUSTOM_TEXT

Gert.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
13 years 4 months ago #4372

I just tried on my end on our test websites and it's working fine with your example:
MY_CUSTOM_TEXT="Nit Kantawong"
Are you sure that you don't have other lines that you added in the translation file with double quotes within them which would break the translation file ?

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4385

Nicholas,

That is strange indeed. Just to be sure I downloaded the latest language file from the website and moved my entry to the very top of the file.

I still cannot get it working.

I have attached the language file so you can see for yourself.

Gert.

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

  • Posts: 86
  • Thank you received: 0
13 years 4 months ago #4386

Here is the file.

File Attachment:

File Name: en_GB.zip
File Size:15 KB

Attachments:

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

Time to create page: 0.093 seconds
Powered by Kunena Forum