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

#   Add total quantity of products in invoice

##

- **[Carolek](/forum/user/8329-carolek "View Carolek's Profile")**
- [![Carolek's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/pinkflower.gif)](/forum/user/8329-carolek "View Carolek's Profile") Topic Author
- [ Offline](/forum/user/8329-carolek)

Less More

- Posts: 157
- Thank you received: 2
-
-

12 years 5 months ago [\#158370](#158370) by [Carolek](/forum/user/8329-carolek "View Carolek's Profile")  *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158370 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")* was created by *[Carolek](/forum/user/8329-carolek "View Carolek's Profile")*

-- url of the page with the problem -- : [ mywebsite.com/mypage](http://mywebsite.com/mypage)
-- HikaShop version -- :2.3.0
-- Joomla version -- : 2.5.20
Hello again ![:)](/media/kunena/emoticons/3.png ":)")

My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent.
Is that possible?
So the customer can see in the subtotal row the quantity of products that is sent to him.
Thank you.
(attached view)

- [ ![haa9d129.jpg](/forum/attachment/17606) ](/forum/attachment/17606 "haa9d129.jpg") [ ](/forum/attachment/17606?download=1 "haa9d129.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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 5 months ago [\#158373](#158373) 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 *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158373 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hello,

> My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent.

If you want to show the quantity of products in your order in the subtotal row, you'll have to edit the ''Invoice" file of the "order" view of your back-end template through "Hikashop-&gt;Display-&gt;Views" and change this line : Code:

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

By : Code:

$total_quantity = 0; foreach($this-&gt;order-&gt;products as $product){ $total_quantity += $product-&gt;order_product_quantity;

And these lines : Code:

&lt;?php if($this-&gt;config-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;order-&gt;order_subtotal,$this-&gt;order-&gt;order_currency_id); }else{ echo $this-&gt;currencyHelper-&gt;format($this-&gt;order-&gt;order_subtotal_no_vat,$this-&gt;order-&gt;order_currency_id); } ?&gt;

By : Code:

&lt;?php if($this-&gt;config-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;order-&gt;order_subtotal,$this-&gt;order-&gt;order_currency_id); }else{ echo $this-&gt;currencyHelper-&gt;format($this-&gt;order-&gt;order_subtotal_no_vat,$this-&gt;order-&gt;order_currency_id); } echo 'for '.$total_quantity.' product(s)'; ?&gt;

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

- **[Carolek](/forum/user/8329-carolek "View Carolek's Profile")**
- [![Carolek's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/pinkflower.gif)](/forum/user/8329-carolek "View Carolek's Profile") Topic Author
- [ Offline](/forum/user/8329-carolek)

Less More

- Posts: 157
- Thank you received: 2
-
-

12 years 5 months ago [\#158489](#158489) by [Carolek](/forum/user/8329-carolek "View Carolek's Profile")  Replied by *[Carolek](/forum/user/8329-carolek "View Carolek's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158489 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Thanks. I' made the changes but nothing happened. :dry:
Do you have an idea why?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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 5 months ago [\#158590](#158590) 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 *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158590 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

My bad, I thought that you were talking about the invoice, but regarding the screenshot that you sent, you were talking about your email.
The solution will be directly edit the code of the "preload version" of your email through "Hikashop-&gt;System-&gt;Emails-&gt;Your emails"

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

- **[Carolek](/forum/user/8329-carolek "View Carolek's Profile")**
- [![Carolek's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/pinkflower.gif)](/forum/user/8329-carolek "View Carolek's Profile") Topic Author
- [ Offline](/forum/user/8329-carolek)

Less More

- Posts: 157
- Thank you received: 2
-
-

12 years 5 months ago [\#158616](#158616) by [Carolek](/forum/user/8329-carolek "View Carolek's Profile")  Replied by *[Carolek](/forum/user/8329-carolek "View Carolek's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158616 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Ok, I edited it but not so good. I don't know what is the code for this. I write something like this:
Code:

&lt;tr&gt; &lt;td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:TOTAL_QUANTITY}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt;

I attached what I got. I need the total of product to be only in the first row of the order footer. Can you please help me with this row?
Thanks!

- [ ![hc9a8e39.jpg](/forum/attachment/17634) ](/forum/attachment/17634 "hc9a8e39.jpg") [ ](/forum/attachment/17634?download=1 "hc9a8e39.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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 5 months ago [\#158803](#158803) 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 *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#158803 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hello,
The solution will just be to edit the "preload version" of your email and change these lines : Code:

foreach($data-&gt;cart-&gt;products as $item) { if($group &amp;&amp; $item-&gt;order_product_option_parent_id) continue; $product = $productClass-&gt;products[$item-&gt;product_id]; $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTIY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, );

By : Code:

$total_quantity = 0; foreach($data-&gt;cart-&gt;products as $item) { if($group &amp;&amp; $item-&gt;order_product_option_parent_id) continue; $product = $productClass-&gt;products[$item-&gt;product_id]; $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTIY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, ); $total_quantity += $item-&gt;order_product_quantity;

And these lines : Code:

if(bccomp($data-&gt;cart-&gt;order_discount_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_shipping_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_payment_price,0,5) &#124;&#124; ($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax) &#124;&#124; !empty($data-&gt;cart-&gt;additional)){ $cartFooters[] = array( 'NAME' =&gt; JText::_('SUBTOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) ); }

By : Code:

if(bccomp($data-&gt;cart-&gt;order_discount_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_shipping_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_payment_price,0,5) &#124;&#124; ($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax) &#124;&#124; !empty($data-&gt;cart-&gt;additional)){ $cartFooters[] = array( 'NAME' =&gt; JText::_('SUBTOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) . ' for '.$total_quantity.' product(s)' ); }

The following user(s) said Thank You: [Carolek](/forum/user/8329-carolek "View Carolek's Profile")

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

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

Less More

- Posts: 14
- Thank you received: 1
-
-

3 years 11 months ago [\#347152](#347152) by [deboni](/forum/user/61732-deboni "View deboni's Profile")  Replied by *[deboni](/forum/user/61732-deboni "View deboni's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347152 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi Mohamed

I should do the same thing for my customer but could't find these lines anywhere in the «preload version».

It is also a rather old post so maybe this isn't done the same way anymore.

The idea is to show the total quantity of products in the mails to admin and customer.

Is there a way to do that?

regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

3 years 11 months ago [\#347154](#347154) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347154 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi,

While the code changed, it's still roughly the same. If you look carefully in the preload, you'll see the pieces of code, with slight differences and you can apply the changes.
For example, for the first piece of code, it is now: Code:

foreach($data-&gt;cart-&gt;products as $item) { if($group &amp;&amp; $item-&gt;order_product_option_parent_id) continue; $product = @$productClass-&gt;all_products[$item-&gt;product_id]; $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTITY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, );

As you can see, there is only the line Code:

$product = @$productClass-&gt;all_products[$item-&gt;product_id];

which is different.
So you can apply the same changes and you'll get: Code:

$total_quantity = 0; foreach($data-&gt;cart-&gt;products as $item) { if($group &amp;&amp; $item-&gt;order_product_option_parent_id) continue; $product = @$productClass-&gt;all_products[$item-&gt;product_id]; $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTITY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, ); $total_quantity += $item-&gt;order_product_quantity;

And it's the same for the second code. It is now: Code:

if(bccomp(sprintf('%F',$data-&gt;cart-&gt;order_discount_price),0,5) != 0 &#124;&#124; bccomp(sprintf('%F',$data-&gt;cart-&gt;order_shipping_price),0,5) != 0 &#124;&#124; bccomp(sprintf('%F',$data-&gt;cart-&gt;order_payment_price),0,5) != 0 &#124;&#124; ($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax) &#124;&#124; !empty($data-&gt;cart-&gt;additional)){ $cartFooters[] = array( 'CLASS' =&gt; 'subtotal', 'NAME' =&gt; JText::_('SUBTOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) ); }

as you can see, it's only the first line which change and thus you can still change the line: Code:

'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id)

to:
Code:

'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) . ' for '.$total_quantity.' product(s)'

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

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

Less More

- Posts: 14
- Thank you received: 1
-
-

3 years 11 months ago -  3 years 11 months ago [\#347175](#347175) by [deboni](/forum/user/61732-deboni "View deboni's Profile")  Replied by *[deboni](/forum/user/61732-deboni "View deboni's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347175 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi Mohamed

Thank you.

I got this to work with your code and it calculates the total quantity of ordered items correctly.

However, it puts the value in the Discount (Rabatt), and it is also labeled Discount (Rabatt).

Is it not possible to make a separate line for this: i.e. Total Items 25

The customer gets the mail correctly with the proper discount.

regards
[ ![Screenshot2022-12-04at16.06.47.png](/forum/attachment/56048) ](/forum/attachment/56048 "...at16.06.47.png")

[ ![Screenshot2022-12-04at16.08.59.png](/forum/attachment/56047) ](/forum/attachment/56047 "...at16.08.59.png")

- [ ![Screenshot2022-12-04at16.08.59.png](/forum/attachment/56047) ](/forum/attachment/56047 "...at16.08.59.png") [ ](/forum/attachment/56047?download=1 "...at16.08.59.png")
- [ ![Screenshot2022-12-04at16.06.47.png](/forum/attachment/56048) ](/forum/attachment/56048 "...at16.06.47.png") [ ](/forum/attachment/56048?download=1 "...at16.06.47.png")

Last edit: 3 years 11 months ago by [deboni](/forum/user/61732-deboni "View deboni's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

3 years 11 months ago [\#347176](#347176) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347176 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi,

If you have it added to the discount it means that you didn't do the last change properly.
So revert that last change.
Instead, you can add: Code:

$cartFooters[] = array( 'CLASS' =&gt; 'quantity', 'NAME' =&gt; 'Total quantity', 'VALUE' =&gt;$total_quantity );

before the code: Code:

$cartFooters[] = array( 'CLASS' =&gt; 'subtotal', 'NAME' =&gt; JText::_('SUBTOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) );

and it will be added as an extra line before the subtotal.

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

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

Less More

- Posts: 14
- Thank you received: 1
-
-

3 years 11 months ago [\#347511](#347511) by [deboni](/forum/user/61732-deboni "View deboni's Profile")  Replied by *[deboni](/forum/user/61732-deboni "View deboni's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347511 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi Mohamed

thanks! That worked now.

The customer would like to show that value somewhere near the top. Is it even possible to show it somewhere else or can that only be done in the footer?

regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2ODY3NS1hZGQtdG90YWwtcXVhbnRpdHktb2YtcHJvZHVjdHMtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) 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: 86556
- Thank you received: 14305
-
-

3 years 11 months ago [\#347514](#347514) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347514 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Hi,

It would be great if you could explain precisely what you want from the start next time.

It can be done yes.
Before the line: Code:

$cartFooters[] = array(

add the code: Code:

$vars['TOTAL_QUANTITY'] = $total_quantity;

Then, you can use the tag {VAR:TOTAL_QUANTITY} in the HTML area to place the total quantity wherever you want in the email.

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

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

Less More

- Posts: 14
- Thank you received: 1
-
-

3 years 11 months ago [\#347532](#347532) by [deboni](/forum/user/61732-deboni "View deboni's Profile")  Replied by *[deboni](/forum/user/61732-deboni "View deboni's Profile")* on topic *[Add total quantity of products in invoice](/forum/35-orders-management/868675-add-total-quantity-of-products-in-invoice#347532 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.3.0 -- Joomla version -- : 2.5.20 Hello again :)  My client wants that the invoice that is sent to the customer shows in the subtotal row the quantity of products that is sent. Is that possible? So the customer can see in the subtotal row the quantity of products that is sent to him. Thank you. (attached view)")*

Thank you very much and sorry for the inconvenience.

I'm trying to avoid this with my customers and in this case I couldn't avoid it.

It works great now!

regards

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

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