Jump to content

Hide certain product's price on summary block.

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 10
  • Views 658
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...
8 hours ago, joshcohen said:

Ok https://thirtytwoacres.squarespace.com

pw: 32acres

The meat summary block only some are tagged with "per-kilo" which ill put a :after on the price to display "per kilo" just can't target it in the summary block properly. Any help would be great @tuanphan 🙂

Can you enable Metadata: Tag? (I will use code to hide tag then)

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
15 hours ago, joshcohen said:

OK has been enabled now -- Thanks!

Add to Page Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.summary-metadata-item--tags [href*="Per+Kilo"]').parents('.summary-item').addClass('summary-kilo');
	});
</script>
<style>
  .summary-kilo .product-price {
    display: none;
}
.summary-metadata-item--tags {
    display: none !important;
}
</style>

Screenshot_9.thumb.png.2dc7643deb75a3ee5d72b262dddd0e84.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
1 hour ago, tuanphan said:

Add to Page Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.summary-metadata-item--tags [href*="Per+Kilo"]').parents('.summary-item').addClass('summary-kilo');
	});
</script>
<style>
  .summary-kilo .product-price {
    display: none;
}
.summary-metadata-item--tags {
    display: none !important;
}
</style>

Screenshot_9.thumb.png.2dc7643deb75a3ee5d72b262dddd0e84.png

Hi @tuanphan thanks for this, however what i was looking to do was to have all items tagged with "per kilo" to have after the price "per kilo" i have this working in the shop however not in a summary block..  i appreciate the above though

Link to comment
  • Solution
1 hour ago, joshcohen said:

Hi @tuanphan thanks for this, however what i was looking to do was to have all items tagged with "per kilo" to have after the price "per kilo" i have this working in the shop however not in a summary block..  i appreciate the above though

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.summary-metadata-item--tags [href*="Per+Kilo"]').parents('.summary-item').addClass('summary-kilo');
	});
</script>
<style>
 .summary-kilo .product-price:after {
    content: "Per Kilo";
}
.summary-metadata-item--tags {
    display: none !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
19 minutes ago, tuanphan said:

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.summary-metadata-item--tags [href*="Per+Kilo"]').parents('.summary-item').addClass('summary-kilo');
	});
</script>
<style>
 .summary-kilo .product-price:after {
    content: "Per Kilo";
}
.summary-metadata-item--tags {
    display: none !important;
}
</style>

 

Thanks so much @tuanphan worked perfectly! - Always appreciated!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.