Show custom fields of products already in category

  • Posts: 25
  • Thank you received: 1
9 years 9 months ago #215689

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.5.26
-- Browser(s) name and version -- : Firefox 40

Can I display some ‘Specificaties’ (custom fields) of products also if the products are displayed in category-view? So, if you see all products of one category, already some specifications of products are showed.

I want to show information about products in two steps:
- first, already in category-view, the outlines (with ‘specificaties’ in custom fields)
- second more extended info.

Maybe the answer is still in this topic: hikashop.com/forum/product-category-disp...-layout-listing.html

But I want to show 8 or 9 custom fields.
Do I copy than the code <?php echo $this->row-> fieldname; ?> 8 or 9 times just stacked?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
9 years 9 months ago #215751

Hi,

Yes, that's basically it.
Make sure that you replace "fieldname" with the column name of the corresponding field.

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

  • Posts: 25
  • Thank you received: 1
9 years 9 months ago #215769

Thanks. Done, and working.
But now I got only the values, all in one row.

What I need is one label and its value, in one row.
Under that anoter row with label and value.
And everything in a simpe table.

I'm sorry, cannot 'write' php, only read it.

Last edit: 9 years 9 months ago by Tralala. Reason: better text

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
9 years 9 months ago #215796

Hi,

There is no need to write PHP for that.
You just need to write the text you want.
For example, like that:

My field 1: <?php echo $this->row-> field1; ?><br/>
My field 2: <?php echo $this->row-> field2; ?><br/>
My field 3: <?php echo $this->row-> field3; ?><br/>
My field 4: <?php echo $this->row-> field4; ?><br/>

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

  • Posts: 25
  • Thank you received: 1
9 years 9 months ago #215836

Tanks!
I already did so.
But the result is display of the column name, while it seem to me more logical to display the Labelname.
Can I use two or three words and capitals for the column name?

And how can I display this info in a simple table?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
9 years 9 months ago #215856

Hi,

1. I don't understand your question. For the "My field 1: " text, you can write whatever you want and it will work. I just gave you an example.

2. Just use table HTML tags in that case:

<table>
<tr><td>My field 1</td><td><?php echo $this->row-> field1; ?></td></tr>
<tr><td>My field 2</td><td><?php echo $this->row-> field2; ?></td></tr>
<tr><td>My field 3</td><td><?php echo $this->row-> field3; ?></td></tr>
<tr><td>My field 4</td><td><?php echo $this->row-> field4; ?></td></tr>
</table>

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

Time to create page: 0.058 seconds
Powered by Kunena Forum