Skip to main content

Invoice - make quantity bold if greater than 1

5 years 9 months ago #328134 by GB11
Hi!
I would like to change the invoice to show the quantity as bold if the customer has ordered more than one of the same item.
I can't see where in my invoice I would need to make this change. Can you advise me?

A difference in the appearance when people order more than 1 of the same item will help to stop packing errors.

Thank you

Please Log in or Create an account to join the conversation.

5 years 9 months ago - 5 years 9 months ago #328144 by nicolas
Hi,

You can edit the order / invoice.php view file via the menu Display>Views.
There, the quantity is displayed by this line:
Code:
echo $product->order_product_quantity;
So you can change it to :
Code:
if($product->order_product_quantity > 1) echo '<b>'.$product->order_product_quantity.'</b>'; else echo $product->order_product_quantity;
Last edit: 5 years 9 months ago by nicolas.
The following user(s) said Thank You: GB11

Please Log in or Create an account to join the conversation.

5 years 9 months ago #328152 by GB11
Thank you so much! You are a star.

There is a small typo on the code you've given - just in case anyone else wants to use it - just the ' after the </b> is missing.
So it should be

if($product->order_product_quantity > 1)
echo '<b>'.$product->order_product_quantity.'</b>';
else
echo $product->order_product_quantity;

Please Log in or Create an account to join the conversation.

5 years 9 months ago #328158 by nicolas
Hi,

Yes my bad. I've modified by previous message to reflect that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum