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

#   (Solved) How to query custom field on show.php

##

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

Less More

- Posts: 14
- Thank you received: 0
-
- [](http://www.webemus.com)
-

15 years 7 months ago -  15 years 7 months ago [\#12878](#12878) by [garzarath](/forum/user/1779-garzarath "View garzarath's Profile")  *[(Solved) How to query custom field on show.php](/forum/4-how-to/12878-solved-how-to-query-custom-field-on-show-php#12878 "Hi,  I have a product custom fiels named 'semana' that I need to query in the show.php file.  I also have product variants.  I try to use:  $this-&gt;element-&gt;semana  to query this value but It always give me the child value no the main product (parent) value.  I don´t want my customer to fill the value to 'semana' in each child because they will alway have the same value than the main product.  How can I refer to the parent?  Thanks")* was created by *[garzarath](/forum/user/1779-garzarath "View garzarath's Profile")*

Hi,

I have a product custom fiels named 'semana' that I need to query in the show.php file.

I also have product variants.

I try to use:

$this-&gt;element-&gt;semana

to query this value but It always give me the child value no the main product (parent) value.

I don´t want my customer to fill the value to 'semana' in each child because they will alway have the same value than the main product.

How can I refer to the parent?

Thanks

---

[ www.webemus.com](http://www.webemus.com)

Last edit: 15 years 7 months ago by [garzarath](/forum/user/1779-garzarath "View garzarath's Profile"). Reason: Closing

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

15 years 7 months ago [\#12888](#12888) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to query custom field on show.php](/forum/4-how-to/12878-solved-how-to-query-custom-field-on-show-php#12888 "Hi,  I have a product custom fiels named 'semana' that I need to query in the show.php file.  I also have product variants.  I try to use:  $this-&gt;element-&gt;semana  to query this value but It always give me the child value no the main product (parent) value.  I don´t want my customer to fill the value to 'semana' in each child because they will alway have the same value than the main product.  How can I refer to the parent?  Thanks")*

Hi,

it should be: $this-&gt;element-&gt;main-&gt;semana

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

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

Less More

- Posts: 14
- Thank you received: 0
-
- [](http://www.webemus.com)
-

15 years 7 months ago [\#12894](#12894) by [garzarath](/forum/user/1779-garzarath "View garzarath's Profile")  Replied by *[garzarath](/forum/user/1779-garzarath "View garzarath's Profile")* on topic *[Re: (Solved) How to query custom field on show.php](/forum/4-how-to/12878-solved-how-to-query-custom-field-on-show-php#12894 "Hi,  I have a product custom fiels named 'semana' that I need to query in the show.php file.  I also have product variants.  I try to use:  $this-&gt;element-&gt;semana  to query this value but It always give me the child value no the main product (parent) value.  I don´t want my customer to fill the value to 'semana' in each child because they will alway have the same value than the main product.  How can I refer to the parent?  Thanks")*

Thanks!!!

it worked.

---

[ www.webemus.com](http://www.webemus.com)

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

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