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

#   Display order product lines with 0 quantity units.

##

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

Less More

- Posts: 640
- Thank you received: 16
-
-

8 years 6 months ago [\#292812](#292812) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Display order product lines with 0 quantity units.](/forum/35-orders-management/894733-display-order-product-lines-with-0-quantity-units#292812 "-- HikaShop version -- : 3.4.0 -- HikaMarket version -- : 2.1.1 -- Joomla version -- : 3.8.7 -- PHP version -- : 7.1.0  Hi,  I'm using this code on a custom view to display an order:  But, if any product line in that order have quantity as 0 (because it's a product that doesn't have stock and we can't serve it), it simply doesn't being displayed.  We need that lines to be show.  Is there some way to display it?  Thanks in advance.  -- Victor")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 3.4.0
-- HikaMarket version -- : 2.1.1
-- Joomla version -- : 3.8.7
-- PHP version -- : 7.1.0

Hi,

I'm using this code on a custom view to display an order:
Code:

$orderClass = hikashop_get('class.order'); $order = $orderClass-&gt;loadFullOrder($order_id, true, false);

But, if any product line in that order have quantity as 0 (because it's a product that doesn't have stock and we can't serve it), it simply doesn't being displayed.

We need that lines to be show.

Is there some way to display it?

Thanks in advance.

--
Victor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDczMy1kaXNwbGF5LW9yZGVyLXByb2R1Y3QtbGluZXMtd2l0aC0wLXF1YW50aXR5LXVuaXRzP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

8 years 6 months ago [\#292821](#292821) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display order product lines with 0 quantity units.](/forum/35-orders-management/894733-display-order-product-lines-with-0-quantity-units#292821 "-- HikaShop version -- : 3.4.0 -- HikaMarket version -- : 2.1.1 -- Joomla version -- : 3.8.7 -- PHP version -- : 7.1.0  Hi,  I'm using this code on a custom view to display an order:  But, if any product line in that order have quantity as 0 (because it's a product that doesn't have stock and we can't serve it), it simply doesn't being displayed.  We need that lines to be show.  Is there some way to display it?  Thanks in advance.  -- Victor")*

Hi,

First, this code doesn't display anything. It only loads the data from the database for an order.
Second, the quantity of a product in the shop has nothing to do with the product in the order being in $order-&gt;products or not.
Only the order_product_quantity is taken into account and that's the quantity of the product in the order (the quantity of the product bought). If the order_product_quantity is equal to 0, then that means that the product was not bought and thus the information of that product is discarded in loadFullOrder. It's totally normal and that's what we want.
Otherwise, when you delete a product in an order, you would still get the row in the order, the invoice, etc.
If you really need them, then you need to run a MySQL query yourself on the hikashop_order_product table to load the products of the order yourself.

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

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

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