Announcement

Collapse
No announcement yet.

PROD Page class="header clearfix" and product_display_imagemachine

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

    PROD Page class="header clearfix" and product_display_imagemachine

    Under the Suivant theme. Can someone explain why when you turn off item "product_display_imagemachine" on PROD page class="header clearfix stuck" stops working.

    fixed header clear fix work on CTGY page just fine.

    The fixed header no longer stays on page.
    Last edited by field; 06-01-15, 04:43 PM.

    #2
    Re: PROD Page class="header clearfix" and product_display_imagemachine

    By turning off the item, you are removing JavaScript from the page which is called upon later in the scripts.js file. My guess is you should be receiving a JavaScript error in your browser console which will point to a failed function causing the rest of the scripts to now run.
    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
      Re: PROD Page class="header clearfix" and product_display_imagemachine

      On CTGY page I do not see any call for script.js

      It is the same on PROD page

      on PROD page I do see 4additional scripts for imagemachine
      ajax.js
      runtime.js
      MivaEvents.js
      ImageMachine.js

      none of which seems like it controls the header js-header stuck function.

      in script.js there are several calls for stuck function.

      Comment


        #4
        Re: PROD Page class="header clearfix" and product_display_imagemachine

        Scripts.js is called in the global footer with some functions, such as stuck, which are called on every page. In the case of stuck, that actual function resides in the plugins.js file which is also called on every page. Can you post a link to your 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
          Re: PROD Page class="header clearfix" and product_display_imagemachine

          cant post a link, the page are pw protected.

          The only thing I have down was comment out line
          <mvt:item name="product_display_imagemachine" param="head" />

          If I comment out that line or delete it header stuck stops working.

          It doesnt seem like that line would effect the floating header but it does

          Comment


            #6
            Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

            When you comment out that item, it doesn't output JavaScript to the page which is expected to be there for functions running in plugins.js and scripts.js. If the functions are not found, then the scripts stop working and throw an error. One of the functions that is affected is the stick header.
            Last edited by Matt Zimmermann; 06-02-15, 10:01 AM.
            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
              Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

              Since the section should be only for imagemachine it doesnt make sense that it would effect the floating header.
              Unless the scripts were combined in some way.

              Since this section is not used on CTGY it should function just the same.

              Comment


                #8
                Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

                Since JavaScript is executed in a linear fashion, if a referenced function is missing, it will stop executing the remaining scripts. On the PROD page, there are functions relying on elements in the imagemachine script to be executed. Without them, the functions fail.
                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
                  Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

                  Since I am not using the imagemachine function I dont need it there.

                  I am trying to set up a new style for images and don't need these lines.

                  My question is how to restore the stuck function. Without these lines of code

                  Comment


                    #10
                    Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

                    You will, most likely, need to update some of the functions within the scripts.js file for the PROD page and maybe in the plugins.js file as well that rely on imagemachine.
                    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
                      Re: PROD Page class=&quot;header clearfix&quot; and product_display_imagemachine

                      I have traced it down to MivaEvents.js file

                      Unfortunatly from there I can not see a conflict why it prevents .stuck from working

                      var MivaEvents =
                      {
                      SubscribeToEvent: function( evt_code, fn )
                      {
                      var i;

                      if ( typeof this.data[ evt_code ] === 'undefined' )
                      {
                      this.data[ evt_code ] = new Array();
                      }

                      for ( i = 0; i < this.data[ evt_code ].length; i++ )
                      {
                      if ( this.data[ evt_code ][ i ] === fn )
                      {
                      return i;
                      }
                      }

                      return this.data[ evt_code ].push( fn ) - 1;
                      },
                      UnsubscribeFromEvent: function( evt_code, index )
                      {
                      if ( typeof this.data[ evt_code ] === 'undefined' )
                      {
                      return;
                      }

                      this.data[ evt_code ].splice( index, 1 );
                      },
                      ThrowEvent: function( evt_code, miva_data )
                      {
                      var i;

                      if ( typeof this.data[ evt_code ] === 'undefined' )
                      {
                      return;
                      }

                      for ( i = 0; i < this.data[ evt_code ].length; i++ )
                      {
                      if ( typeof this.data[ evt_code][ i ] !== 'function' )
                      {
                      continue;
                      }

                      this.data[ evt_code ][ i ]( miva_data );
                      }
                      },
                      data: []
                      }

                      Comment

                      Working...
                      X