Smarty Variables - How to find them

Want to learn what Smarty Variables are used for what on specific pages? Find out here.

Note:  This article is meant for ADVANCED users and developers.

How to Enable Debug to View Smarty Variables.

Pinnacle Cart uses the smarty template system to dynamically compile content/data.  Following the instructions below will allow you to view all of the smarty variables that the shopping cart application uses.  Browsing any page on the storefront will prompt a new browser window to pop up which will display all of the particular smarty variables used on the page that is currently being viewed.

Steps:

  1. Read the PinnacleCart Design Documentation. This can be found here. This document thoroughly explains the template engine system that PinnacleCart uses.  Before working with smarty it is necessary to understand the file hierarchy and processes used in the application
  2. Copy the file 'content.html' from /content/engine/design/templates/layouts/zones/ to content/skins/_custom/skin/templates/layouts/zones/
  3. Edit, content/skins/_custom/skin/templates/layouts/zones/content.html and add a new line after Line 7.  Add {debug} on Line 8. See the following code as an example:
    <div id="content" class="layout-zone-content layout-zone clearfix {class file=$smarty.template editable=true droppable=true}">
    	{include file=$body}
    	{if $page.elements.zones.content}
    		{foreach from=$page.elements.zones.content item="pageElement"}
    			{include file=$pageElement.file}
    		{/foreach}
    	{/if}
    	{debug}
    </div>
    
Note: if you have already edited the content.html file then you will want to edit that same customized file and add {debug} within the primary div tags.
  1. Save the file and rebuild the skin cache by launching the Cart Designer or turning on DEVMODE (both of these concepts are explained in the Design Doc).
  2. Now browse the storefront. You will want to disable any popup blockers.  Any page you load (including the homepage) will prompt a new browser window to pop up which will display all of the particular smarty variables used on the page that is currently being viewed.
  3. After finding the information needed you will want to remove the content/skins/_custom/skin/templates/layouts/zones/content.html file unless other customization's have been made to this file.  If you have deleted the file, you will then want to rebuild the cart's cache again by launching the Cart Designer or turning on DEVMODE.

Links to Related Articles.

File Manager.

If you didn't get your question answered, please contact the Pinnacle Cart Support Team. To submit a ticket, go to the My Account drop-down menu at the top right of the admin area and select Support.

Was this article helpful?
0 out of 0 found this helpful