Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2012
    Posts
    94
    Plugin Contributions
    0

    red flag Help! Add to Cart button doesn't Add to Cart

    Please help, My add to cart button doesn't add the products to the cart!!
    http://wwrepair.com/parts

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Help! Add to Cart button doesn't Add to Cart

    Looking at you page source, I think your problem starts here:

    <div id="currency_header">
    HTML Code:
                        <!-- Currencies -->
    
    						<form name="currencies" action="http://www.wwrepair.com/parts/index.php?main_page=index" method="get">                        
                                                    
                        <!--       Currency:&nbsp;<select name="currency" class="header1_sel" onchange="this.form.submit();">
      <option value="USD" selected="selected">US Dollar</option>
    </select>
    <input type="hidden" name="main_page" value="product_info" /><input type="hidden" name="cPath" value="151_192" /><input type="hidden" name="products_id" value="5167" />                        </form>
                            <!-- End Currencies -->
                        
                        
                        
                        </div>
    You have commented out the CLOSING FORM tag, but not the opening one.

    Later, you get the shopping cart <form>, but it is in conflict with the already-open currencies form.
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2012
    Posts
    94
    Plugin Contributions
    0

    Default Re: Help! Add to Cart button doesn't Add to Cart

    OMG!! I love you!! That fixed it. Wow, that was scary..thank you so much!!

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Help! Add to Cart button doesn't Add to Cart

    If there is a switch in the admin panel to show/hide elements, then that is what should be used in preference to hard-coding such behaviour.

    Only hard-code a functional element if there is no other way to obtain/remove the desired behaviour.
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2012
    Posts
    94
    Plugin Contributions
    0

    Default Re: Help! Add to Cart button doesn't Add to Cart

    Quote Originally Posted by schoolboy View Post
    If there is a switch in the admin panel to show/hide elements, then that is what should be used in preference to hard-coding such behaviour.

    Only hard-code a functional element if there is no other way to obtain/remove the desired behaviour.
    I am not aware of anyway to remove the currency header in admin. If there is, please tell me and I will change the code back to the way it was. I also prefer not to change the code unless I have to, you are absolutely correct.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Help! Add to Cart button doesn't Add to Cart

    Quote Originally Posted by WWRepair View Post
    I am not aware of anyway to remove the currency header in admin. If there is, please tell me and I will change the code back to the way it was. I also prefer not to change the code unless I have to, you are absolutely correct.
    For your template, there may not be a switch in admin... All I am saying is that when there IS a switch, it's better to use it.

    I make a lot of changes to the code and also make mistakes, so what I do is this:

    1. FTP a COPY of the file I want to change to my computer.
    2. Make the changes on that copy.
    3. BEFORE I ftp it back to the server, I re-name the original file to something like tpl_abcde.SUSP (does not really matter what you name it as, so long as it's not "php".
    4. Then I FTP the edited copy to the appropriate location.
    5. If my changes break things, I simply REMOVE my copy, and RE-NAME the SUSP file back to php .
    20 years a Zencart User

 

 

Similar Threads

  1. Add to cart button doesn't open shopping cart
    By njmim1313 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Mar 2010, 09:11 PM
  2. Add to cart button sometimes doesn't work
    By eastwood in forum Bug Reports
    Replies: 4
    Last Post: 3 Nov 2009, 03:51 PM
  3. Add to cart button doesn't add - from any page
    By jguttman in forum General Questions
    Replies: 23
    Last Post: 3 Oct 2009, 03:12 PM
  4. Buy button on homepage doesn't add product to cart
    By Kinjal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Jul 2008, 09:26 AM
  5. Sporadic - Add to Cart Button doesn't Add
    By jromanoff in forum Bug Reports
    Replies: 11
    Last Post: 6 Aug 2006, 07:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR