[Skip to main content](#vessel-content)

#   how to display a custom field

##

- **[thomasb](/forum/user/30137-thomasb "View thomasb's Profile")**
- [![thomasb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30137-thomasb "View thomasb's Profile") Topic Author
- [ Offline](/forum/user/30137-thomasb)

Less More

- Posts: 5
- Thank you received: 0
-
-

12 years 3 weeks ago [\#174714](#174714) by [thomasb](/forum/user/30137-thomasb "View thomasb's Profile")  *[how to display a custom field](/forum/26-product-category-display/872163-how-to-display-a-custom-field#174714 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 2.5.22 -- PHP version -- : 5.4.33  Hi I have made 2 custom fields to my product page. both of the type : Check box.  Both check boxes is displayed in the back end as separate fields. but in the front end they are listet as one.  Can I echo out the specific fields in the front end by id number or something like that. (how do I do this &#42;?)  In the php file : product / show&#95;default.php I have found this line which writes out both fields. but my php skills are not good enough to figure out how i write on field out at a time.  if(!empty($this-&gt;fields)){ $this-&gt;setLayout('show&#95;block&#95;custom&#95;main');  $catogory = $this-&gt;loadTemplate();  echo $catogory;")* was created by *[thomasb](/forum/user/30137-thomasb "View thomasb's Profile")*

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 2.5.22
-- PHP version -- : 5.4.33

Hi I have made 2 custom fields to my product page.
both of the type : Check box.

Both check boxes is displayed in the back end as separate fields.
but in the front end they are listet as one.

Can I echo out the specific fields in the front end by id number or something like that. (how do I do this *?)

In the php file : product / show_default.php I have found this line which writes out both fields.
but my php skills are not good enough to figure out how i write on field out at a time.

if(!empty($this-&gt;fields)){
$this-&gt;setLayout('show_block_custom_main');

$catogory = $this-&gt;loadTemplate();

echo $catogory;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzIxNjMtaG93LXRvLWRpc3BsYXktYS1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 2 weeks ago [\#174745](#174745) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[how to display a custom field](/forum/26-product-category-display/872163-how-to-display-a-custom-field#174745 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 2.5.22 -- PHP version -- : 5.4.33  Hi I have made 2 custom fields to my product page. both of the type : Check box.  Both check boxes is displayed in the back end as separate fields. but in the front end they are listet as one.  Can I echo out the specific fields in the front end by id number or something like that. (how do I do this &#42;?)  In the php file : product / show&#95;default.php I have found this line which writes out both fields. but my php skills are not good enough to figure out how i write on field out at a time.  if(!empty($this-&gt;fields)){ $this-&gt;setLayout('show&#95;block&#95;custom&#95;main');  $catogory = $this-&gt;loadTemplate();  echo $catogory;")*

Hi,

Do you want that the customer be able to fill these fields ?
If it is, you have to create the custom fields in the "item" table instead of in the "product" one.

Product allow you to set information in the backend, and then it display only the selected value on frontend.
Item allow the customer to make a choice.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzIxNjMtaG93LXRvLWRpc3BsYXktYS1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.186 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
