Jump to content

Can the "unable to add item" message be customized on 7.1?

Recommended Posts

@Lalat

I'm thinking the curse of Ajax Loading strikes again! Try turning off Ajax Loading to see if the problem goes away.

Please note that turning off Ajax Loading will affect the performance of your site. Ajax Loading is designed to increase the loading speed of your site after it first loads.

You have to decide whether the custom code you are trying to use is worth turning off Ajax Loading.

paul2009 has a great article on the ins and outs of Ajax Loading. Please see Why does Squarespace code only work on refresh?

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
On 4/5/2022 at 11:22 AM, Lalat said:

its not working either

As mentioned in my post yesterday it appears to be working to me. I even posted a picture of it working. If you are not seeing what I am seeing then you'll need to provide much more detail other than it's not working. How it is not working? What behaviour are you seeing? What did you expect to see? Can you provide pictures along with any descriptions of the problem?

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

@Lalat

I see the issue now. It is the code was designed for product items with variants and doesn't take into account items with no variants.

I think I can come up with a new version of the code but it may take several days.

Please bump this thread in several days if I don't update my 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
  • 4 months later...
2 hours ago, KrisC said:

I am getting repeat lines and I want to get ride of the 'Sorry, that item is out of stock'.

Please post the URL for a page on your site where we can see your issue.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

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
On 9/2/2022 at 3:41 PM, KrisC said:

I am getting repeat lines

You need to set the append constant in the code to false.

    const append = false;

Let us know how it goes.

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
2 hours ago, KrisC said:

I went back to change it again and for me it still says 'false'

Not sure what is going on there but I've discovered a more fundamental issue.

The name of the code is Change Unable to Add Item to Cart Alert for Out of Stock Variants. The code was designed to work with products that have variants. Your products have no variants and so the code is failing.

I don't know of any code that works with products with no variants for v7.1.

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
  • 2 months later...
2 hours ago, maryb2022 said:

I am having the same issue. @creedon - can you look at my cart, please?

It appears to be working after a fashion to me.

674723851_ScreenShot2022-11-11at3_23_53PM.png.dd25bba2c02298731475bf422bd8110d.png

Is your issue related to the note in the code?

 

Quote

Notes : this effect is not active in SS Preview to test it use private browsing < https://bit.ly/3f6lhq2 >.

 

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

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.