Announcement

Collapse
No announcement yet.

Related Products on Alternate Page Template

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

    Related Products on Alternate Page Template

    I have a Related Products slider that is not firing on an Alternate PROD page that I created.

    I have confirmed the following

    The body js ID is js-PROD (I changed it to make sure the js would fire without having to change the scripts.js)

    I have triple checked the code in the Related Products List Layout (I copied it directly from the PROD template page - which is working)

    I have verified that the scripts.js is in the footer of the page

    This is the page:

    http://www.flightquarters.com/bird-d...y-madness.html

    What does this error mean:

    Code:
    Uncaught TypeError: Cannot read property 'value' of null
        at Object.jsPROD (scripts.js:982)
        at HTMLDocument.<anonymous> (scripts.js:25)
        at j (vendor.min.js:2)
        at Object.fireWith [as resolveWith] (vendor.min.js:2)
        at Function.ready (vendor.min.js:2)
        at HTMLDocument.I (vendor.min.js:2) (
    Is it related to commenting out the add to basket button?
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Hi Leslie,

    That error is there because you have commented out the add to cart form which contains the check for attribute machine within it.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Okay, but even if I uncomment that section, the related products slider still doesn't work. That's what needs to be fixed. Also the template is not meant to have an Add to Cart button...

      I have uncommented it so you can see
      Last edited by lesliekirk; 09-29-17, 08:21 AM.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Hi Leslie,

        Since this is not a standard product page, I would recommend creating a new function block in the scripts.js file which would just contain the code you want to use on the page instead of loading in all the overhead of the product page.
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Following on with this. I created a test product and am using the default PROD page and I'm still having an issue with the Related Products layout:

          http://www.flightquarters.com/bird-d...ct/leslie.html


          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Hi Leslie,

            It does not look like you are using the default Product Attribute Template code for this page. Once updated, the JavaScript error being thrown should go away.
            Matt Zimmermann

            Miva Web Developer
            Alchemy Web Development
            https://www.alchemywebdev.com
            Site Development - Maintenance - Consultation

            Miva Certified Developer
            Miva Professional Developer

            https://www.dev4web.net | Twitter

            Comment


              #7
              Originally posted by Matt Zimmermann View Post
              Hi Leslie,

              It does not look like you are using the default Product Attribute Template code for this page. Once updated, the JavaScript error being thrown should go away.
              I'm pretty sure I am but I will start all over again and create a 4th template. I'll grab the code from the default layout from my dev store.
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                I've updated the Product Attribute Template code on an Alternate Page Template. It's directly from Iron & Wool v9.6.
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  Looks like the JavaScript error is gone now. What is the issue you are seeing?
                  Matt Zimmermann

                  Miva Web Developer
                  Alchemy Web Development
                  https://www.alchemywebdev.com
                  Site Development - Maintenance - Consultation

                  Miva Certified Developer
                  Miva Professional Developer

                  https://www.dev4web.net | Twitter

                  Comment


                    #10
                    Originally posted by Matt Zimmermann View Post
                    Looks like the JavaScript error is gone now. What is the issue you are seeing?
                    The Related Product layout is still not right. The two thumbnails are still not side by side. Like here:

                    http://www.flightquarters.com/bird-d...lightsuit.html
                    Leslie Kirk
                    Miva Certified Developer
                    Miva Merchant Specialist since 1997
                    Previously of Webs Your Way
                    (aka Leslie Nord leslienord)

                    Email me: [email protected]
                    www.lesliekirk.com

                    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                    Comment


                      #11
                      You will need to duplicate the jsPROD function in scripts.js and call it jsPRODTEST to have everything function in this alternate page.
                      Matt Zimmermann

                      Miva Web Developer
                      Alchemy Web Development
                      https://www.alchemywebdev.com
                      Site Development - Maintenance - Consultation

                      Miva Certified Developer
                      Miva Professional Developer

                      https://www.dev4web.net | Twitter

                      Comment


                        #12
                        Thanks Matt. I've got it working and am finding the "sweet spot" to hide the Add to Cart button without breaking the javascript. Wow, is it touchy touchy.
                        Leslie Kirk
                        Miva Certified Developer
                        Miva Merchant Specialist since 1997
                        Previously of Webs Your Way
                        (aka Leslie Nord leslienord)

                        Email me: [email protected]
                        www.lesliekirk.com

                        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                        Comment

                        Working...
                        X