Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Antoine Muzy

Highlight Quantity > 1 in product details meta

Hi there,

I would like to highlight the quantity when it’s higher than “1” in the product details meta.

I know how to do it in the ShopOrder > ProductDetails.php at line 46, but i don’t know how to keep my modification when updating plugin.

Is there a filter or action to use in a snippet ?


2 years ago
Stefan van den Dungen Gronovius

Hi Antoine,

In your case, you have two options.

1) Create your own column that does exactly what you want. You can even choose to extend the ProductDetails column or just create a duplicate one. You can have a look at our toolkit to create your own column.
If you extend the Product Detail column, you only need to change the get_value() method.

2) You could alter the value with this hook:
This is maybe a bit easier and faster to implement, but since you will probably completely rewrite the value, it is not so great performance-wise.

The first solution is the most sustainable solution and the second solution is the easiest to implement.

2 years ago

You must be logged in to reply to this topic.