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

14th July 2017
Article Publisher

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.

Click to download the WinZip file

This file will UnZip into a folder named “ect-dynamic-title-meta-tag-files

Once you have downloaded and UnZipped the file, please open the “00-README-FIRST.pdf” file which explains all.

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

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. No custom Mods installed.
  2. cPanel LiteSpeed Server running PHP Version 7.1.6
  3. Vanilla page URL’s. (No .htaccess Mod RewriteRules)
  4. Both “Short” and “Long” descriptions entered for each Category and Product page.

The dynamic code will work using Search Engine Friendly URL’s, BUT with a couple of modifications that are 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.

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 and then add to your existing includes.php config file.
  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>
    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.
  4. social-facebook-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.
    (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
  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.

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
 
 
Comments

Did you get the dynamic code working OK ?

Add your comment ⇒

« Previous | Next »

You may also be interested in …

Ecommerce Templates Website Makeover Package
$400.00
How to promote your website pages on Facebook … the right way
0
Ecommerce Templates Admin Panel custom CSS stylesheet
$6.50
2