How to show a custom field in module display?

  • Posts: 131
  • Thank you received: 3
11 years 11 months ago #53515

Hi Nicolas,

I am back again :D

As I have to re-build my online store in a new sub-domain, to ensure the template works well for future upgrading of Hikashop. Now I am in the process, but due to sales, cannot done it fast.

Here is my new sub domain.

Please see homepage below slideshow, there is a "Blazer" section display items. In the title there is a "(Pre-Order)" or (On Sale)" texts. I wish to show this as a custom field on homepage module display.

I can create custom field, but not sure how to make it display on homepage just below title of each item. And hope they can display in difference color.


Thank You!

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
11 years 11 months ago #53582

Hi,

If you want to display the content of a custom product field there, you will have to edit the file "listing_img_title" of the view "product" via the menu Display->Views and add such line:
<?php echo $this->row->CUSTOM_FIELD; ?>

where CUSTOM_FIELD is the column name of your field.
Then, you just have to have the values of the field according to what you want to display (you can add HTML in the values if you want to have coloured text ).

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

  • Posts: 131
  • Thank you received: 3
11 years 11 months ago #53644

Thank you Nicolas!

It's works well :D

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

Time to create page: 0.062 seconds
Powered by Kunena Forum