• So we have been working hard to create the proper and effective way to deliver schematic markup to Google and others. Up until recently yesterday, there was an issue delivering the product price for Zen Cart. I have 2 thoughts on this.

    1. Maybe we should ONLY be delivering the base price and not the specials price?

    2. Maybe we should be delivering the actual price, which is the special price for a product on sale?

    Some arguments for the issue include:

    • These are not real time in the search results anyhow. So a searcher could be given a special price in search results and get to your site to find it no longer on special.
    • The platforms, Schema.org, Rich Snippets, Good relations, Open Graph etc have only 1 price specification, regular and sale seem more logical.
    • All of the markup platforms have additional assignments for price expiration etc in the offer markup.

    So with Zen Cart I have worked it out both ways (below).... The actual price, which includes specials has a rounding hack in it because Google is too stupid to read 18.0000 as $18.00 and instead reads AND displays 180,000.00. No idea why, but duhhhhhhhhhhhh.

    google_bugSo thus, we have a hack because honestly because of taxes, quantity discounts and other pricing values in an ecommerce system such as Zen Cart we need 4 decimal places.

    So if you want to display the actual price you would use this

    <?php echo $specials_new_products_price = (round(zen_get_products_actual_price($product_info_metatags->fields['products_id']),2)); ?>

    Now if you want to use the base price, which based on the arguments above is trouble free, then you use this

    <?php echo $products_price = zen_get_products_base_price($product_info->fields['products_id']); ?>

    Likely you will all be asking about the expiration of a special...... Here are the instructions:

    1. Download Sale Ending/Special Ending from Zen Cart (because there is not reason to reinvent the wheel)

    2. Edit common_files/includes/languages/english/extra_definitions/sale_special_ending.php and edit the language definitions to be blank, like below:

    define('TEXT_SPECIAL_EXPIRES', '');
    define('TEXT_SALE_EXPIRES', '');

    3. Edit common_files/includes/functions/extra_functions/sale_special_ending.php and change the following line

    Line 6 function sale_special_ending($id, $longdate = true, $one_day_back = false) {


    function sale_special_ending($id, $longdate = false, $one_day_back = false) {

    4. Now in your details list in templates/product_info_display.php add your price like this

    <li>Products Current Price: <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><meta itemprop="currency" content="USD"/><?php
    $ssblock = sale_special_ending((int)$_GET['products_id']);
    if ($ssblock != '') {
    echo '<time itemprop="priceValidUntil" datetime="' . $ssblock . '"></time>';
    ?><span itemprop="price"><?php echo $specials_new_products_price = (round(zen_get_products_actual_price($product_info_metatags->fields['products_id']),2)); ?></span></span></li>

    5. You can also add another line item for the shopper if you like

    $ssblock = sale_special_ending((int)$_GET['products_id']);
    if ($ssblock != '') {
    echo '<li><b>Sale Ends:</b> <time itemprop="priceValidUntil" datetime="' . $ssblock . '"></time>' . $ssblock . '</li>';

    Want to catch up on all the markup we have worked out so far for your store? Get the Rich Snippets Tutorial for Zen Cart. That's all, stay advised and work hard!

  • As many of us plunder through the new changes that come to our stores regularly, none has been as big an advancement as structured data and Google's data highlighting. While the markup can be a real challenge with our dynamic websites, we have been making progress in the implementation of rich snippets for your Zen Cart here.

    While this progress is going quite well, Google has been challenged to pick up all of the data correctly, entirely and only on product pages. To this end, we now see that Google recently launched a new tool in webmaster tools to help us help tag them!

    The data highlighter now has a way to tag your pages manually and create a "set" for Google to understand them all most of them without having to make edits to your Zen Cart. While I am certain the site edits are more effective, I actually recommend you do both. My reasoning is quite simple, number 1 if you have any errors they will become apparent during the tagging process.... and number 2, more is better =)

    To get started login to Google webmaster tools and click "Optimization", then "Data Highlighter" from the left hand menu. Once here you will likely need to locate the "Get Started" button if you have never used the tool before. This will produce the box below.


    Make sure you enter the full product url FIRST like http://domain.com/index.php?main_page=product_info&cPath=9&products_id=86

    **Much to my dismay, https:// links are not accepted. I certainly hope Google fixes this quickly as it is quite short sighted for products! I told them here, maybe you should tell them as well.

    Once you click "OK" it will take a little while to process, go get some coffee and come back to it in a bit.

    Now you will setup an example url so that Google knows the product pages. When asked for the url parameters you will enter the following.


    Exactly like that, including the *

    Then the cool part, Google will show you several example pages and ask you to tag them with common data elements such as image, price, etc. This is the part where you may discover some issues with your page's markup!

    Pages that are not indexed in Google cannot be tagged, but if you correctly create the set for your dynamic product pages then they will find them anyhow. If you are rewriting your urls and cannot get a common parameter to dynamically tag your product pages... well, we have been telling you NOT to rewrite your urls for years. It's old out of date (1997) SEO and it only hurts your in speed,  response load and now this really cool tool to help you rank that you cannot use!

© 2003-2015 PRO-Webs, Inc. Woodbine, GA 31569-2051