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

#   Custom field to Variable

##

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

Less More

- Posts: 25
- Thank you received: 0
-
-

10 years 5 months ago [\#243131](#243131) by [ingjjaa](/forum/user/38158-ingjjaa "View ingjjaa's Profile")  *[Custom field to Variable](/forum/26-product-category-display/885098-custom-field-to-variable#243131 "-- HikaShop version -- : 3.5.6 -- Joomla version -- : 3.5.2 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Get custom fields to variable  HI i have create a custom field in the product page call 'principal' which would be 1 to 3 (number) the idea of that field is that i could evaluate with php code using if and is that field is 1 the cell background would be green, else it would be red.  My problem is that i don't know how to get the value of the that custom field in the view listing&#95;table  would you help me please i just need to transfer the value of the fiel to a varibale into php code")* was created by *[ingjjaa](/forum/user/38158-ingjjaa "View ingjjaa's Profile")*

-- HikaShop version -- : 3.5.6
-- Joomla version -- : 3.5.2
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : Get custom fields to variable

HI i have create a custom field in the product page call 'principal' which would be 1 to 3 (number) the idea of that field is that i could evaluate with php code using if and is that field is 1 the cell background would be green, else it would be red.

My problem is that i don't know how to get the value of the that custom field in the view listing_table

would you help me please i just need to transfer the value of the fiel to a varibale into php code

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

10 years 5 months ago [\#243151](#243151) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field to Variable](/forum/26-product-category-display/885098-custom-field-to-variable#243151 "-- HikaShop version -- : 3.5.6 -- Joomla version -- : 3.5.2 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Get custom fields to variable  HI i have create a custom field in the product page call 'principal' which would be 1 to 3 (number) the idea of that field is that i could evaluate with php code using if and is that field is 1 the cell background would be green, else it would be red.  My problem is that i don't know how to get the value of the that custom field in the view listing&#95;table  would you help me please i just need to transfer the value of the fiel to a varibale into php code")*

Hi,

You can find that value in the variable $this-&gt;row-&gt;principal in listing_table.

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

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

Less More

- Posts: 25
- Thank you received: 0
-
-

10 years 4 months ago [\#243361](#243361) by [ingjjaa](/forum/user/38158-ingjjaa "View ingjjaa's Profile")  Replied by *[ingjjaa](/forum/user/38158-ingjjaa "View ingjjaa's Profile")* on topic *[Custom field to Variable](/forum/26-product-category-display/885098-custom-field-to-variable#243361 "-- HikaShop version -- : 3.5.6 -- Joomla version -- : 3.5.2 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Get custom fields to variable  HI i have create a custom field in the product page call 'principal' which would be 1 to 3 (number) the idea of that field is that i could evaluate with php code using if and is that field is 1 the cell background would be green, else it would be red.  My problem is that i don't know how to get the value of the that custom field in the view listing&#95;table  would you help me please i just need to transfer the value of the fiel to a varibale into php code")*

I am develoment to reports in backend in the view Show php is just a query so simple but i need get the order id or the order number, how could i transfer the code if to a pho variabl call $order_yo or wahtever

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

10 years 4 months ago [\#243365](#243365) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field to Variable](/forum/26-product-category-display/885098-custom-field-to-variable#243365 "-- HikaShop version -- : 3.5.6 -- Joomla version -- : 3.5.2 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Get custom fields to variable  HI i have create a custom field in the product page call 'principal' which would be 1 to 3 (number) the idea of that field is that i could evaluate with php code using if and is that field is 1 the cell background would be green, else it would be red.  My problem is that i don't know how to get the value of the that custom field in the view listing&#95;table  would you help me please i just need to transfer the value of the fiel to a varibale into php code")*

Hi,

I'm sorry but I don't understand your question.
Can you provide more details and/or some screenshots of what you're talking about ?

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

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