Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8720391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:01:53+00:00 2026-06-13T07:01:53+00:00

I am working on a custom ecommerce website. If you go to the following

  • 0

I am working on a custom ecommerce website. If you go to the following link you can view my issue live.

custom ecommerce site »

(username: alex, password: superman)

My problem is that when you click add to cart, my jquery ajax post works great and your item is added to the cart. However, if you first filter by price, THEN try and add to cart, I get a php error. Any ideas why this would be happening…

I’m not super farmiliar with ajax, this is my first super intense ajax project so it may just be something simple like a problem i had earlier where someone introduced me to the live() function in jQuery.

Any help is appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:01:54+00:00Added an answer on June 13, 2026 at 7:01 am

    Ok, so your normal “Add to cart” button works with AJAX. So far so good.

    What you are missing is that when you are filtering by price, you are (most probably) removing all the items from the list, and adding back only those which meet the price criteria. So far so good too!

    After the filtered items are added back, however, you don’t re-initialize the JavaScript bindings on the “Add to cart” buttons.

    Wherever you are doing something like:

    jQuery('.add-to-cart').bind('click', function(){
      // show lightbox and do some stuff here
    }
    

    You need to either call this method / function again, after the filtering is done, or a simpler solution would be to bind the events using live:

    jQuery('.add-to-cart').live('click', function(){
      // do the same stuff as above
    }
    

    Please note that these pieces of code are only an example, I didn’t actually take your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nicely working custom CursorAdapter with customized ListView. This view allows the
I'm working on a custom version of a GNU/Linux live distribution. I need to
I'm working on custom pagination system and encountered following problem. When one of the
I'm working on custom control that I can use for interactions within my app
I'm having trouble figuring out why the following is not working: My custom JS
I'm working on an eCommerce website, in which the Shopping Cart page needs to
I am working with custom module of activecollab, I need to know how can
I am working on custom search for my website. So kindly guide me which
I'm working on a custom user control. How can I prevent the HEIGHT ONLY
I'm working on a custom view for an android application, similar to the Analog

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.