Invoice - make quantity bold if greater than 1

  • Posts: 94
  • Thank you received: 0
3 years 2 months ago #328134

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.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 2 months ago #328144

Hi,

You can edit the order / invoice.php view file via the menu Display>Views.
There, the quantity is displayed by this line:

echo $product->order_product_quantity;
So you can change it to :
if($product->order_product_quantity > 1)
 echo '<b>'.$product->order_product_quantity.'</b>';
else 
 echo $product->order_product_quantity;

Last edit: 3 years 2 months ago by nicolas.
The following user(s) said Thank You: GB11

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

  • Posts: 94
  • Thank you received: 0
3 years 2 months ago #328152

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.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 2 months ago #328158

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.046 seconds
Powered by Kunena Forum