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

#   Products ordered by model number on invoice and shipping bill

##

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

Less More

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

8 years 2 months ago [\#297959](#297959) by [marcovanlennep](/forum/user/41695-marcovanlennep "View marcovanlennep's Profile")  *[Products ordered by model number on invoice and shipping bill](/forum/33-customers/895722-products-ordered-by-model-number-on-invoice-and-shipping-bill#297959 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.8.11  Hello,  I am trying to get the products ordered by model number on the invoice and shipping bill. I know it is in Display--&gt;View--&gt;Order--&gt;Invoice.php and believe it is in this piece of text around line 105:     config-&gt;get('show&#95;code')) { $colspan++; ?&gt;    As I don't know PHP I think I need to put somewhere ASC to get the products ordered by model number. Can anybody help me and tell me where to put it, Please?")* was created by *[marcovanlennep](/forum/user/41695-marcovanlennep "View marcovanlennep's Profile")*

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.11

Hello,

I am trying to get the products ordered by model number on the invoice and shipping bill.
I know it is in Display--&gt;View--&gt;Order--&gt;Invoice.php and believe it is in this piece of text around line 105:

&lt;th class="title" width="60%"&gt;
&lt;?php echo JText::_('PRODUCT'); ?&gt;
&lt;/th&gt;
&lt;?php if ($this-&gt;config-&gt;get('show_code')) { $colspan++; ?&gt;
&lt;th class="title" &gt;&lt;?php echo JText::_('CART_PRODUCT_CODE'); ?&gt;&lt;/th&gt;
&lt;?php } ?&gt;

As I don't know PHP I think I need to put somewhere ASC to get the products ordered by model number. Can anybody help me and tell me where to put it, Please?

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

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

Less More

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

8 years 2 months ago [\#297990](#297990) by [marcovanlennep](/forum/user/41695-marcovanlennep "View marcovanlennep's Profile")  Replied by *[marcovanlennep](/forum/user/41695-marcovanlennep "View marcovanlennep's Profile")* on topic *[Products ordered by model number on invoice and shipping bill](/forum/33-customers/895722-products-ordered-by-model-number-on-invoice-and-shipping-bill#297990 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.8.11  Hello,  I am trying to get the products ordered by model number on the invoice and shipping bill. I know it is in Display--&gt;View--&gt;Order--&gt;Invoice.php and believe it is in this piece of text around line 105:     config-&gt;get('show&#95;code')) { $colspan++; ?&gt;    As I don't know PHP I think I need to put somewhere ASC to get the products ordered by model number. Can anybody help me and tell me where to put it, Please?")*

Just found this threat on the forum that solved my question:

[ www.hikashop.com/forum/4-how-to/7067-ord...rint-on-invoice.html](https://www.hikashop.com/forum/4-how-to/7067-order-products-print-on-invoice.html)

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

8 years 2 months ago [\#297991](#297991) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Products ordered by model number on invoice and shipping bill](/forum/33-customers/895722-products-ordered-by-model-number-on-invoice-and-shipping-bill#297991 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.8.11  Hello,  I am trying to get the products ordered by model number on the invoice and shipping bill. I know it is in Display--&gt;View--&gt;Order--&gt;Invoice.php and believe it is in this piece of text around line 105:     config-&gt;get('show&#95;code')) { $colspan++; ?&gt;    As I don't know PHP I think I need to put somewhere ASC to get the products ordered by model number. Can anybody help me and tell me where to put it, Please?")*

Hello,

Modifying the HikaShop core to change that behavior will work but is not something recommended since you will lost your modification with the next update.
Using a view override is much more appreciate for that.
[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)

Regarding your first message and the modification ; unfortunately no, it is not there that part that you want to customize.
If you want to change the sort ; you must do it before that line Code:

foreach($this-&gt;order-&gt;products as $product) {

Before in the "foreach" block, all your products will be display one by one ; following the current order in the array or products.

Please note that such kind of modification in the view requires PHP knowledge.
The usage of the PHP function "usort" could be interesting for your case.
[ us3.php.net/manual/en/function.usort.php](http://us3.php.net/manual/en/function.usort.php)
And do not hesitate to use debug function like "var_dump" to display content of variable ; it helps to know the content of product objects and find which elements you can use for your code.
[ us3.php.net/manual/en/function.var-dump.php](http://us3.php.net/manual/en/function.var-dump.php)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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