Reputation: 23
I've setup a simple product with custom options but I would like to hide the base price from the category page (list or grid mode). How can I do this ?
I highlighted the "price" I would like to remove : https://i.sstatic.net/VBMzs.png
Here you have my price.phtml code : http://pastebin.com/JGjSQDB7
Upvotes: 2
Views: 3381
Reputation: 11
jQuery(document).ready(function () {
jQuery('.price-box').each(function () {
if (jQuery(this).find(jQuery('.minimal-price-link')).length > 0) {
jQuery(this).find('.regular-price').hide();
}
})
})
Upvotes: 1
Reputation: 4285
Since you have jQuery installed, you can do the following:
jQuery(document).ready(function () {
jQuery('.price-box').each(function () {
if (jQuery(this).find(jQuery('.minimal-price-link')).length > 0) {
jQuery(this).find('.regular-price').hide();
}
})
})
This loops through .price-box
individually and will conditionally hide .regular-price
depending on the availability of .minimal-price-link
in that given box.
Upvotes: 0
Reputation: 3106
I would hide it using CSS, that will likely be the easiest way to hide the price. I'm not sure what your selectors are called. If you include a link to the site I'm sure you can be helped!
Upvotes: 0