Results 1 to 10 of 750

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Sorry Lat, I translate with google and sometimes it doesn't correspond to what I want to say, I have to keep this part of script that I put on my initial request, I want it to load on the footer instead of being displayed at the top in the header

    PHP Code:
    <script title="zcJS.ajax">
    if (
    typeof zcJS == "undefined" || !zcJS) {
      
    window.zcJS = { name'zcJS'version'0.1.0.0' };
    }

    zcJS.ajax = function (options) {
      
    options.url options.url.replace("&amp;"unescape("&amp;"));
      var 
    deferred jQuery.Deferred(function (d) {
          var 
    securityToken 'ebc9bace87153cdffdcddfcbb8022a50';
          var 
    defaults = {
              
    cachefalse,
              
    type'POST',
              
    traditionaltrue,
              
    dataType'json',
              
    timeout5000,
              
    datajQuery.extend(true,{
                
    securityTokensecurityToken
            
    }, options.data)
          },
          
    settings jQuery.extend(true, {}, defaultsoptions);
          if (
    typeof(console.log) == 'function') {
              
    console.logsettings );
          }

          
    d.done(settings.success);
          
    d.fail(settings.error);
          
    d.done(settings.complete);
          var 
    jqXHRSettings jQuery.extend(true, {}, settings, {
              
    success: function (responsetextStatusjqXHR) {
                
    d.resolve(responsetextStatusjqXHR);
              },
              
    error: function (jqXHRtextStatuserrorThrown) {
                  if (
    window.console) {
                    if (
    typeof(console.log) == 'function') {
                      
    console.log(jqXHR);
                    }
                  }
                  
    d.reject(jqXHRtextStatuserrorThrown);
              },
              
    completed.resolve
          
    });
          
    jQuery.ajax(jqXHRSettings);
       }).
    fail(function(jqXHRtextStatuserrorThrown) {
       var 
    response jqXHR.getResponseHeader('status');
       var 
    responseHtml jqXHR.responseText;
       var 
    contentType jqXHR.getResponseHeader("content-type");
       switch (
    response)
         {
           case 
    '403 Forbidden':
             var 
    jsonResponse JSON.parse(jqXHR.responseText);
             var 
    errorType jsonResponse.errorType;
             switch (
    errorType)
             {
               case 
    'ADMIN_BLOCK_WARNING':
               break;
               case 
    'AUTH_ERROR':
               break;
               case 
    'SECURITY_TOKEN':
               break;

               default:
                 
    alert('An Internal Error of type '+errorType+' was received while processing an ajax call. The action you requested could not be completed.');
             }
           break;
           default:
            if (
    jqXHR.status === 200) {
                if (
    contentType.toLowerCase().indexOf("text/html") >= 0) {
                    
    document.open();
                    
    document.write(responseHtml);
                    
    document.close();
                }
             }
         }
       });

      var 
    promise deferred.promise();
      return 
    promise;
    };
    zcJS.timer = function (options) {
      var 
    defaults = {
        
    interval10000,
        
    startEventnull,
        
    intervalEventnull,
        
    stopEventnull

    },
      
    settings jQuery.extend(true, {}, defaultsoptions);

      var 
    enabled = new Boolean(false);
      var 
    timerId 0;
      var 
    mySelf;
      
    this.Start = function()
      {
          
    this.enabled = new Boolean(true);

          
    mySelf this;
          
    mySelf.settings settings;
          if (
    mySelf.enabled)
          {
              
    mySelf.timerId setInterval(
              function()
              {
                  if (
    mySelf.settings.intervalEvent)
                  {
                    
    mySelf.settings.intervalEvent(mySelf);
                  }
              }, 
    mySelf.settings.interval);
              if (
    mySelf.settings.startEvent)
              {
                
    mySelf.settings.startEvent(mySelf);
              }
          }
      };
      
    this.Stop = function()
      {
        
    mySelf.enabled = new Boolean(false);
        
    clearInterval(mySelf.timerId);
        if (
    mySelf.settings.stopEvent)
        {
          
    mySelf.settings.stopEvent(mySelf);
        }
      };
    };

    </script> 
    This script is located on includes/templates/template_default/jscript/jscript_framework.php
    I would like to move it to the footer.
    Giovanni,
    Zen Cart V2.1

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,873
    Plugin Contributions
    96

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Quote Originally Posted by diamond1 View Post
    Sorry Lat, I translate with google and sometimes it doesn't correspond to what I want to say, I have to keep this part of script that I put on my initial request, I want it to load on the footer instead of being displayed at the top in the header

    PHP Code:
    <script title="zcJS.ajax">
    if (
    typeof zcJS == "undefined" || !zcJS) {
      
    window.zcJS = { name'zcJS'version'0.1.0.0' };
    }

    zcJS.ajax = function (options) {
      
    options.url options.url.replace("&amp;"unescape("&amp;"));
      var 
    deferred jQuery.Deferred(function (d) {
          var 
    securityToken 'ebc9bace87153cdffdcddfcbb8022a50';
          var 
    defaults = {
              
    cachefalse,
              
    type'POST',
              
    traditionaltrue,
              
    dataType'json',
              
    timeout5000,
              
    datajQuery.extend(true,{
                
    securityTokensecurityToken
            
    }, options.data)
          },
          
    settings jQuery.extend(true, {}, defaultsoptions);
          if (
    typeof(console.log) == 'function') {
              
    console.logsettings );
          }

          
    d.done(settings.success);
          
    d.fail(settings.error);
          
    d.done(settings.complete);
          var 
    jqXHRSettings jQuery.extend(true, {}, settings, {
              
    success: function (responsetextStatusjqXHR) {
                
    d.resolve(responsetextStatusjqXHR);
              },
              
    error: function (jqXHRtextStatuserrorThrown) {
                  if (
    window.console) {
                    if (
    typeof(console.log) == 'function') {
                      
    console.log(jqXHR);
                    }
                  }
                  
    d.reject(jqXHRtextStatuserrorThrown);
              },
              
    completed.resolve
          
    });
          
    jQuery.ajax(jqXHRSettings);
       }).
    fail(function(jqXHRtextStatuserrorThrown) {
       var 
    response jqXHR.getResponseHeader('status');
       var 
    responseHtml jqXHR.responseText;
       var 
    contentType jqXHR.getResponseHeader("content-type");
       switch (
    response)
         {
           case 
    '403 Forbidden':
             var 
    jsonResponse JSON.parse(jqXHR.responseText);
             var 
    errorType jsonResponse.errorType;
             switch (
    errorType)
             {
               case 
    'ADMIN_BLOCK_WARNING':
               break;
               case 
    'AUTH_ERROR':
               break;
               case 
    'SECURITY_TOKEN':
               break;

               default:
                 
    alert('An Internal Error of type '+errorType+' was received while processing an ajax call. The action you requested could not be completed.');
             }
           break;
           default:
            if (
    jqXHR.status === 200) {
                if (
    contentType.toLowerCase().indexOf("text/html") >= 0) {
                    
    document.open();
                    
    document.write(responseHtml);
                    
    document.close();
                }
             }
         }
       });

      var 
    promise deferred.promise();
      return 
    promise;
    };
    zcJS.timer = function (options) {
      var 
    defaults = {
        
    interval10000,
        
    startEventnull,
        
    intervalEventnull,
        
    stopEventnull

    },
      
    settings jQuery.extend(true, {}, defaultsoptions);

      var 
    enabled = new Boolean(false);
      var 
    timerId 0;
      var 
    mySelf;
      
    this.Start = function()
      {
          
    this.enabled = new Boolean(true);

          
    mySelf this;
          
    mySelf.settings settings;
          if (
    mySelf.enabled)
          {
              
    mySelf.timerId setInterval(
              function()
              {
                  if (
    mySelf.settings.intervalEvent)
                  {
                    
    mySelf.settings.intervalEvent(mySelf);
                  }
              }, 
    mySelf.settings.interval);
              if (
    mySelf.settings.startEvent)
              {
                
    mySelf.settings.startEvent(mySelf);
              }
          }
      };
      
    this.Stop = function()
      {
        
    mySelf.enabled = new Boolean(false);
        
    clearInterval(mySelf.timerId);
        if (
    mySelf.settings.stopEvent)
        {
          
    mySelf.settings.stopEvent(mySelf);
        }
      };
    };

    </script> 
    This script is located on includes/templates/template_default/jscript/jscript_framework.php
    I would like to move it to the footer.
    Moving that script to the footer could result in issues, since that's a core Zen Cart script that loads on every page. Before I go to the effort of describing how that could be done (although not recommended), I need to understand what problem you're trying to solve with that movement.

    Note, too, that this discussion has nothing to do with the Image Handler plugin so I'll ask that you re-post your original question and my comment above to another separate forum thread.

  3. #3
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Sorry Lat, I translate with google and sometimes it doesn't correspond to what I want to say, I have to keep this part of script that I put on my initial request, I want it to load on the footer instead of being displayed at the top in the header
    PHP Code:
    <script title="zcJS.ajax">
    if (
    typeof zcJS == "undefined" || !zcJS) {
      
    window.zcJS = { name'zcJS'version'0.1.0.0' };
    }

    zcJS.ajax = function (options) {
      
    options.url options.url.replace("&amp;"unescape("&amp;"));
      var 
    deferred jQuery.Deferred(function (d) {
          var 
    securityToken 'ebc9bace87153cdffdcddfcbb8022a50';
          var 
    defaults = {
              
    cachefalse,
              
    type'POST',
              
    traditionaltrue,
              
    dataType'json',
              
    timeout5000,
              
    datajQuery.extend(true,{
                
    securityTokensecurityToken
            
    }, options.data)
          },
          
    settings jQuery.extend(true, {}, defaultsoptions);
          if (
    typeof(console.log) == 'function') {
              
    console.logsettings );
          }

          
    d.done(settings.success);
          
    d.fail(settings.error);
          
    d.done(settings.complete);
          var 
    jqXHRSettings jQuery.extend(true, {}, settings, {
              
    success: function (responsetextStatusjqXHR) {
                
    d.resolve(responsetextStatusjqXHR);
              },
              
    error: function (jqXHRtextStatuserrorThrown) {
                  if (
    window.console) {
                    if (
    typeof(console.log) == 'function') {
                      
    console.log(jqXHR);
                    }
                  }
                  
    d.reject(jqXHRtextStatuserrorThrown);
              },
              
    completed.resolve
          
    });
          
    jQuery.ajax(jqXHRSettings);
       }).
    fail(function(jqXHRtextStatuserrorThrown) {
       var 
    response jqXHR.getResponseHeader('status');
       var 
    responseHtml jqXHR.responseText;
       var 
    contentType jqXHR.getResponseHeader("content-type");
       switch (
    response)
         {
           case 
    '403 Forbidden':
             var 
    jsonResponse JSON.parse(jqXHR.responseText);
             var 
    errorType jsonResponse.errorType;
             switch (
    errorType)
             {
               case 
    'ADMIN_BLOCK_WARNING':
               break;
               case 
    'AUTH_ERROR':
               break;
               case 
    'SECURITY_TOKEN':
               break;

               default:
                 
    alert('An Internal Error of type '+errorType+' was received while processing an ajax call. The action you requested could not be completed.');
             }
           break;
           default:
            if (
    jqXHR.status === 200) {
                if (
    contentType.toLowerCase().indexOf("text/html") >= 0) {
                    
    document.open();
                    
    document.write(responseHtml);
                    
    document.close();
                }
             }
         }
       });

      var 
    promise deferred.promise();
      return 
    promise;
    };
    zcJS.timer = function (options) {
      var 
    defaults = {
        
    interval10000,
        
    startEventnull,
        
    intervalEventnull,
        
    stopEventnull

    },
      
    settings jQuery.extend(true, {}, defaultsoptions);

      var 
    enabled = new Boolean(false);
      var 
    timerId 0;
      var 
    mySelf;
      
    this.Start = function()
      {
          
    this.enabled = new Boolean(true);

          
    mySelf this;
          
    mySelf.settings settings;
          if (
    mySelf.enabled)
          {
              
    mySelf.timerId setInterval(
              function()
              {
                  if (
    mySelf.settings.intervalEvent)
                  {
                    
    mySelf.settings.intervalEvent(mySelf);
                  }
              }, 
    mySelf.settings.interval);
              if (
    mySelf.settings.startEvent)
              {
                
    mySelf.settings.startEvent(mySelf);
              }
          }
      };
      
    this.Stop = function()
      {
        
    mySelf.enabled = new Boolean(false);
        
    clearInterval(mySelf.timerId);
        if (
    mySelf.settings.stopEvent)
        {
          
    mySelf.settings.stopEvent(mySelf);
        }
      };
    };

    </script> 
    This script is located on includes/templates/template_default/jscript/jscript_framework.php
    I would like to move it to the footer, for SEO reasons, from experience it is better to show more text than scripts as possible.

    Lat
    Moving that script to the footer could result in issues, since that's a core Zen Cart script that loads on every page. Before I go to the effort of describing how that could be done (although not recommended), I need to understand what problem you're trying to solve with that movement.
    Giovanni,
    Zen Cart V2.1

  4. #4
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Merci beaucoup.
    Giovanni,
    Zen Cart V2.1

 

 

Similar Threads

  1. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 176
    Last Post: 14 Dec 2025, 12:55 AM
  2. v150 Image Handler 4 (for v1.5.x) Support Thread
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1687
    Last Post: 17 Nov 2024, 07:26 PM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. v138a Image Handler 2 (for ZC v1.3.8 ONLY) Support
    By timkroeger in forum All Other Contributions/Addons
    Replies: 7098
    Last Post: 12 Oct 2014, 03:48 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

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