{"id":2793,"date":"2022-08-30T15:27:49","date_gmt":"2022-08-30T15:27:49","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/16\/wp-ecommerce-ajax-error-wpsc_ajax-not-defined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:49","modified_gmt":"2022-08-30T15:27:49","slug":"wp-ecommerce-ajax-error-wpsc_ajax-not-defined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/wp-ecommerce-ajax-error-wpsc_ajax-not-defined-collection-of-common-programming-errors\/","title":{"rendered":"WP-ecommerce ajax error wpsc_ajax not defined-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve got a problem with my WP-ecommerce plugin (3.8.12.1) in wordpress. My add to cart button refreshes the page. I&#8217;m getting an javascript error:<\/p>\n<p>Uncaught ReferenceError: wpsc_ajax is not defined in wp-e-commerce.js on line 275:<\/p>\n<pre><code>jQuery.post( wpsc_ajax.ajaxurl, form_values, success, 'json' );\n<\/code><\/pre>\n<p>This means my jquery.post is not performed and a normal post action is performed. I am not sure when this problem started to occur but I think it was when I installed w3 total cache (a wordpress cache plugin). Does anybody know where wpsc_ajax is defined or what the actual problem might be? Any help in the right direction is appreciated, I&#8217;m kind of stuck!<\/p>\n<p>Cheers, Adnan<\/p>\n<p id=\"rop\"><small>Originally posted 2014-02-16 14:45:06. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a problem with my WP-ecommerce plugin (3.8.12.1) in wordpress. My add to cart button refreshes the page. I&#8217;m getting an javascript error: Uncaught ReferenceError: wpsc_ajax is not defined in wp-e-commerce.js on line 275: jQuery.post( wpsc_ajax.ajaxurl, form_values, success, &#8216;json&#8217; ); This means my jquery.post is not performed and a normal post action is performed. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2793","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2793"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2793\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}