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

#   How to put data into custom fields

##

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 2 months ago [\#249432](#249432) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  *[How to put data into custom fields](/forum/31-development/886326-how-to-put-data-into-custom-fields#249432 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, We created a custom field for product which need to be showed in front end product list and product detail page. The problem is the data comes from another table in my system, do I need to do a table join? or if I need to do this in my plugin, would you give me a direction?  Thanks in advance Best regards")* was created by *[twscott](/forum/user/43011-twscott "View twscott's Profile")*

-- HikaShop version -- : HikaShop Business 2.6.3
-- Joomla version -- : 3.5
-- PHP version -- : 5.5.12

Hi,
We created a custom field for product which need to be showed in front end product list and product detail page.
The problem is the data comes from another table in my system, do I need to do a table join? or if I need to do this in my plugin, would you give me a direction?

Thanks in advance
Best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NjMyNi1ob3ctdG8tcHV0LWRhdGEtaW50by1jdXN0b20tZmllbGRzP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 2 months ago [\#249439](#249439) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to put data into custom fields](/forum/31-development/886326-how-to-put-data-into-custom-fields#249439 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, We created a custom field for product which need to be showed in front end product list and product detail page. The problem is the data comes from another table in my system, do I need to do a table join? or if I need to do this in my plugin, would you give me a direction?  Thanks in advance Best regards")*

Hi,

I'm not following you.
How did you create a custom field that isn't in the hikashop_product table ?
Or maybe you mean that it's not an actual "hikashop custom product field", but an input that you added to the products and which is saved somewhere else, not related to the custom fields system of HikaShop ?

In any case, if you want to load data from another table for each products on a listing, the simplest is to have a query for each product in your view file override (listing_img_title by default) basing yourself on $this-&gt;row-&gt;product_id
You sure could add a join on the products loading query, but it's more complex than just overriding the view file and adding a query there.

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

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

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 2 months ago [\#249472](#249472) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  Replied by *[twscott](/forum/user/43011-twscott "View twscott's Profile")* on topic *[How to put data into custom fields](/forum/31-development/886326-how-to-put-data-into-custom-fields#249472 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, We created a custom field for product which need to be showed in front end product list and product detail page. The problem is the data comes from another table in my system, do I need to do a table join? or if I need to do this in my plugin, would you give me a direction?  Thanks in advance Best regards")*

Got it, thank you very much, Nicolas.
I have another question that If I fill in the data in listing_img_title, will the product objects be reused in the session? I mean in the product detail page and checkout process, do I need to query DB table again for the value or the object will pass down until user make another product list query ?

Best Regards
Scott

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NjMyNi1ob3ctdG8tcHV0LWRhdGEtaW50by1jdXN0b20tZmllbGRzP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 2 months ago [\#249474](#249474) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to put data into custom fields](/forum/31-development/886326-how-to-put-data-into-custom-fields#249474 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, We created a custom field for product which need to be showed in front end product list and product detail page. The problem is the data comes from another table in my system, do I need to do a table join? or if I need to do this in my plugin, would you give me a direction?  Thanks in advance Best regards")*

The product data is not stored in the session.
You would have to query the DB everywhere where you want to use it.

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

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

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