Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2019
    Location
    Newport Beach, CA
    Posts
    64
    Plugin Contributions
    0

    Default Where do the pages reside, what folder?

    www.trackreadyproducts.com

    We need to add a snippet of Facebook pixel code so we can track users as they browse products; I've wandered through various folders on our site but can't locate what I think should be there, e.g. index.php, shipping_info.php, shopping_cart.php, checkout.php, etc. We're using the Sheffield Blue responsive template.

    Many thanks!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Where do the pages reside, what folder?

    Zen Cart pages are assembled for display, so there are a number of files that contribute to a page's rendering. This wiki article might help to describe what's going on: https://www.zen-cart.com/wiki/index.php/Pages.

    As for adding that 'snippet', you'll most likely be adding that to a template-type file, present in your store's /includes/templates/YOUR_TEMPLATE sub-directories. The /common sub-directory contains the common page-display information (the header, footer and html_header) and the /templates sub-directory contains any page-specific HTML creation.

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Where do the pages reside, what folder?

    /includes/templates/MYTEMPLATE/common/html_header.php

    just above the /head towards the bottom of the file is where I have the code inserted
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #4
    Join Date
    Apr 2019
    Location
    Newport Beach, CA
    Posts
    64
    Plugin Contributions
    0

    Default Re: Where do the pages reside, what folder?

    Wow, thank you both, what an education. I always knew the HTML was generated but never saw to what lengths.

    The other templates in the /Common folder, do I need to modify each one? There's a responsive mobile and responsive tablet template among others:

    Name:  Common folder.png
Views: 109
Size:  29.9 KB

    Thanks!

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Where do the pages reside, what folder?

    On a site I manage to which that Facebook Pixel code's been added, I created an auto-loading script file (for your site, /includes/templates/responsive_sheffield_blue/jscript/jscript_facebook_pixel.php) containing:

    Code:
    <?php
    // -----
    // Facebook Pixel Code, loads in the header section on each page.
    //
    ?>
    <!-- Facebook Pixel Code -->
    <script>
    !function(f,b,e,v,n,t,s)
    {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};
    if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
    n.queue=[];t=b.createElement(e);t.async=!0;
    t.src=v;s=b.getElementsByTagName(e)[0];
    s.parentNode.insertBefore(t,s)}(window,document,'script',
    'https://connect.facebook.net/en_US/fbevents.js');
    fbq('init', 'your-account-here'); 
    fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none" 
    src="https://www.facebook.com/tr?id=your-account-here&ev=PageView&noscript=1" 
    alt="" /></noscript>
    <!-- End Facebook Pixel Code -->
    That file gets automatically loaded (since it's in the template's /jscript sub-directory and its name starts with jscript_ and has a file extension of either js or php) by the template's /common/html_header.php.

 

 

Similar Threads

  1. v154 Where does create account email text reside?
    By kalastaja in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Sep 2016, 12:50 PM
  2. What is the difference between the Cache folder and the Logs Folder?
    By ray-the-otter in forum General Questions
    Replies: 7
    Last Post: 22 Feb 2013, 12:26 PM
  3. where is the tpl_product_info page found?? What folder?????
    By dbj-media in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Oct 2009, 02:27 AM
  4. what sort of files reside in include/languages/CUSTOM?
    By nyanko chan in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Nov 2008, 11:36 PM
  5. Where does zen_draw_form function definition reside?
    By MaxPowers in forum General Questions
    Replies: 1
    Last Post: 23 May 2007, 12:34 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