Add CSS class to table cell if price is disounted

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 11 months ago #124504 by Patrick
Hi

In table layout it would be nice to have an extra CSS class if a discount price is shown.

I have done this with an override. In events_table.php I added this code:
Code:
<?php if ($item->discounted_price < $item->individual_price) : ?> <span class="discount-symbol"></span> <?php endif; ?>

Here is an example: prntscr.com/nh460o

I'm not sure it this code is best solution, but it works :)

Maybe you want to add extra CSS class in core, so no override is needed? :whistle:

Thanks.

Patrick

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

More
4 years 11 months ago #124516 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add CSS class to table cell if price is disounted
Hi Patrick

Please use this override for now. If there are more customers need this, I will consider supporting it in the future

Tuan
The following user(s) said Thank You: Patrick

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

Moderators: Tuan Pham Ngoc