Jump to content

Show Number in red when bigger then 1


kimy

Recommended Posts

I've been close to miss this when packing my orders, So therefore I ask:

 

whats the code for showing a number bigger than 1 in the color red

where do I put it and what code do I replace.

the picture is a screenshot of backoffice/orders in prestashop 1.5

 

show_number_in_red.jpg

 

tnx!

post-331260-0-38001600-1348773804_thumb.jpg

post-331260-0-38001600-1348773804_thumb.jpg

Edited by kimy (see edit history)
Link to comment
Share on other sites

Hello,

 

In AdminOrders.php you will have to change

<td align="center" class="productQuantity">'.((int)($product['product_quantity']) - $product['customizationQuantityTotal']).'</td>

In this

<td align="center" class="productQuantity" '.(((int)($product['product_quantity']) - $product['customizationQuantityTotal'])>1? 'style="color:red"':'').'>'.((int)($product['product_quantity']) - $product['customizationQuantityTotal']).'</td>

 

Regards

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

hi! tnx for the answer.

but I can't find the adminorders.php.

I have adminorderscontroller.php and adminorderpreferencecontroller.php

 

but I can't find that code inside of them.

i'm using prestashop 1.5.1 now

Link to comment
Share on other sites

Hi,

 

Yeah my solution was for version previous 1.5 -_-

 

For 1.5 change

<span class="product_quantity_show">{$product['product_quantity']}</span>

 

To this

<span class="product_quantity_show" {if $product['product_quantity']>1}style="color:red"{/if}>{$product['product_quantity']}</span>

 

In this file admin\themes\default\template\controllers\orders\_product_line.tpl

 

Make a back up before modification.

 

Cheers

  • Like 1
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...