Show custom fields of products already in category
11 years 1 week ago #215689
by Tralala
Show custom fields of products already in category was created by Tralala
-- 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?
-- 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.
11 years 6 days ago #215751
by nicolas
Replied by nicolas on topic Show custom fields of products already in category
Hi,
Yes, that's basically it.
Make sure that you replace "fieldname" with the column name of the corresponding field.
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.
11 years 6 days ago - 11 years 6 days ago #215769
by Tralala
Replied by Tralala on topic Show custom fields of products already in category
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.
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: 11 years 6 days ago by Tralala. Reason: better text
Please Log in or Create an account to join the conversation.
11 years 6 days ago #215796
by nicolas
Replied by nicolas on topic Show custom fields of products already in category
Hi,
There is no need to write PHP for that.
You just need to write the text you want.
For example, like that:
There is no need to write PHP for that.
You just need to write the text you want.
For example, like that:
Code:
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.
11 years 6 days ago #215836
by Tralala
Replied by Tralala on topic Show custom fields of products already in category
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?
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.
11 years 5 days ago #215856
by nicolas
Replied by nicolas on topic Show custom fields of products already in category
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:
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:
Code:
<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.190 seconds