Jump to content

How can I get the summary grid 'SALE' badges to show on the store page view too?

Go to solution Solved by creedon,

Recommended Posts

On 5/23/2023 at 2:46 AM, creedon said:

Please see Store Product List Sale Badge.

Let us know how it goes.

Hi @creedon

Everything was working great but I've added some custom CSS to show my store page (https://stoneandspectra.squarespace.com/store) in 2 columns for screens below 767px wide (mobile view basically).

And now in this view (767 wide and below) the 'SALE' badges have disappeared.

 

Is there some addition code or styling I need to add to make sure they appear in the 2 column layout?

 

https://stoneandspectra.squarespace.com

Pass: amethyst7
(scroll down until you see the password box)

 

Thanks for your help!

Victoria

Screenshot 2023-05-25 at 17.05.59.png

Link to comment

Hi @creedon me again! I've installed your code for the out of stock badges

https://github.com/tomsWebConsulting/twcsl/tree/main/v7.1/Store Product List Out of Stock Badge

 

But it seems to conflict with the sale badges code.

 

https://stoneandspectra.com

Scroll down for password input: amethyst7

 

The home page (summary block which has native badges) is correct - the first 2 are sold out, the third product is in stock but on sale:

image.thumb.png.5aa620681c0e0ae7d3404a9cc6945f3e.png

 

The store page https://stoneandspectra.com/shop (your code affects this view) - is showing a bug where it's confusing the third product and it's using the badge to display 'sold out' rather than 'sale'. The first two are correct, the very first product should definitely show 'sold out' even though it's also on sale, because its sold out status is more useful for users to know:

image.thumb.png.07b3b65378a84151b69600a7b554405f.png

 

The badges are also not quite working on mobile - just like the sale badge code wasn't at first but then you updated it 🙂.

At the moment it seems to be piggy backing onto the code that's working for the sale badges but changing the text to 'sold out' and it's not showing at all on the second product. The first two are sold out, the third one is just on sale and is in stock.
image.thumb.png.4651e07834e542ac8b753288eb75137c.png

 

Is it possible to have the two codes (sale badges and sold out badges) working together? They are so visually effective! I'd love for them to work.

Thanks for your help,

Vic
 

 

Edited by victoria85
updated a URL
Link to comment
Quote

I've installed your code for the out of stock badges

 

Quote

But it seems to conflict with the sale badges code.

They do conflict as they weren't designed to work together.

Quote

Is it possible to have the two codes (sale badges and sold out badges) working together?

Not with the current technique. For those technically inclined I'm using a CSS ::before pseudo class. If I were to use before and after that would limit the number of badges to two. That would probably work for this request. If I'm going to get them to work together I think I'd like to have the option for more than two badges but that would require that the effect use actual HTML structures and overlay it to control the badges in a list like fashion.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

I just observed that the SOLD OUT badge takes precedence over the SALE badge. I hadn't registered that in my mind previously.

For a CSS only solution such as with my current code, they could never show two badges at once.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@creedon - Hi thanks for the reply! I didn't mean at the same time i.e showing 2 badges on one product, just that the two pieces of code could be used at the same time without conflict.

So that like you said the 'sale' badge would show, but if the item is sold out then it would instead show the 'sold out' badge.

Also if the sold out badge could work on mobile too. Just like you updated the 'sale' badge to work on mobile.

Thanks 🙂

Link to comment
27 minutes ago, victoria85 said:

Also if the sold out badge could work on mobile too. Just like you updated the 'sale' badge to work on mobile.

I can do this easily! Give me a few moments and I'll post in the sold out badge thread about the update.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

That's super! I'll probably disable the 'sale' badges and go for the 'sold out' ones as my shop is going to be quite a small collection of one-off pieces so the 'sold out' badge is going to be more useful from a communication and marketing standpoint. 🙂 Thank you!

Link to comment
Quote

just that the two pieces of code could be used at the same time without conflict.

I'll have to cogitate on this one to see what might be done.

The current issue with the LESS based version is the two pieces of code are sharing the same variables and so the last code installed wins. I'll have to see if I can scope the variables more locally.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

I'll have to see if I can scope the variables more locally.

This looks promising but I can't say I have a solution at this point.

ScreenShot2023-05-27at2_34_47PM.png.45d89afd5ab4f51d66274a3c086fd1eb.png

Notice the different positions. If this works out settings are unique to each effect.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • Solution
Quote

just that the two pieces of code could be used at the same time without conflict.

Done! Grab the latest update! Be sure to grab the other code for its similar update.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks Tom!

I've just gone with the Sold out option - with the latest update, for me, the item that was both sold out and on sale was showing 'sale' rather than sold out.

But I've removed the sale code, like I said I've just gone with the sold out code.

 

Also I think it might be related but a plugin I was using that showed the inventory stopped working. It shows in the builder but not on the live site (e.g. an incognito window). Here they are in the builder preview...

 

Product detail page:

image.thumb.png.f0482931c4934c008d1b553ae0a3bcdc.png

 

/shop page:

image.thumb.png.6b5c9dea15f54b4c75f4d6931ea82423.png

 

They were working until I installed your updated custom css.

 

Link to comment
40 minutes ago, victoria85 said:

I've just gone with the Sold out option - with the latest update, for me, the item that was both sold out and on sale was showing 'sale' rather than sold out.

Understood. But for those that want to have both, but not at the same time. This is what I'm seeing.

ScreenShot2023-05-27at4_33_06PM.png.a862dd068a6cd014b1d8162be7736456.png

This is with...

Store Product List Out of Stock Badge Version 0.4.0

Store Product List Sale Badge 0.3.0

Previous versions to these two will hammer on each other. If you are installing newly you don't have to worry as only the latest code is available from my official cited sources.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

They were working until I installed your updated custom css.

Most of my code is written against a base SS site. I don't write to be compatible with all other plugins.

I'm happy to take a look to see if I can make my code more friendly with other code.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

Also I think it might be related but a plugin I was using that showed the inventory stopped working.

Wait are you using a plugin or the built-in limited availability labels of your site?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Hey, I think there was something odd happening with the css. It was showing in the editor and then not in live view.

So for the time being I uninstalled your code, reinstalled it and deleted the plugin.

I’ll try again tomorrow and let you know where I’m at. It might have been an issue with some of my CSS - I’ll try and check it 🙂

Link to comment
Quote

I’ll try again tomorrow and let you know where I’m at. It might have been an issue with some of my CSS - I’ll try and check it 🙂

Sounds good.

By the way my code does work with the built-in limited availability feature.

ScreenShot2023-05-27at5_14_13PM.png.78b3004c87e68f90124ee161de24def2.png

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Hi Tom!

I checked through all my CSS and as far as I can see there's no errors, so that's good.

Everything is working as expected so far. I have in place:

  • Your sold out badge code - all working
  • Native limited availability text (thank you! I didn't know this was a native feature!)

I'm not sure what was happening last night but my CSS only seemed to load and be visible in the builder with the CSS side bar open. But this has resolved. May have been a glitch.

I have saved all my CSS in a file so I can revert back to it and I'm about to install your sale badge code 🙂

I'll let you know how I get on.

 

I also restyled the badges and I think they look much smarter 🙂

image.thumb.png.c47702ecb5f82006fa46031ca94721f5.png

 

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.