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

#   Echo custom fields

##

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

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 8 months ago [\#43239](#43239) by [spithoven](/forum/user/5161-spithoven "View spithoven's Profile")  *[Echo custom fields](/forum/4-how-to/43239-echo-custom-fields#43239 "Guys,  I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs. For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop&#95;product&#95;custom&#95;name&#95;23'.  Now for the problem. How can I get the value of 'hikashop&#95;product&#95;custom&#95;name&#95;23' in lets say 'view.html.php'.  Thanks!")* was created by *[spithoven](/forum/user/5161-spithoven "View spithoven's Profile")*

Guys,

I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs.
For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop_product_custom_name_23'.

Now for the problem. How can I get the value of 'hikashop_product_custom_name_23' in lets say 'view.html.php'.

Thanks!

[ A Product from my site](http://ledstunter.com/index.php/webshop/product/28-e14-25-watt-warm-wit/category_pathway-13)

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

14 years 8 months ago [\#43361](#43361) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Echo custom fields](/forum/4-how-to/43239-echo-custom-fields#43361 "Guys,  I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs. For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop&#95;product&#95;custom&#95;name&#95;23'.  Now for the problem. How can I get the value of 'hikashop&#95;product&#95;custom&#95;name&#95;23' in lets say 'view.html.php'.  Thanks!")*

You should edit the file "show_default" via the menu Display-&gt;Views and add your code there.
Getting the field value is easy in that file.
Just do like that:
&lt;?php
echo $this-&gt;element-&gt;hikashop_product_custom_name_23;
?&gt;

The following user(s) said Thank You: [spithoven](/forum/user/5161-spithoven "View spithoven's Profile")

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 8 months ago [\#43379](#43379) by [spithoven](/forum/user/5161-spithoven "View spithoven's Profile")  Replied by *[spithoven](/forum/user/5161-spithoven "View spithoven's Profile")* on topic *[Re: Echo custom fields](/forum/4-how-to/43239-echo-custom-fields#43379 "Guys,  I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs. For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop&#95;product&#95;custom&#95;name&#95;23'.  Now for the problem. How can I get the value of 'hikashop&#95;product&#95;custom&#95;name&#95;23' in lets say 'view.html.php'.  Thanks!")*

Nicolas, thanks for your reply!

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 8 months ago [\#43383](#43383) by [spithoven](/forum/user/5161-spithoven "View spithoven's Profile")  Replied by *[spithoven](/forum/user/5161-spithoven "View spithoven's Profile")* on topic *[Re: Echo custom fields](/forum/4-how-to/43239-echo-custom-fields#43383 "Guys,  I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs. For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop&#95;product&#95;custom&#95;name&#95;23'.  Now for the problem. How can I get the value of 'hikashop&#95;product&#95;custom&#95;name&#95;23' in lets say 'view.html.php'.  Thanks!")*

When I edit the 'show_default' it does not echo anything. When I edit the 'show', it only shows my txt echo, not the custom name var.

&lt;?php
echo "My Test Echo";
echo $this-&gt;element-&gt;hikashop_product_custom_name_23;
?&gt;

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

14 years 8 months ago [\#43507](#43507) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Echo custom fields](/forum/4-how-to/43239-echo-custom-fields#43507 "Guys,  I want to show my customers the result of a simple calculation. I want to show them what they can save a year when they use LED lighting in staid of normal light bulbs. For this simple calculation I need to get the wattage from the lamp, this witch is stored in 'hikashop&#95;product&#95;custom&#95;name&#95;23'.  Now for the problem. How can I get the value of 'hikashop&#95;product&#95;custom&#95;name&#95;23' in lets say 'view.html.php'.  Thanks!")*

If you have characteristics attached to your product, you should do like that:

echo $this-&gt;element-&gt;main-&gt;hikashop_product_custom_name_23;

Also make sure that the column name of your custom field is hikashop_product_custom_name_23

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQzMjM5LWVjaG8tY3VzdG9tLWZpZWxkcz90bXBsPW1hcmtkb3du) 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.055 seconds

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