0

I'm creating a custom theme, but most buttons and forms don't work when I activate it. The following, for example, doesn't work:

  • Add to Cart button on product page (nothing happens on click. However, Add to Cart works on category page)
  • Checkout page not working. (when I hit the first "continue" button, a window pops up: "Please choose to register or to checkout as a guest", regardless of whether or not I select "register" or "checkout as guest")
  • On "My Account" page, login button does nothing.
  • On "Create an Account" page, submit does nothing.

This seems to be a systemic problem, and I'm not quite sure how to troubleshoot. I compared the html output of my theme with the output of the "modern" theme (which does work) to see if all the same javascript libraries were being loaded. They are.

I'm running version 1.8.1.0

Has anyone else ran into a similar problem? Any ideas on how to troubleshoot from here?

I should add that I didn't edit any of the forms within my theme template files.

  • I think you are using a theme built for 1.7 or below on 1.8. This won't work most probably because of the new security measure in 1.8 that consists in adding a form key (session dependent) on most forms on frontend. – Marius Apr 8 '14 at 19:19
  • Well, I'm building the theme from scratch, only adding the template files that I need to get the pages looking how I want them to. I haven't changed any of the the forms -- it's just pulling in the default theme for those elements. – Christina Huggins Ramey Apr 9 '14 at 14:09
1

Christina Huggins Ramey,it can be issue with jquery and prototype.js confiscation issue.

in page.xml js arrange should like

    <block type="page/html_head" name="head" as="head">
        <action method="addJs"><script>prototype/prototype.js</script></action>
        <action method="addJs"><script>jquery/jquery-1.7.2.min.js</script></action> 
        <action method="addJs"><script>jquery/jquery.noconflict.js</script></action>

jquery.noconflict.js content is jQuery.noConflict(); Where you use jquery there change $ to jQuery just like $(".amit").html() to jQuery(".amit").html()

  • You were right -- there was a conflict between jquery and prototype.js. I added the noconflict code, and the forms are working again. However, now Twitter Bootstrap isn't working. I'm not sure what else to change -- I'm only pulling in the bootstrap js files in the footer. – Christina Huggins Ramey Apr 9 '14 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.