Show old price with line-through I have Drupal 7, without Drupal Commerce modules installed, because we are nor e-commerce place. For some items, we need to show up two prices (old_price and new_price). Only for items for new_price filled I need to show up old_price line-trough or with an X on top. I suppose that I need to put some code in someplace, but where?

I have been looking for a module, but all modules are for commerce. I do not want to install commerce and all the pile of commerce modules just to add this feature.
First, create two fields-"Old price" and "new price". Second, use css text-decoration:line-through; on the old price field.

Edit:

Based on your comment and clarification, I would suggest using rules and rules bonus pack to look for the "new price field", then have it add a body class to the node.

Your rule will look something like


Event #1: "when content is created"
Event #2: "when content is updated"
Condition #1: "entity has field", then select your "new price" field
Condition #2: "Data value is empty" and enable "negate"
Action: "Add body class"


Then in your css add the strikethough based on the extra body class.

This is essentially how the Commerce price savings formatter module works, but without the overhead of using commerce.