Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save biancalpadilla/60094d45cbf91fa7290138f998313a6e to your computer and use it in GitHub Desktop.
Save biancalpadilla/60094d45cbf91fa7290138f998313a6e to your computer and use it in GitHub Desktop.
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