Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2007
    Posts
    8
    Plugin Contributions
    0

    Default Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    Morning everyone.

    I'm in the final stages of testing my template after upgrading my store from 1.5.1 to 1.5.6.c

    As far as I can tell, everything on the catalog & admin side is running perfectly & without any debug errors when using my own migrated template.

    When comparing my own html_header.php in my templates overrides to the one now bundled with template_default I can see that jQuery is now included on the catalog side as follows:-

    Code:
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.min.js" integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg=" crossorigin="anonymous"%3E%3C/script%3E'));</script>
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
    I've not included these lines myself as I already use jQuery on my template for mobile menus etc. I self host & keep up to date my own jquery.min.js and I currently run 3.4.1

    My question is, what is jQuery included for on a stock catalog? What functionality does it bring in the latest versions to the catalog side? I'm asking this in case I need to add in any jquery calls anywhere in my template files to support anything such as form validation or other functionality.

    If anyone knows what jquery is utilized for on a standard catalog I'd love to know, it will help me immensely with making sure my template is fully compatible.

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,081
    Plugin Contributions
    267

    Default Re: Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    In 1.5.4, the config PADSS_AJAX_CHECKOUT was added, and jQuery is used with that. But you may use it whereever you want; lots of mods make use of it.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  3. #3
    Join Date
    Jul 2012
    Posts
    15,019
    Plugin Contributions
    17

    Default Re: Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    While I haven't tried running without jQuery, I thought that added features such as the use of zcAjax used jQuery allowing/offering compatible Ajax operations which may be included in plugins but are becoming more and more a part of the core operation then various form verifications at least use javascript if not jQuery which may mmakethe associated javascript available.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,081
    Plugin Contributions
    267

    Default Re: Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    jQuery is also used by the responsive classic template for various effects.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  5. #5
    Join Date
    Oct 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    Thanks for your help folks.

    My migrated template was based on the old Responsive Avonlee template but I've heavily modified it. I like to keep my websites as light as possible, so don't use sliders or any fancy JavaScript effects on page.

    My migrated template already uses jQuery for various things including my mobile dropdown menu & I've always called it in the html_header.php in the following way :-

    Code:
    <script src="jquery.min.js"  type="text/javascript"></script>
    I keep my own self hosted jquery.min.js file up to date (currently using 3.4.1) & prefer not to serve code from third parties were at all possible, so I've removed the following code from my header so as not to double up on jQuery with two different versions.

    Code:
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.min.js" integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg=" crossorigin="anonymous"%3E%3C/script%3E'));</script>
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
    Everything seems to be working as expected & I like serving my own jquery.min.js from my own server as I can set a longer expires header for javascript served from my own domain using .htaccess, speeding up repeat visits for my users.

    I've tested everything I can since removing the two stock lines and just serving jquery the same way I always have & everything seems to be working as expected.

    Thanks so much for the clarification.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,081
    Plugin Contributions
    267

    Default Re: Upgrading to v1.5.6c - Wondering what jQuery is used for on catalog side

    Say .... you seem like you might be just the kind of person who could write a FAQ on template customization for the development documentation! :)

    Take a look at https://github.com/zencart/documentation

    The article would go under

    https://docs.zen-cart.com/dev/code/
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

 

 

Similar Threads

  1. What is Zend Framwork? What it's used for and how?
    By Syed Raza Mehdi in forum General Questions
    Replies: 1
    Last Post: 18 Dec 2013, 08:45 AM
  2. what is linkpoint_api.php used for?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 13 Jul 2012, 02:01 AM
  3. what is this code used for
    By linjuming in forum General Questions
    Replies: 3
    Last Post: 3 Jul 2012, 10:19 AM
  4. What is the tagline supposed to be used for?
    By cochlear in forum General Questions
    Replies: 2
    Last Post: 22 Apr 2007, 10:59 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR