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

#   Customizing invoices

##

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

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 1 month ago [\#172004](#172004) by [ben1265](/forum/user/29056-ben1265 "View ben1265's Profile")  *[Customizing invoices](/forum/35-orders-management/871679-customizing-invoices#172004 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4.32 -- Browser(s) name and version -- : Firefox 32 -- Error-message(debug-mod must be tuned on) -- : N/A  I'm trying to customize the invoice page. I'd like to add a column to show the product warehouse ID (I'm using Warehouse ID as a place to tell the people in charge of shipping out orders where any product is located). I looked at the view called &quot;invoice&quot; (under Display&#92;Back-end), and I can see the code, but I can't see the query that brings in the information. Could anyone point me to that name and location of the file that contains the query?")* was created by *[ben1265](/forum/user/29056-ben1265 "View ben1265's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.32
-- Browser(s) name and version -- : Firefox 32
-- Error-message(debug-mod must be tuned on) -- : N/A

I'm trying to customize the invoice page. I'd like to add a column to show the product warehouse ID (I'm using Warehouse ID as a place to tell the people in charge of shipping out orders where any product is located). I looked at the view called "invoice" (under Display\Back-end), and I can see the code, but I can't see the query that brings in the information. Could anyone point me to that name and location of the file that contains the query?

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 1 month ago -  12 years 1 month ago [\#172100](#172100) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Customizing invoices](/forum/35-orders-management/871679-customizing-invoices#172100 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.3 -- PHP version -- : 5.4.32 -- Browser(s) name and version -- : Firefox 32 -- Error-message(debug-mod must be tuned on) -- : N/A  I'm trying to customize the invoice page. I'd like to add a column to show the product warehouse ID (I'm using Warehouse ID as a place to tell the people in charge of shipping out orders where any product is located). I looked at the view called &quot;invoice&quot; (under Display&#92;Back-end), and I can see the code, but I can't see the query that brings in the information. Could anyone point me to that name and location of the file that contains the query?")*

Hello,
Even if it's not totally optimized, a solution can be to change these lines : Code:

foreach($this-&gt;order-&gt;products as $product){ if($group &amp;&amp; $product-&gt;order_product_option_parent_id) continue;

By : Code:

$this-&gt;database = JFactory::getDBO(); foreach($this-&gt;order-&gt;products as $product){ if($group &amp;&amp; $product-&gt;order_product_option_parent_id) continue;

And use that php code to display your product warehouse name inside the foreach loop : Code:

$query='SELECT product_warehouse_id FROM '.hikashop_table('product').' WHERE product_id ='.$product-&gt;product_id; $this-&gt;database-&gt;setQuery($query); $product_warehouse_id = $this-&gt;database-&gt;loadResult(); if($product_warehouse_id != 0){ $query='SELECT warehouse_name FROM '.hikashop_table('warehouse').' WHERE warehouse_id ='.$product_warehouse_id; $this-&gt;database-&gt;setQuery($query); $warehouse_name = $this-&gt;database-&gt;loadResult(); echo $warehouse_name; }

Last edit: 12 years 1 month ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

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

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

[](#top)
