0

I need to show sale price under normal price, not on the same line

enter image description here

1

Why not just use CSS rather than altering the template for such a minor markup change that's really only serving a styling purpose anyway.

.electro-price > ins{
   display: block;
   float: none; /* <-- In case the theme styles have it floated */
}

You may need to use slightly different styling depending on what's already being applied to the element, potentially even the !important flag to force the override, but that's much better than handling a style issue with a template change or JS injection.

0

If you know the folder structure, you can copy the template file in your custom theme folder and edit the file. Another option you have is using jQuery

jQuery('.electro-price del').after('<br/>');
2
  • If im using jQuery, where do i need to add the code? Apr 7 '19 at 14:19
  • Inside the <script> tag. However, make sure the jQuery library has been loaded first.
    – Karun
    Apr 7 '19 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.