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

#   Get Product and Cart information after Order

##

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

Less More

- Posts: 15
- Thank you received: 0
-
-

11 years 2 months ago [\#211079](#211079) by [jdouglas](/forum/user/38148-jdouglas "View jdouglas's Profile")  *[Get Product and Cart information after Order](/forum/28-shipping-methods/878665-get-product-and-cart-information-after-order#211079 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.1 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Getting Products and Cart information after Order Confirmed  Hi, How do I get product information like the dimensions, weight, length etc, after order has been confirmed? This is also when using the ShippingCache plugins. All the information I need is lost when calling the onAfterOrderConfirm(&amp;$order, &amp;$methods, $method&#95;id) function.  Thank you!")* was created by *[jdouglas](/forum/user/38148-jdouglas "View jdouglas's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.1
-- PHP version -- : 5.4.3
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Getting Products and Cart information after Order Confirmed

Hi,
How do I get product information like the dimensions, weight, length etc, after order has been confirmed?
This is also when using the ShippingCache plugins.
All the information I need is lost when calling the onAfterOrderConfirm(&amp;$order, &amp;$methods, $method_id) function.

Thank you!

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

11 years 2 months ago [\#211085](#211085) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Get Product and Cart information after Order](/forum/28-shipping-methods/878665-get-product-and-cart-information-after-order#211085 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.1 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Getting Products and Cart information after Order Confirmed  Hi, How do I get product information like the dimensions, weight, length etc, after order has been confirmed? This is also when using the ShippingCache plugins. All the information I need is lost when calling the onAfterOrderConfirm(&amp;$order, &amp;$methods, $method&#95;id) function.  Thank you!")*

Hi,

All the order data is available in the $order object. Yes, there is no dimensions or weight in there and that's normal since that information is not part of the order but of the products. So the information is not lost. It's just not loaded as not necessary when you usually load the data of an order.
So simply loop through the array of the products in $order-&gt;cart-&gt;products and use the product_id of the elements to load the product information like this: Code:

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

I don't understand what you mean by "This is also when using the ShippingCache plugins."
The onAfterOrderConfirm trigger is a trigger only available for payment plugins and which will be called only for the payment plugin that has been selected by the customer. So there is no link to ShippingCache since that only applies to shipping plugins.

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

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

Less More

- Posts: 15
- Thank you received: 0
-
-

11 years 2 months ago [\#211307](#211307) by [jdouglas](/forum/user/38148-jdouglas "View jdouglas's Profile")  Replied by *[jdouglas](/forum/user/38148-jdouglas "View jdouglas's Profile")* on topic *[Get Product and Cart information after Order](/forum/28-shipping-methods/878665-get-product-and-cart-information-after-order#211307 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.1 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Getting Products and Cart information after Order Confirmed  Hi, How do I get product information like the dimensions, weight, length etc, after order has been confirmed? This is also when using the ShippingCache plugins. All the information I need is lost when calling the onAfterOrderConfirm(&amp;$order, &amp;$methods, $method&#95;id) function.  Thank you!")*

Thanks Nicolas,

That works, I was able to get the product info.
I also needed to get other information about the shipping carrier passed from the Shipping to the onAfterOrderConfirm function, so I ended up creating a database, saving information there, and cleaning the database after I retrieved it in the after Order confirmation. Not sure if there is a better way of doing this.

I tried caching, using constants, etc....those did not work.
Thanks!

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

11 years 2 months ago [\#211311](#211311) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Get Product and Cart information after Order](/forum/28-shipping-methods/878665-get-product-and-cart-information-after-order#211311 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.1 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : Getting Products and Cart information after Order Confirmed  Hi, How do I get product information like the dimensions, weight, length etc, after order has been confirmed? This is also when using the ShippingCache plugins. All the information I need is lost when calling the onAfterOrderConfirm(&amp;$order, &amp;$methods, $method&#95;id) function.  Thank you!")*

Hi,

As I said, all the information of the order is available in $order.
You have $order-&gt;order_shipping_id and $order-&gt;order_shipping_method which will tell you which shipping method and which shipping service were selected for the order.

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

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

[](#top)
