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

#   How to load product options?

##

- **[remotelyyours](/forum/user/27477-remotelyyours "View remotelyyours's Profile")**
- [![remotelyyours's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27477.png)](/forum/user/27477-remotelyyours "View remotelyyours's Profile") Topic Author
- [ Offline](/forum/user/27477-remotelyyours)

Less More

- Posts: 28
- Thank you received: 3
-
-

10 years 11 months ago -  10 years 11 months ago [\#221867](#221867) by [remotelyyours](/forum/user/27477-remotelyyours "View remotelyyours's Profile")  *[How to load product options?](/forum/31-development/880684-how-to-load-product-options#221867 "-- url of the page with the problem -- :   albertatacticalrifle.com  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.6.10  How can I load a product options like I load a product?  I want to get the options in the order they are added to the product.  UPDATE. Is seems there is not a special function anywhere. I found the code in the HS code and used it  So my question is closed.")* was created by *[remotelyyours](/forum/user/27477-remotelyyours "View remotelyyours's Profile")*

-- url of the page with the problem -- : [ albertatacticalrifle.com](http://albertatacticalrifle.com)
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.10

How can I load a product options like I load a product? Code:

$productClass = hikashop_get('class.product'); $product=$productClass-&gt;get($product_id);

I want to get the options in the order they are added to the product.

UPDATE.
Is seems there is not a special function anywhere.
I found the code in the HS code and used it Code:

$db = JFactory::getDBO(); $query = 'SELECT a.*,b.* FROM '.hikashop_table('product_related').' AS a LEFT JOIN '.hikashop_table('product').' AS b ON a.product_related_id=b.product_id WHERE a.product_related_type=\'options\' AND a.product_id = '.(int)$product_id.' ORDER BY a.product_related_ordering'; $db-&gt;setQuery($query); $correct_options = $db-&gt;loadObjectList();

So my question is closed.

Last edit: 10 years 11 months ago by [remotelyyours](/forum/user/27477-remotelyyours "View remotelyyours's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDY4NC1ob3ctdG8tbG9hZC1wcm9kdWN0LW9wdGlvbnM/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

10 years 11 months ago -  10 years 11 months ago [\#221873](#221873) 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 load product options?](/forum/31-development/880684-how-to-load-product-options#221873 "-- url of the page with the problem -- :   albertatacticalrifle.com  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.6.10  How can I load a product options like I load a product?  I want to get the options in the order they are added to the product.  UPDATE. Is seems there is not a special function anywhere. I found the code in the HS code and used it  So my question is closed.")*

Hi,

That's right, there is no function to do that (yet).
You'll have to run a MySQL query on the hikashop_product_related and hikashop_product tables in order to get the data of the options of the product.

Last edit: 10 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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

[](#top)
