ModularMerchant
Knowledge Base
Shopping Cart Software Online Manual
QuickCode Block Tags
Public Event QuickCode Tag
Location Home > Glossary

QuickCode Block Tags

When designing a store page, it is often necessary to display lists of information; such as a list of the orders placed by a customer in the Customer Account Area. However, when designing the template that displays the customer’s order history, the template’s designer has no idea how many orders will be listed for any given customer.

Customer A may have three orders associated with their account that need to be displayed, but Customer B may have fifteen thousand*.

Since the same template will be used to display the order history for all customers, the designer will need a method to dynamically build and display the order history list, no matter how many entries it may have for a specific customer. Displaying a list with an ever-changing number of entries is achieved by using a special type of QuickCode Tag called Block Tags.

reference
A listing of all the QuickCode Block Tags that are available can be found in the online QuickCode Tag Glossary.

QuickCode Block Tags always come in pairs, with a “block begin” tag and a “block end” tag. Block Tags wrap around HTML content in your templates that may vary in length, depending on the number of items to be listed. The HTML content within the block tags will be repeated for each item on the list when the page is viewed in a web browser.

Continuing with the example of a template for displaying the customer’s order history, the following QuickCode Block Tags could be used in the template’s HTML source code to display a dynamic list, varying in length for each customer:

example: quickcode tag block source code
<!--- BEGINNING OF BLOCK TAG CODE SAMPLE -->
{ORDER-HISTORY-BLOCK-BEGIN}
<p><b>{ORDER-HISTORY-ORDER-ID}</b>: Placed on {ORDER-HISTORY-ORDER-DATE}</p>
{ORDER-HISTORY-BLOCK-END}
<!--- ENDING OF BLOCK TAG CODE SAMPLE -->

A customer with an order history containing three orders would see something like this when they viewed this page:

example: quickcode tag block when viewed in web browser
10012: Placed on 01/27/2011
10107: Placed on 02/19/2011
10255: Placed on 4/13/2011

By using the Block Tags, the web designer only needs to create the source code to display an item in the order history list once. When that storefront page is viewed in a web browser, the system will automatically repeat the source code found between the block's BEGIN and END tags over and over for each item to be listed.

Any HTML, PHP, JavaScript, CSS or QuickCode Tags can be included between a set of Block Tags. The Block Tags will simply repeat what’s between them as many times as necessary. With this in mind, be sure that any HTML, PHP, JavaScript, CSS or QuickCode tags that you open within a set of blocks are also closed within that set of blocks.

For example, if you start bolding some text using the HTML <b> tag within a block, be sure to also close the bold tag with </b> within the same block… or you’ll end up lots and lots of bold text on your page with no tags to give the command to stop bolding**!

*Give or take twelve.
**Chaos ensues.



— Last Edited - 04/18/2018 11:27pm 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