Created
March 29, 2018 15:12
-
-
Save biancalpadilla/60094d45cbf91fa7290138f998313a6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For the listing pages, go under Design->Edit HTML/CSS->Header.html panel->at the bottom of that file add: | |
<script> | |
$(".ProductList li").each(function() { | |
if ($(".p-price strike", this).length > 0) { | |
$(this).prepend("<span class='item-sale-label'><img src='image path here' /></span>"); | |
} | |
}); | |
</script> | |
where you will replace the 'image path here' with the image url(for the listing pages, you might need a smaller image), and save the changes. | |
Then go under Design->Edit HTML/CSS->custom.css->at the bottom of that file and add: | |
.ProductList li .item-sale-label { | |
position: absolute; | |
z-index: 1; | |
} | |
then save the changes, and check your store. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment