Jump to content

Highlight Quantity When More Than One Item Is Purchased


Nixnix

Recommended Posts

We use our invoices as picking lists. By us, in 95% of the cases, only 1 item per product is purchased, and when it's two or more, it happens that we oversee it.

I wanted to highlight the quantity field (similar to how it is highlighted in the backoffice order page). I did it this way:

 

Open /themes/pdf/invoice.tpl

 

Find



{$order_detail.product_quantity}


 

replace it with:

 



{if $order_detail.product_quantity > 1}
<div style="color: #ffffff; background-color: #000000">  {$order_detail.product_quantity}  </div>
{else}
{$order_detail.product_quantity}
{/if}


 

Stupid simple, of course. This creates a black background with white text for any items with 2 or more purchased. Maybe there is a nicer way to do this and to present it in a prettier way, for those into design (those  's are nasty, I know). But it works and I just thought I would share it.

 

It would be neat if this was the default behaviour of PrestaShop, or at least available as an option for delivery slips and invoices.
Edited by Nixnix (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...