Announcement

Collapse
No announcement yet.

add to cart works on some pages but not on others

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    add to cart works on some pages but not on others

    hi

    I have 3 product layouts and the add to cart only seems to be transfering the product to the cart on one of them.

    this link works correctly
    http://www.mrmattress.co.uk/acatalog...e__4ft_6_.html

    where are this one doesnt
    http://www.mrmattress.co.uk/acatalog...gle__3ft_.html

    the difference between the two is that the bottom one encompasses a javascript that automatically tells you the date of next day delivery as such
    Code:
    <script type="text/javascript">
    
    var d=new Date()
    var weekday=new Array(7)
    weekday[0]="Tuesday"
    weekday[1]="Tuesday"
    weekday[2]="Wednesday"
    weekday[3]="Thursday"
    weekday[4]="Friday"
    weekday[5]="Monday"
    weekday[6]="Tuesday"
    var current= new Date()
    var day_night=current.getHours()
    if (day_night>=11)
    document.write(weekday[d.getDay() + 1])
    else
    document.write(weekday[d.getDay()])</script>
    can anyone help?
    http://www.beddingcentres.co.uk
    memory foam mattresses and discounted beds. free next day delivery on everything over £100

    http://www.mrmattress.co.uk

    #2
    The javascript looks ok. The script error you get when pressing Add to Cart is a perl script error - there may be something in the error log on the server. I've compared the two page sources for differences and found nothing other than product differences and the extra script. I'm curious as to how you got the extra script in there, as the two products use the same template.

    Comment


      #3
      hey thanks for the reply.

      i just copied the product layout to a different name and added that script to that one. and then changed the applicable products

      yeah i do not understand why it doesnt work though
      http://www.beddingcentres.co.uk
      memory foam mattresses and discounted beds. free next day delivery on everything over £100

      http://www.mrmattress.co.uk

      Comment


        #4
        Have you investigated this:
        Originally posted by acompton
        there may be something in the error log on the server
        The site perl scripts leave error information in a log file on the site called either error.err or error.txt (can't remember which). Have a look in there.

        Comment


          #5
          please find attached the error log (error.err)
          Attached Files
          http://www.beddingcentres.co.uk
          memory foam mattresses and discounted beds. free next day delivery on everything over £100

          http://www.mrmattress.co.uk

          Comment


            #6
            also if i run a test on the network settings i get this error message

            The test script failed to execute on the web server. The error could be caused by several things. Check the path to the Perl shell, the CGI script extension, the path to CGI-BIN, and the CGI-BIN URL. This error could also occur if your web site is out of disk space or your web server is not configured to accept POSTs to CGI scripts.
            http://www.beddingcentres.co.uk
            memory foam mattresses and discounted beds. free next day delivery on everything over £100

            http://www.mrmattress.co.uk

            Comment


              #7
              ok lookd a little more into it and it is nothing to do with the product layouts. have checked all products and they seem to have same settings as the ones that work, checked the change in delivery price but that isnt an affecting factor. sat here now scratching my head!
              http://www.beddingcentres.co.uk
              memory foam mattresses and discounted beds. free next day delivery on everything over £100

              http://www.mrmattress.co.uk

              Comment


                #8
                Not sure if it related, but you have two

                HTML Code:
                </head>
                tags in your HTML. This is invalid HTML markup and may well cause problems in some browsers.
                You simply need all your head content wrapped in <head> and </head> before the <body> tag begins.
                Fergus Weir - teclan ltd
                Ecommerce Digital Marketing

                SellerDeck Responsive Web Design

                SellerDeck Hosting
                SellerDeck Digital Marketing

                Comment


                  #9
                  You could also try and encapsulate the javascript for the delivery day in <!-- and //--> as per your "mail a friend" script. This again is good HTML practice.
                  Fergus Weir - teclan ltd
                  Ecommerce Digital Marketing

                  SellerDeck Responsive Web Design

                  SellerDeck Hosting
                  SellerDeck Digital Marketing

                  Comment


                    #10
                    oh thanks for that, unfortunately that hasnt worked. really have no idea!
                    http://www.beddingcentres.co.uk
                    memory foam mattresses and discounted beds. free next day delivery on everything over £100

                    http://www.mrmattress.co.uk

                    Comment


                      #11
                      all sorted, it was the products were set to quanity in shopping cart! cant believe that would cause so many problmes. cheers everyone for your help x
                      http://www.beddingcentres.co.uk
                      memory foam mattresses and discounted beds. free next day delivery on everything over £100

                      http://www.mrmattress.co.uk

                      Comment


                        #12
                        Glad you got is sorted out.
                        I'd still address the </head> duplicate issue I highlighted as well!
                        Fergus Weir - teclan ltd
                        Ecommerce Digital Marketing

                        SellerDeck Responsive Web Design

                        SellerDeck Hosting
                        SellerDeck Digital Marketing

                        Comment

                        Working...
                        X