ModularMerchant
Knowledge Base
Shopping Cart Software Online Manual
Universal Template
Trigger UNIX timestamp
Location Home > Glossary

Universal Template

The shopping cart software's public-facing storefront, where customers come to shop, consists of several pages, including a "product information" page, a "view my basket" page, a "checkout" page, etc. In all, there are roughly 36 different storefront pages that your customers can visit.

Each of these 36 storefront pages has a corresponding template, which contains the HTML, CSS and JavaScript code that controls the page's design.

A Template Package is a set of these templates, one for each section of the store's administration area.

and the question we're inevitably asked next is...
So, you're telling me that, in order to design my storefront, I have to create HTML templates for thirty-six different pages? I'm so busy that I barely have time to hard boil an egg1, let alone replicate a web design three dozen times!

Fortunately, it is not necessary to create a web design for each of the 36 templates if you don't want to. That's where the Universal Template comes in. You now have the option to make an entire Template Package that consists of just one single "universal" template!

Here's how it works. If a storefront page's regular template is not present in a Template Package, then the universal template will be used instead.
 
Here is an example, in flowchart form:


What the flowchart is saying is that the storefront's product page uses a template named product.tpl. When a product's page is viewed by a customer, the shopping cart software first checks to see if the product.tpl file is present in the store's live Template Package.

If the product.tpl template isn't found, then the contents of the universal.tpl template are used instead.

In addition to the same HTML, CSS and Javascript used by the other templates in the template package, the universal.tpl file also contains the QuickCode Tag {UNIVERSAL-CONTENT}. This QuickCode Tag is special because the shopping cart will replace it with the default content that's appropriate for the page being viewed. For example, on a product's page, the {UNIVERSAL-CONTENT} QuickCode Tag will be replaced with the name, price, description and "add to cart" button for the product.

The content displayed in the place of the {UNIVERSAL-CONTENT} QuickCode Tag will vary, depending on which storefront page is being viewed.

become a master of the universe
All Template Packages must contain, at a minimum, a "universal" template titled universal.tpl. (Since it is what's used as the "backup" template to replace any other missing templates.)
 
Frequently Asked Questions

Question:
Does Modular Merchant still provide template packages that contain all the templates?

Answer:
By default, when a template package is installed, the only template that will be present in the package is the universal.tpl.

However, it is possible to populate additional templates into the template package if direct editing to them is needed, by using the Populate Templates tool in the Template Package Sandbox. Template packages can be searched for, downloaded and installed directly into your account from the [Design > Get Template Packages] page in your store's Administration Area.



Question:
Do my template packages have to either contain every template or just a universal one? Can I mix and match?

Answer:
There's no restriction, a template package can contain any number of templates! The only requirement is that every template package must contain a universal.tpl file. Other than that, the package may contain anywhere from zero to all of the other 35 templates. Just remember, if a storefront page's template isn't present, the universal template will be used to render that page's design and content instead.



Question:
Can I add or remove templates from a template package?

Answer:
Yes. One or more templates can be added to, or removed from, template packages at any time in the Template Package Sandbox, located in the Design section of the store's Administration Area.

After a template is deleted, the universal template will be used in its place when its corresponding storefront page is viewed.

The sandbox's Populate Templates tool can be used to add one or more missing templates to a template package. The Populate tool will start with a copy of the HTML code in the package's universal template. It will then replace the {UNIVERSAL-CONTENT} QuickCode Tag with the appropriate template-specific content, and then save the newly populated version of the template in the template package's directory. The new templates created with the Populate tool can then be edited independently, just like regular templates.
 
Footnotes

1. To hard boil the perfect egg, place six eggs in cold water and add 1 tablespoon salt. Bring the water to a boil, and boil for five minutes. Turn off the heat and let the eggs set in the water for 15 more minutes. Carefully pour out the hot water, keeping the eggs in the pot, then cover with cold running water for 5 minutes. For altitudes over 4000 feet, add two minutes boiling time and seven minutes hot setting time.



— Last Edited - 04/2/2013 11:32am PDT
Rank and add a comment to this article
Only logged in users may leave comments and rank articles. Log in to have your say!
  Knowledge Base Home

  QuickCode™ Tag Glossary

  Modular Merchant.com Homepage

Not Logged in.
Either Log in or create a User Account.

Other articles in this category...

Active

Adjustment

Admin Account

Administration Area

Administrator

Alternate Storefront URL (Product Editor Field)

Attribute

Attributes vs. Fields

Audio Samples (Product Editor Option)

Avatar

AVS

Back Office

Backend

Basket

Billing Address

Bounce Date

Breadcrumb Links

Bug

Category

Checkout Area

COGS

Control Panel

Core Shopping Cart Files

Coupon

Credit Card Security Code

Cron Job

CSS

Customer

Customer Account

Customer Account Area

Customer Attribute

Customer Field

Customer Group

CVV2

Digital Delivery

Digital Object

Digital Product

Display Order

Dropshipper

Dropshipping

Email Batch

Email Instance

Email Opt In

Email Queue

Email Series

Email Series Step

Email Template

End Date

Event

Event Engine

Feature

Featured Product

Field

File Storage Area

FTP

FTP Active/Passive Modes

Fulfillment

Fulfillment Report

Gift Certificate

Grand Total

Hidden Category

Hidden Product

Hosting

Inactive

Internal

Inventory Control (Product Editor Option)

Inventory Object

ISO Codes

Knowledge Base

Manual (Process Offline) payment gateway

Memo

Modular Mailer

Modular Mailer Email Messages

MSRP

Navigation Menu

Note

Off-Site Payment Gateway

On Hold (Subscriptions)

Order Item

Order Processor

Parent Product

Part Number (Product Editor field)

Password Fields (Place an Order tool)

Payment Gateway

Plesk

Price (Product Editor Field)

Price Suffix

Processing Order

Processing Times

Product Groups vs. Fields

Product Price

Public Event

QuickCode Block Tags

QuickCode Tag

Ranking Criteria and Ranking Criteria Groups

Redeem Limit

Result

Retain Balance

Reusable

RGB Value

Sale Price (Product Editor Field)

Search Keywords (Product Editor Field)

SEO

SEO Friendly URL

SFTP

Shelf Life

Shipping Address

Shipping Method

Ships Solo (Product Editor Field)

Shopping Cart

SID

Store-Generated Email Messages

Storefront

Subscription

Subscription Item

Subscription Product

Subscription Queue

Subtotal

System Log

System Settings

Template

Template Package

Third-Party

This product may only be shipped by the following methods (Product Editor Option)

Trial Period

Trigger

Universal Template

UNIX timestamp

Vendor

Wish List: Public Access Code

Zone Fee