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

#   only display custom field value on the product listing

##

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

Less More

- Posts: 31
- Thank you received: 3
-
-

7 years 6 months ago [\#305763](#305763) by [p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")  *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#305763 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")* was created by *[p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")*

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.2
-- Browser(s) name and version -- : Firefox last version

hello,
how are you
I create a new custom field for example : name : Mobile Document &amp; Column name : mobile_document
and set the only display to front end
how display value only the product listing
*** &lt;?php echo $this-&gt;element-&gt;mobile_document; ?&gt; ==== mobile_document is the column name of custom field.
code don't work in product listing , but work in the product detail
please help me to display custom field value on the product listing
thanks

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

7 years 6 months ago [\#305766](#305766) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#305766 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")*

Hi,

It's inside row. Your code should look like this:
Code:

&lt;?php echo $this-&gt;row-&gt;mobile_document; ?&gt;

Thanks

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

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

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

Less More

- Posts: 31
- Thank you received: 3
-
-

7 years 2 months ago [\#310170](#310170) by [p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")  Replied by *[p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")* on topic *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#310170 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")*

hello,
I create custom field Type of **Ajax file** and set **Front-end** to : **No**
I use php code (&lt;?php echo $this-&gt;row-&gt;document; ?&gt;) to display file to product detail.
but display file name **Without link**
please help me to display custom field (ajax file) with php code
thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTczMDktb25seS1kaXNwbGF5LWN1c3RvbS1maWVsZC12YWx1ZS1vbi10aGUtcHJvZHVjdC1saXN0aW5nP3RtcGw9bWFya2Rvd24=) 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: 86359
- Thank you received: 14293
-
-

7 years 2 months ago [\#310201](#310201) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#310201 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")*

Hi,

Yes, if you only use that code, it will display the raw data in that field in the database.
If you want the field system to do its magic on the raw data, you need to use such code instead: Code:

&lt;?php $field = $this-&gt;fieldsClass-&gt;get(XXX); echo $this-&gt;fieldsClass-&gt;show($field, $this-&gt;row-&gt;document); ?&gt;

Where XXX is the id of the field : [ monosnap.com/file/MZgl5DbSJu0IxSlWX7vQybCk9D6NpT](https://monosnap.com/file/MZgl5DbSJu0IxSlWX7vQybCk9D6NpT)

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

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

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

Less More

- Posts: 31
- Thank you received: 3
-
-

7 years 2 months ago -  7 years 2 months ago [\#310222](#310222) by [p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")  Replied by *[p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile")* on topic *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#310222 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")*

> nicolas wrote: Hi,
>
> Yes, if you only use that code, it will display the raw data in that field in the database.
> If you want the field system to do its magic on the raw data, you need to use such code instead:
> &lt;?php
> $field = $this-&gt;fieldsClass-&gt;get(XXX);
> echo $this-&gt;fieldsClass-&gt;show($field, $this-&gt;row-&gt;document);
> ?&gt;
> Where XXX is the id of the field : [ monosnap.com/file/MZgl5DbSJu0IxSlWX7vQybCk9D6NpT](https://monosnap.com/file/MZgl5DbSJu0IxSlWX7vQybCk9D6NpT)

**Thanks Nicolas**
I change code but display error
please see the image (attached)
thanks

- [ ![ajax-file-type.jpg](/forum/attachment/47533) ](/forum/attachment/47533 "...-file-type.jpg") [ ](/forum/attachment/47533?download=1 "...-file-type.jpg")

Last edit: 7 years 2 months ago by [p30yaran](/forum/user/52927-p30yaran "View p30yaran's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

7 years 2 months ago [\#310226](#310226) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[only display custom field value on the product listing](/forum/26-product-category-display/897309-only-display-custom-field-value-on-the-product-listing#310226 "-- HikaShop version -- : 4.0.3 -- Joomla version -- : 3.9.5 -- PHP version -- : 7.2 -- Browser(s) name and version -- : Firefox last version  hello, how are you I create a new custom field for example : name : Mobile Document &amp; Column name : mobile&#95;document and set the only display to front end how display value only the product listing &#42;&#42;&#42; element-&gt;mobile&#95;document; ?&gt; ==== mobile&#95;document is the column name of custom field. code don't work in product listing , but work in the product detail please help me to display custom field value on the product listing thanks")*

Hello,

It looks like your custom field is using the namekey "mobile_document" and not "document" (as your previous message).
So you should use that variable name instead.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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