Add custom fields into table product display

  • Posts: 8
  • Thank you received: 0
11 years 8 months ago #128283

I want to customize table layout and add several columns with custom fields in it. I know I have to edit listing_table, but I don't know how to get the custom field value into the template. Can you send me piece of code, or describe the api a little?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 8 months ago #128309

Hi,

If you want to add your custom field value through your product listing you'll probably by use this code :

echo $this->row->CUSTOM_FIELD_COLUMN_NAME;
in this foreach loop : foreach($this->rows as $row){ [code][code]
foreach($this->rows as $row){
[code]

The following user(s) said Thank You: etherik

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

  • Posts: 8
  • Thank you received: 0
11 years 8 months ago #128487

That's exactly what I needed.
Btw, is there a way to add datetime custom field, or do I have to use text?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #128500

Hi,

You can create a custom field with the "date" type, for the display, you will have to display it in text in the listing.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum
loading