Announcement

Collapse
No announcement yet.

Product Image Not Displaying on Alternate PROD Page

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

    Product Image Not Displaying on Alternate PROD Page

    Hi All!


    I've created an alternate display page for certain products, but I cannot seem to get the main product image to load. I've made a page that is an exact copy of PROD other than the page code obviously. The main image will not display. It does not display the default "no image available" that is used as a backup if no image is found. In fact, the image machine works fine and retrieves the main image from the server just fine as seen in the html source code. The container is generated for the image, just no image is loaded inside.

    I believe the issue is in either some JS or CSS files that have functions specific to the "PROD" page code. But I'm not sure which file it is.
    - I have changed the body id to js-PROD
    - Copied the jsPROD function in scripts.js and made an identical one for the new page code.
    - Triple checked to make sure the page is identical to PROD in code and items added.
    - Made sure the image has type "main"

    The image shows up perfectly when used on the PROD page, it's just the copy of PROD that it will not show up on.

    Anyone have any idea on what this could be?


    Thanks in advance!
    -Jaime Veronda
    Last edited by jaime.v; 05-17-18, 01:55 PM.

    #2
    Hi Jamie,

    Can you post a link to a standard product and an alternate product page on your site?
    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
      Sure thing,

      PROD page: https://www.ktm-parts.com/URB165420X.html

      Alternate PROD page: https://www.ktm-parts.com/URB1758010.html

      Note that the title of the page is displayed on the alternate prod page, but not on the original.

      Comment


        #4
        Hi Jamie,

        When I look at the alternate page, I am getting a JavaScript error related to a file called 'universal.js' which looks like it is being called in your HEAD tag. That may be interfering with the other functions on the 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
          Yes that error coming up in the console is from a third party company's scripts. I do not believe their scripts rely on the page code as some miva functions do...but I will check to make sure. I think that error is more of a symptom than a cause. Do you happen to know what miva processes might rely specifically on the page code? For example, how the the SFNT has many processes that run only when the SFNT page code is detected.

          Comment


            #6
            Hi Jamie,

            In the ReadyThemes, the JavaScript function in the 'scripts.js' file, that are not global, are executed based on the page ID, in the case of the storefront that is jsSFNT.
            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
              Hey Matt,

              We've fixed the 'universal.js' console error, but are now getting errors in scripts.js. Would you mind to take another look at the page? At least one of the errors seems to be directly related to the page ID because an error is produced on this line " cornerstoneUX[pageID]();". I can see that 'pageID' properly evaluates to jsPROD in my debugger. Do you have any guesses as to what might be causing the error(s)?

              Use this link to see what I'm talking about: https://www.ktm-parts.com/mm5/mercha...ct_Code=14KBST


              Thanks in advance!
              - Jaime

              Comment


                #8
                Hi Jamie,

                It looks like you may not have copied over the code for attribute machine.
                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


                  #9
                  I've checked that along with the settings that go along with the attribute machine and they appear to be the same. I directly copied and pasted from the PROD page attribute machine for the code.

                  Comment


                    #10
                    Hi Jamie,

                    Sorry about that, a bit ill today so the head is fuzzy. I meant to say the code for the product attribute template.
                    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


                      #11
                      I've just double checked and that section is also a direct copy from the PROD page

                      Comment


                        #12
                        Hi Jamie,

                        I am not seeing the product attribute template being output on the page. If this alternate page is for products without attributes, you can add this below the price and it should resolve the JavaScript error.
                        Code:
                        <input type="hidden" name="Product_Attribute_Count" value="0" id="js-product-attribute-count" />
                        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


                          #13
                          While that did fix the JavaScript Error, unfortunately still no product image :(
                          When you click on the zoom, the image appears so I thought perhaps it was something involving the CSS on the page... but I've added the PROD specific CSS that I found on the server to the inline content and still no image.

                          Comment


                            #14
                            Hi Jamie,

                            When I go the product you linked above, the images are showing correctly. You may need to clear your cache and reload the 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

                            Working...
                            X