RSS Feed

Blog

CMS Made Simple eCommerce Skin Helper

CMS Made Simple eCommerce Skin Helper
Posted on Aug 2, 2009 by Stephen Owens
Tutorial and Code category
   [ Return ]

I opened a new Code section on my site today, which will contain free software licensed under the GNU GPL v3.0.

To kick it off I am releasing the CMSMS Shop Skin Helper. This tool will create cached skin files based upon a CMS Made Simple template. The tutorial included in download provides a walk-through for skinning an osCommerce / Zen Cart installation on the same server as CMS Made Simple. This PHP code is not dependent upon CMS Made Simple, so it could be used to skin all kinds of things.

You may have read my other blog post on integrating templates between CMS Made Simple and Zen Cart, which resulted in a slow product page loading osCommerce or Zen Cart. This method was clumsy.

I decided to create a little script that would allow me to cache a few files from CMS Made Simple and use them to create a skin for around the installation of osCommerce / Zen Cart. The CMSMS Shop Skin Helper creates three files. The first file contains the CSS and JavaScript, and the next two contain the actual template layout design: one between the opening body tag and the content smarty tag, and one from the content smarty tag to the closing body tag.

Having these three files allows the creation of a skin that will not interfere with the SEO of the eCommerce installation. In addition, the skin files can be automatically configured to allow proper SSL inclusion. I always bothers me when I'm at a site that isn't set up properly for SSL then it drops the style sheets and the whole site design is dropped.

I wrestled with the idea of making this tool a CMS Made Simple plug-in. In the end I decided to keep it independent from CMS Made Simple because I have used code and skin structure it to skin a bunch of php apps that have nothing to do with CMS Made Simple or eCommerce. The GPL license is always nice, now someone else in the development community for CMS Made Simple has the option of turning it into an automated module or plug-in.

The download file contains a couple of things:

cmsms_shop_skin_helper.php

  • The code that takes the CMS Made Simple template and creates the three skin files
  • File can be modified to make all kinds of skin files based upon a template or web page
  • Can be included at the top of the site's home page or eCommerce index page to automatically create new skin files on a set time schedule

About.php

  • License info
  • Tutorial on setting up with osCommerce and/or Zen Cart
  • General Tool Information

Example Files/NCleanBlue_ShopSkin.tpl

  • This is the NCleanBlue template that comes with CMS Made Simple modified for use with cmsms_shop_skin_helper.php
  • A good example to demonstrate the HTML comment tags that need to be added to any template for use with this tool

Example Files/sts_template.html

  • The Simple STS template that comes with the STS contrib for osCommerce
  • Shows how to setup an eCommerce template for use with cmsms_shop_skin_helper.php

gpl.txt

  • GPL v3.0 full license text

history.txt

  • The history of the tool

I hope this tool finds some good uses. If you decide to use it let me know. I love seeing what others are doing with my projects. If you let me know you are using it, I will most likely will blog about it.

Share
Like what you read? Get updates for free!
comments powered by Disqus