OXID e-Commerce Admin, User and Developer Blog

euroblaze | OXID e-Commerce User Blog


Snippets to Include CMS Pages into Product Descriptions

Posted on June 16, 2010 by Ashant_Chalasani
lang

Sometimes it is necessary to include some repeating content into article-descriptions repeatedly.  For example, if you are selling a particular laptop-products with inbuilt 3G-Cards and wish to describe what 3G is to online-shop visitors, it would be cumbersome to repeat this descriptive information again and again in each article-description.

OXID offers a convenient manner to handle such repeating information – CMS Snippets!  Under Customer Info > CMS Pages, you can define repititive content as a single CMS-page and include this page’s content in article-descriptions using a SMARTY-style variable.

Steps to include CMS Snippets in Article Detail pages:

  1. Create a CMS page and make sure to provide it an ident value (ex. 3g_info)
  2. Fill the content in and save the CMS page
  3. Go to any article-detail page you wish to include the the CMS Snippet and insert the SMARTY-style variable like [{oxcontent ident=<ident_value>}] ex. [{ oxcontent ident=3g_info}]

That’s it – done!  The article-detail page will start to reflect this content dynamically.  Changes to the CMS-Snippet will automatically reflect in the article-detail page.

Shop Promotions

Aside of information-snippets, this technique can be used to run continuous marketing promotions on specific product pages.

Developer Tip

If you are kind that likes to venture into code, then try the above technique in SMARTY-templates in the /out/basic/tpl/ folder as well.

1 to “Snippets to Include CMS Pages into Product Descriptions”

  1. A neat use of snippets is to include Google Analytics and Adwords tracking codes in templates.

    For Adwords, you can also use OXID-Snippets for tracking converstions in individual checkout-steps.



Leave a Reply




↑ Top

Switch to our mobile site