Ecommerce Templates Dynamic PHP Page title, meta description and meta og:tag code

12th March 2018

For users of the fantastic “Ecommerce Templates” PHP shopping cart software, here is a FREE download file containing HTML and PHP code snippets to generate dynamic <title>, <meta description> and <meta og: tags> in your website page code.

Developed here at IT ZAP Website Design Works, this dynamic code is essential to maximise your Search Engine Optimization strategy and Social Media impact.

  free, no charge, gratis  

Click to download the WinZip file

This file will UnZip into a folder named “ect-dynamic-code

Once you have downloaded and UnZipped the file, please open the “00-ect-dynamic-code-readme.pdf” file which explains all.

The HTML and PHP code is provided “as is” and was written using Adobe Dreamweaver CC 2015.

UPDATED Monday, 29th January 2018.

Website Configuration

I have been testing this code for some time now on this website, and others, using a succession of Ecommerce PHP Versions 6.6 up to the very latest release. My standard website configuration is as follows:

  1. cPanel LiteSpeed Server running PHP Version 7.1
  2. Vanilla page URL’s or “Has Static URL”. (Not using .htaccess Mod RewriteRules)
  3. Both “Short” and “Long” descriptions entered for each Category and Product page. Short description is a “must have” for the <meta description> entry.

The dynamic code will work using Search Engine Friendly URL’s, but with one small modification to the <canonical> and <og:url> entries, as explained in the ReadMe pdf.

Implementation

Implementing this dynamic code requires the end user to open the sample files provided, then Copy (CTRL+C) and Paste (CTRL+V) code snippets into your own Ecommerce Templates website PHP files in 3 locations:

  1. Above <!DOCTYPE html>
  2. Inside “Editable Regions” in the <head>, and
  3. Inside “Editable Regions” in the <body> of your page.

The code must go inside "Editable Regions" so as it is not overwritten upon Template update.

If you need to add another "Editable Region" to your website Template file where you can insert dynamic code, perhaps inside the <head> or before the closing </body> tag, then go ahead and do so. Select Dreamweaver Menu: InsertTemplateEditable Region.

Even if you are not on Facebook or Twitter, do add all the <meta og: tag> code entries just the same, because somebody may well “Share” your page URL on a Social Media website, which can then load up all that “Open Graph” information automatic.

WinZip Download File Contents

Here is a description. See the ReadMe pdf for more detail and critical notes.

  1. vsadmin\includes.php
    Special Parameters used in the PHP code that you need to EDIT to suit your business and then add to your existing includes.php config file.
    Special includes.php parameters that make the dynamic code work
  2. start-ect-metainfo-page.php
    Use of this “include_once” file is optional, but my recommended way to load the Ecommerce Templates content management system files first up at Line 1, all in the correct order, above <!DOCTYPE html> like so:
    <?php include_once ( $_SERVER["DOCUMENT_ROOT"] . "/start-ect-metainfo-page.php") ?>
    <!DOCTYPE html>

    Loads the Ecommerce Templates content management system
    Important: If you have any of those Ecommerce Templates system files being loaded further down on any page, then you must remove those lines. They cannot be duplicated. And without “metainfo.php” loaded up top, the dynamic code entries will be BLANK.
  3. start-ect-page.php
    Another optional “include_once” file, but without loading metainfo.php on the end. Loaded first up on ECT pages like index.php, clientlogin.php, cart.php, search.php, etc, where page title and description code is entered manually.
    <?php include_once ( $_SERVER["DOCUMENT_ROOT"] . "/start-ect-page.php") ?>
    <!DOCTYPE html>
  4. social-meta-ids.php
    An “include_once” file that I use to insert Facebook “Administrator” and “Application” ID numbers. You need to EDIT and insert your own unique Facebook ID numbers. You can also add <meta> properties for Twitter in here as well.
    (a) To create a Facebook App ID for your website, go to the Facebook Developer page here, click on "Get Started" at top-right of the page and then enter your website details. The App tracks and properly attributes all the Likes, Shares, Reactions, Comment numbers to your Business Page. It also generates detailed Facebook Insight Reports that will provide helpful data in measuring your Facebook Post reach, effectiveness, marketing and planning advertising campaigns.
    (b) To obtain your correct Facebook Administrator ID number, go to the Find My Facebook ID website here and enter the URL of your Personal Facebook Page. Note that you can add Multiple Facebook Administrator ID lines, so as each authorised person will get access to view those detailed Facebook Insights reports.
  5. categories-code.php
    Use this to copy/paste dynamic code snippets into your categories.php file.
  6. products-code.php
    Use this to copy/paste dynamic code snippets into your products.php file.
  7. 00-static-category.php
    This is basically a CLONE of your products.php file for use when creating a static “Category URL (Optional)” page in 30 seconds flat, where the “Category Function” is “Products can be added to this category”.
  8. 00-static-top-category.php
    This is basically a CLONE of your categories.php file for use when creating a static “Category URL (Optional)” page in 30 seconds flat, where the “Category Function” is “Categories can be added to this category”.
  9. manufacturers-code.php
    Use this to copy/paste dynamic code snippets into your manufacturers.php file. It is simply a CLONE of categories.php, but uses those parameters you entered into includes.php named : $rootmanufacturertitle and $rootmanufacturerdescription
  10. proddetail-code.php
    Use this to copy/paste dynamic code snippets into your proddetail.php file. The line:
    <?php print $metaogimage; ?>
    does require Ecommerce Plus PHP Version 6.6 or later. And in your includes.php config file, do check that you do have:
    (a) “socialmedia” in the $detailpagelayout entry.
    (b) $usegiantogimage=true; (new in v6.8.0) will fetch the first GIANT image (if available) for the <meta og:image> URL entry on proddetail.php pages. Recommended because big photos are better for Social Media posts.
  11. 00-static-proddetail.php
    This is a CLONE of proddetail.php that you can use to create a “Has Static URL” product page in 30 seconds flat.

Once you have Pasted the dynamic code into your Ecommerce Templates PHP files, delete all the spaces between lines. They were only put there to separate code snippets for clarity.

Hopefully the explanations provided are clear enough. Feedback is welcome, along with any suggested improvements.

To make all this dynamic PHP code work, how should details be entered into the Ecommerce Templates Administration Panel?

Sample Menu Category page

Ecommerce Templates Menu Category Page

Sample Product Detail page

Ecommerce Templates Product Detail Page


Do you have dynamic code for the ASP and Wordpress versions ?

No, sorry. I do not work with those versions. This is a conversion that somebody else in the Ecommerce Templates community might kindly provide.

Can you do it all for me ?

Yes, if you are a PHP user and are happy to pay a modest fee (in AUD$) for the time involved, then you may order below. I would need a copy of these files:

  1. includes.php
  2. categories.php
  3. manufacturers.php
  4. products.php
  5. proddetail.php
  • Dynamic code implemented by IT ZAP is guaranteed to work with Ecommerce Templates Shopping Cart PHP Plus Versions 6.6 onward.
$55.00
 
 
2 Comments - Average Rating 5 / 5 (Show All)

Add your comment ⇒

Excellent, works perfect, thank you !

- 18th March 2018

!! one of the best !! Awesome. Hope to do business with you again. A +++++++++

Great Service

- 30th January 2018

Thanks Gary for the extra effort you took when updating our website. Any hiccups and questions were taken care of very quickly. Will highly recommend you.

Add your comment ⇒

« Previous | Next »

You may also be interested in …

Ecommerce Templates Website Makeover Package
$400.00
Ecommerce Templates Admin Panel custom CSS stylesheet
$6.50
3
Ecommerce Templates Thanks Receipt CSS and Email Templates
$12.50
2