The Ecommerce Templates shopping cart software Version 7.2.1 released 30th March 2020 introduced a method to enter Articles into the content management system, together with appropriate Rich Snippets for search engine optimization. Here is a guide explaining the configuration necessary to activate this truly wonderful new feature.
The ability to enter Articles with automated and valid schema.org structured data means that now you can add pages like:
-
About Us
-
Website Security and Privacy Policy
-
How to Order
-
Warranty and Returns Policy
-
Product User Guides
-
Any other topic desired
The benefits are:
-
Articles now appear in your "All pages" list. They will also appear in website search results, whenever relevant.
-
The feature works with SEO friendly URL's, the standard URL's and Static URL pages.
-
You do not need the WordPress integration.
-
Ecommerce Templates is now much more than just a shopping cart for the sale of "Products". You can use the software to build any type of website. It is clearly the superior option, far less cumbersome and optimised for quicker page load speed.
The configuration to activate the Articles feature with valid structured date is quite simple. Follow these steps:
includes.php entries
To activate automated structured data mark-up for both "Products" and "Articles", check that you do not have:
$noschemamarkup=TRUE;
If so, delete that entry, or change it to read:
$noschemamarkup=FALSE;
Add a new parameter to define the article Publisher identity. For example, I have this:
$publisher='<div class="articlepublisher" itemprop="publisher" itemscope itemtype="https://schema.org/Organization"><div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject"><meta itemprop="url" content="https://itzap.com.au/pics/logo/itzap-web-logo.png"></div><meta itemprop="name" content="I.T.ZAP Website Design Works"></div>';
Just edit the meta itemprop="url" (the absolute filepath to your business logo) and meta itemprop="name" (your Business Name) entries, as appropriate for your website.
Next, add a new parameter to define the Article page layout. I have this:
$articlepagelayout='productimage, productname, navigation, dateadded, sku, description, socialmedia, previousnext';
Re-arrange those elements however desired, in the same way as you will have done with $csproductpagelayout, $productpagelayout and $detailpagelayout
Please note that this SKU Label entry will cause a problem when the page content is an Article, not a Product. Therefore omit/disable it for the time being.
// $showproductsku="Order Code:";
That completes the necessary includes.php entries.

Download my sample includes.php entries
Adding an Article page
Go menu PRODUCT ADMIN, Product Admin and click the New Product button. Select a menu category Section and enter the Article details, same as you would for a Product. Price will be 0.00 zero. Weight and dimensions can remain blank.
There are only 2 differences to note.
(1) Author name

The "SKU" field is where you enter the article Author name. This can be your personal name, like "Gary Flack", or perhaps "Fred and Wilma", or even just "Admin". Anything like that will satisfy the Google Rich Results Test Tool.
-
Do not leave the "SKU" field empty, because that will trigger the critical Error "A value for the author field is required".
(2) Is Article

Once you have clicked Submit to save the article:
-
Open the "Quick entry ..." drop-down menu at left of screen.
-
Select "Is Article" from the list.
-
Tick the box beside the Article you just entered. (Note: If the box is empty, then that record is presumed to be a Product.)
-
Scroll down bottom and Submit
The products.php page
These steps are necessary ONLY IF your Products page layout or Recommended Products page layout parameter includes the “addtocart” element, like this:
$productpagelayout='productimage, productname, listprice, discounts, price, description, detaillink, addtocart';
$csproductpagelayout='productimage, productname, listprice, discounts, price, description, detaillink, addtocart';
THEN, for every Article page entered, you will need to hide the “Add to Cart” button and "Out of Stock" message on the “products.php” page. The suggested method to do this is as follows:

-
Open the "Quick entry ..." drop-down menu at left of screen.
-
Select "Custom CSS Class" from the list.
-
For every "Is Article" page that you have entered, enter a class name like "hide-addtocart".
-
Scroll down bottom and Update
And finally, add this code to your CSS stylesheet:
div.product.hide-addtocart div.addtocart, div.csproduct.hide-addtocart div.csaddtocart {display: none}
The proddetail.php page
There is no change whatsoever required to the PHP code on your “proddetail.php” page. Down in the <body>, the relevant PHP code to load the page content is:
<?php include "vsadmin/inc/incproddetail.php"; ?>
You are done !
-
Copy and paste your Article webpage URL into the Google Rich Results Test Tool and check for a clean result. Damn fine aye.
-
A big thank you to Vince for his brilliant work in seamlessly integrating this fantastic feature into Ecommerce Templates.