Do you want to learn what Smarty Variables are used for and on what specific pages? This article will detail out the answers for you.


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


How to Enable Debug to View Smarty Variables


PinnacleCart uses the smarty template system to dynamically compile content/data. By following the instructions below, you can view all of the smarty variables that the shopping cart application uses. Browsing any page on the storefront will also 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 PinnacleCartDesign Documentation 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="pageEleme<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span>nt"}
{include file=$pageElement.file}
{/foreach}
{/if}
{debug}
</div>


Note: If you have already edited the content.html file, you must 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 and 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 customizations 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.