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

#   How to read something from $order?

##

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

Less More

- Posts: 28
- Thank you received: 0
-
-

15 years 9 months ago [\#6925](#6925) by [RemoteC](/forum/user/788-remotec "View RemoteC's Profile")  *[How to read something from $order?](/forum/4-how-to/6925-how-to-read-something-from-order#6925 "I'm working on a plugin for HikaShop but my problem is that I can't read attributes from $order like the address. Following code is within the 'onAfterOrderCreate(&amp;$order,&amp;$send&#95;email)' function  Why is there only a value in $hikaFoo? The other variables are apparently empty. This is probably a PHP syntax error but I've never worked with such heavy arrays and so I apparently don't know how to adress a specific value.  Is there a more comprehensive developer documentation than this one page?  Best regards!")* was created by *[RemoteC](/forum/user/788-remotec "View RemoteC's Profile")*

I'm working on a plugin for HikaShop but my problem is that I can't read attributes from $order like the address. Following code is within the 'onAfterOrderCreate(&amp;$order,&amp;$send_email)' function Code:

$hikaFirstname = $order-&gt;billing_address-&gt;address_firstname; $hikaLastname = $order-&gt;billing_address-&gt;address_lastname; $hikaCompany = $order-&gt;billing_address-&gt;address_company; $hikaFoo = $order-&gt;order_user_id; echo "&lt;br /&gt;".$hikaFoo; echo "&lt;br /&gt;".$hikaFirstname."&lt;br /&gt;"; echo "Lastname: ".$hikaLastname."&lt;br /&gt;"; echo "Company".$hikaCompany."&lt;br /&gt;";

Why is there only a value in $hikaFoo? The other variables are apparently empty. This is probably a PHP syntax error but I've never worked with such heavy arrays and so I apparently don't know how to adress a specific value.

Is there a more comprehensive developer documentation than this one page?

Best regards!

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

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 9 months ago [\#6932](#6932) 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 read something from $order?](/forum/4-how-to/6925-how-to-read-something-from-order#6932 "I'm working on a plugin for HikaShop but my problem is that I can't read attributes from $order like the address. Following code is within the 'onAfterOrderCreate(&amp;$order,&amp;$send&#95;email)' function  Why is there only a value in $hikaFoo? The other variables are apparently empty. This is probably a PHP syntax error but I've never worked with such heavy arrays and so I apparently don't know how to adress a specific value.  Is there a more comprehensive developer documentation than this one page?  Best regards!")*

You should try $order-&gt;cart-&gt;billing_address instead of $order-&gt;billing_address
More information about that on that thread:
[ www.hikashop.com/en/support/forum/4-how-...-conflicts.html#5794](http://www.hikashop.com/en/support/forum/4-how-to/5786-shipping--payment-method-conflicts.html#5794)

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

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

Less More

- Posts: 28
- Thank you received: 0
-
-

15 years 9 months ago [\#6949](#6949) by [RemoteC](/forum/user/788-remotec "View RemoteC's Profile")  Replied by *[RemoteC](/forum/user/788-remotec "View RemoteC's Profile")* on topic *[Re: How to read something from $order?](/forum/4-how-to/6925-how-to-read-something-from-order#6949 "I'm working on a plugin for HikaShop but my problem is that I can't read attributes from $order like the address. Following code is within the 'onAfterOrderCreate(&amp;$order,&amp;$send&#95;email)' function  Why is there only a value in $hikaFoo? The other variables are apparently empty. This is probably a PHP syntax error but I've never worked with such heavy arrays and so I apparently don't know how to adress a specific value.  Is there a more comprehensive developer documentation than this one page?  Best regards!")*

Thanks!

I just made a second look in the var_dump($order) and now I see that the billing_adress is included in the cart-object ... just messend around with the braces ![:-&#92;](/irritated.gif ":-&#92;")

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

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