Glossary Item Box

Squirrelcart v6.1.0

v6.0.0

Overview

This page has been written as a guide to aid you in upgrading your site to v6.0.0 and after. Please read this page in its entirety before attempting to upgrade.

Lighthouse Development (the makers of Squirrelcart) offer upgrade services. Please see this page for more information:

https://www.squirrelcart.com/upgrade-service

 

Our standard upgrade service does not include updating custom theme templates. If you are interested in pricing to update your custom theme for version 6 please contact us:

https://www.squirrelcart.com/contact

Shipping Settings

Version 6 includes major shipping improvements. The Priority field that was on your shipping Rate & Service Rule records has been replaced by a Scope setting. The upgrade script will disable all shipping rules. After upgrading you will need to go over your shipping settings and adjust them as needed. You'll need to enable any of the rules you still wish to use, and adjust your shipping settings to suit your needs. We recommend you read through the Configuration > Shipping section of this documentation before upgrading to get familiar with the new shipping features.

Theme and Template Changes

If you are using a custom version of any of the below template files, make the changes outlined for the custom version of that file inside your custom theme folder (Example: squirrelcart/themes/YOURTHEMENAME). If you are not using a custom version of that file you do not need to make any changes. This section is a guide only. If a v6.0.0 template file has a lot of changes, you are probably better off reverting to the default version by removing your custom version of the same file. 

How to revert a template

If you have a custom version of a template listed below and do not wish to update it, you can revert it. Reverting a template causes the master version of that template to be used. To revert a template that is in your custom theme folder, rename or delete it. Template changes begin below:

 

cart_options_nav.tpl.php

  1. Find this:

    <a href="<?php print $Item_Row['Update_URL'] ?>" title="<?php print $Item_Row['Name'] ?> - click to view/change options"><?php print $Item_Row['Name'] ?></a>
  2. Change to:
    <a href="<?php print $Item_Row['Update_URL'] ?>" title="<?php print $Item_Row['Name'] ?> - click to view/change options">
     <?php if ($Item_Row['Price_Scheme'] == 'sets') print "<strong>$Item_Row[Set_Name] -</strong> "?><?php print $Item_Row['Name'] ?>
    </a>

 

checkout_pay.tpl.php

  1. Find this:

    <fieldset>  
     <?php foreach($Method_Rows as $Method_Row): ?>
      <div class="pay_method_row <?php print $Method_Format ?> <?php print $Method_Row['Instance'] ?>">
       <?php foreach($Method_Row['methods'] as $Method): ?>
        <div class="pay_method_wrap">
         <input id="method_<?php print $Method['Field_Value'] ?>" type="radio" data-paytype="<?php print $Method['Type']?>" name="pay[method]" value="<?php print $Method['Field_Value'] ?>" <?php print $Method['Checked'] ?> onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>', '<?php print $Method['Type'] ?>')" />
         <label for="method_<?php print $Method['Field_Value'] ?>" onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>','<?php print $Method['Type'] ?>')" >
          <?php if ($Method['Image']): ?>
           <img src="<?php print $Method['Image']['dyn'] ?>" width="<?php print $Method['Image']['width'] ?>" height="<?php print $Method['Image']['height'] ?>" alt="<?php print $Method['Name'] ?>" />
          <?php else: ?>
           <?php print $Method['Name'] ?>
          <?php endif; ?>
         </label>
        </div>
       <?php endforeach; ?>
      </div>
     <?php endforeach; ?>
    </fieldset>
  2. Change to:
    <fieldset>
     <h3>Please select a payment method</h3>  
     <?php foreach($Method_Rows as $Method_Row): $x++?>
      <div class="pay_method_row <?php print $Method_Format ?> <?php print $Method_Row['Instance'] ?>">
       <?php foreach($Method_Row['methods'] as $Method): ?>
        <div class="pay_method_wrap <?php if ($Method['Checked']) print 'selected'?>">
         <?php if ($Reload_Pay_Select):?>
          <a class="pay_method_reload <?php print $Method['Select_Class']?>" href="<?php print $Method['Select_URL']?>">        
           <input class="sc_hide" id="method_<?php print $Method['Field_Value'] ?>" type="radio" data-paytype="<?php print $Method['Type']?>" name="pay[method]" value="<?php print $Method['Field_Value'] ?>" <?php print $Method['Checked'] ?> onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>', '<?php print $Method['Type'] ?>')" />
           <label tabindex="<?php print $x?>" onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>','<?php print $Method['Type'] ?>')" >
            <?php if ($Method['Image']): ?>
             <img src="<?php print $Method['Image']['dyn'] ?>" width="<?php print $Method['Image']['width'] ?>" height="<?php print $Method['Image']['height'] ?>" alt="<?php print $Method['Name'] ?>" />
            <?php else: ?>
             <?php print $Method['Name'] ?>
            <?php endif; ?>
           </label>
          </a>
         <?php else:?>
          <input class="sc_hide" id="method_<?php print $Method['Field_Value'] ?>" type="radio" data-paytype="<?php print $Method['Type']?>" name="pay[method]" value="<?php print $Method['Field_Value'] ?>" <?php print $Method['Checked'] ?> onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>', '<?php print $Method['Type'] ?>')" />
          <label tabindex="<?php print $x?>" for="method_<?php print $Method['Field_Value'] ?>" onclick="payMethodOn('method_<?php print $Method['Field_Value'] ?>','<?php print $Method['Type'] ?>')" >
           <?php if ($Method['Image']): ?>
            <img src="<?php print $Method['Image']['dyn'] ?>" width="<?php print $Method['Image']['width'] ?>" height="<?php print $Method['Image']['height'] ?>" alt="<?php print $Method['Name'] ?>" />
           <?php else: ?>
            <?php print $Method['Name'] ?>
           <?php endif; ?>
          </label>
         <?php endif;?>         
        </div>
       <?php endforeach; ?>
      </div>
     <?php endforeach; ?>
    </fieldset>

 

checkout_pay_order_summary.tpl.php

  1. Find this:

    Unit Price
  2. Change to:
    <span class="<?php if ($Sets_Present):?>sets_present tip<?php endif;?>" <?php if ($Sets_Present):?>title="Unit price may be approximate because items are priced as a set."<?php endif;?> >
     Unit Price
    </span>
  3. Find this:

    <?php if (!empty($Shipping_Chosen)): ?>
     <?php if ($Ship_Method): ?>
      Shipping via <a class="tip" title="click to change..." href="<?php print $Shipping_URL ?>"><?php print $Ship_Courier ?> <?php print $Ship_Method ?></a>:<br/>
     <?php else: ?>
      Shipping total:<br/>
     <?php endif; ?>
    <?php endif; ?>
  4. Change to:
    <?php if (!empty($Shipping_Chosen)): ?>
     <?php if ($Ship_Method): ?>
      <?php if (!empty($SC['co']['steps_done']['address'])):?>
       Shipping via <a class="tip" title="click to change..." href="<?php print $Shipping_URL ?>"><?php print $Ship_Courier ?> <?php print $Ship_Method ?></a>:<br/>
      <?php else:?>
       Shipping via <?php print $Ship_Courier ?> <?php print $Ship_Method ?>:<br/>
      <?php endif;?>
     <?php else: ?>
      Shipping total:<br/>
     <?php endif; ?>
    <?php endif; ?>
  5. Find both occurrences of this:

    <span class="tip" title="shipping cost to be determined after order completion.">TBD</span>
  6. Add this after:
    <br/>

 

 

checkout_view.tpl.php

  1. Find this:

    Unit Price
  2. Change to:
    <span class="<?php if ($Sets_Present):?>sets_present tip<?php endif;?>" <?php if ($Sets_Present):?>title="Unit price may be approximate because items are priced as a set."<?php endif;?> >
     Unit Price
    </span>
  3. Find this:

    <span class="tip" title="shipping cost to be determined after order completion.">TBD</span>
  4. Add this after:
    <br/>
  5. Find this:

    <a class="prod_name" href="<?php print $Item['URL'] ?>" title="click to modify options"><?php print $Item['Display_Name'] ?></a>
  6. Change to:
    <a class="prod_name" href="<?php print $Item['URL'] ?>" title="click to modify options">
     <?php print $Item['Display_Name'] ?>
     <?php if ($Show_Product_Code && $Item['Product_Code']):?>
      <div style="font-size: 9.35px;"><?php print $Item['Product_Code'] ?></div>
     <?php endif;?>
    </a>
  7. Find this:

    <?php elseif($Item['Base_Price']): ?>
     <div>Base Price:</div>
    <?php endif; ?>
  8. Change to:
    <?php elseif($Item['Base_Price']): ?>
     <div>Base Price:</div>
    <?php elseif($Item['Price_Set']['Price_One']):?>
     <div><?php print ucfirst($Item['Price_Set']['Set_Name_Singular'])?> Price:</div>
    <?php endif; ?>
  9. Find this:

    <?php elseif($Item['Base_Price']): ?>
     <div><?php print sc_price($Item['Base_Price']) ?></div>
    <?php endif; ?>      
  10. Change to:
    <?php elseif($Item['Base_Price']): ?>
     <div><?php print sc_price($Item['Base_Price']) ?></div>
    <?php elseif($Item['Price_Set']['Price_One']):?>
     <div><?php print sc_price($Item['Price_Set']['Price_One'])?></div>
    <?php endif; ?>      
  11. Find this:

    Quantity:
    <?php if ($Item['Qty_Read_Only']):?>
  12. Change to:
    Quantity:
    <?php if ($Item['Price_Scheme'] == 'sets'):?>
     <?php print "$Item[Quantity] {$Item['Price_Set']['Set_Name']}"?> @
    <?php elseif ($Item['Qty_Read_Only']):?>




 

     

    option_text.tpl.php

    1. Find this:

      <input type="text" class="<?php print $Error_Class?> <?php print $Date_Class?> qt_price-<?php print $Price_Attribute?> qt_price_point-<?php print $Price_Point?>" name="<?php print $Option_Field_Name?>" id="<?php print $Option_Field_ID ?>" value="<?php print $Choice_Value?>" <?php if ($Max_Length):?>maxlength="<?php print $Max_Length ?>"<?php endif; ?> />
    2. Change to:
      <input type="text" class="<?php print $Error_Class?> <?php print $Date_Class?> qt_price-<?php print $Price_Attribute?> qt_price_point-<?php print $Price_Point?>" name="<?php print $Option_Field_Name?>" id="<?php print $Option_Field_ID ?>" value="<?php print $Choice_Value?>" <?php if ($Max_Length):?>maxlength="<?php print $Max_Length ?>"<?php endif; ?> <?php print $Autocomplete?> />

     

    options.tpl.php

    1. Find this:

      <ul class="same_line_labels <?php if (count($Options) == 1) print 'one_field'; ?>">
    2. Change to:
      <ul class="same_line_labels <?php if (count($Options) == 1 && $Price_Scheme != 'sets') print 'one_field'; ?>">

     

    order_history.tpl.php

    1. Find this:

      <div class="order_date"><?php print sc_date(SC_DATE_FORMAT, $Order['Date'])?></div>
    2. Change to:
      <div class="order_date"><?php print sc_date($Order['Date'], SC_DATE_FORMAT)?></div>

     

    product_catalog_nav.tpl.php

    1. Find this:

      <div class="prod_catalog_nav">
    2. Change to:
      <div class="prod_catalog_nav <?php if ($SC['settings']['Accordion_Nav_On']):?>accord_nav <?php endif;?>">

     

    product_detail.tpl.php

    1. Find this:

      <h1><?php print $Display_Name?> <?php print $Admin_Link?></h1>
    2. Add after:
      <?php if ($Show_Product_Code && $Product_Code):?>
       <div class="prod_code"><?php print $Product_Code ?></div>
      <?php endif;?>
    3. Find this:

      <?php if ($Base_Price): ?>
       <span class="prod_price">
        <?php print $Price_Label?> <span <?php print $SchemaOrg_Price?>><?php print sc_price($Base_Price) ?></span>
       </span>
      <?php endif; ?>
    4. Change to:
      <?php if ($Base_Price): ?>
       <span class="prod_price">
        <?php print $Price_Label?> <span <?php print $SchemaOrg_Price?>><?php print sc_price($Base_Price) ?></span>
       </span>
      <?php elseif ($Price_Scheme == 'sets' && $Start_Price):?>
       <span class="prod_price">
        As low as <?php print sc_price($Start_Price).'/'.$Set_Name_Singular ?>
       </span>
      <?php endif; ?>
    5. Find this:

      <div class="valign_middle qty_box">
       <span class="qty_label">Quantity: </span><input class="qty <?php print $Qty_Class ?>" type="number" id="<?php print $ID_Prefix ?>quantity" name="quantity" value="<?php print $Quantity_Value?>" />
              
       <?php if ($Updating_Cart):?>
        <button type="submit" class="btn btn_update_cart">Update Cart</button>
       <?php else:?>
        <button type="submit" class="btn btn_add_to_cart">Add to Cart</button>
       <?php endif;?>
              
       <?php  print $Quick_Total ?>
      </div>
    6. Change to:
      <div class="valign_middle qty_box">
       <?php if ($Price_Scheme == 'single'):?>
        <span class="qty_label">Quantity: </span>
        <input class="qty <?php print $Qty_Class ?>" type="number" id="<?php print $ID_Prefix ?>quantity" name="quantity" value="<?php print $Quantity_Value?>" />
       <?php elseif ($Price_Scheme == 'sets'):?>
        <div class="prod_options sc_form">
         <div class="fields_box">
          <ul class="same_line_labels <?php if (count($Options) == 0):?>one_field<?php endif;?> <?php if ($Price_Sets):?>price_sets<?php endif;?>">
           <li class="req">
            <label><span>Quantity</span></label>
            <div class="fields_box_field valign_middle">
             <ul class="radios">
              <?php foreach($Price_Sets as $Price_Set):?>
               <li class="price_set tip" title="<?php if ($Price_Set['Price_One_Is_Approx']):?>About <?php endif;?><?php print sc_price($Price_Set['Price_One'],'txt').'/'.$Price_Set['Set_Name_Singular']?>">
                <input class="sc_check qty <?php print $Qty_Class ?> <?php print $ID_Prefix.'quantitySet'?>" data-qty="<?php print $Price_Set['Qty_1']?>"  data-base_price="<?php print $Price_Set['Price']?>" type="radio" id="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>" name="quantity" value="pp<?php print $Price_Set['record_number']?>" <?php if ($Quantity_Value == "pp$Price_Set[record_number]"):?>checked="checked"<?php endif;?> />
                <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>">
                 <?php print "$Price_Set[Qty_1] $Price_Set[Set_Name]"?> -
                </label>
                <?php if ($Price_Set['Discount_Price']):?>
                 <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>" class="regular_price">
                  <?php print sc_price($Price_Set['Price'],'txt')?>
                 </label>
                 <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>" class="sale_price">                  
                  <?php print sc_price($Price_Set['Discount_Price'],'txt')?>
                 </label>
                <?php else:?>
                 <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>">
                  <?php print sc_price($Price_Set['Price'],'txt')?>
                 </label>
                <?php endif;?>
                <?php if (sc_price($Price_Set['Price_One']) == sc_price($Start_Price) && count($Price_Sets) > 1):?>
                 <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>" class="best_price">
                  (best value!)
                 </label>
                <?php endif;?>
               </li>
              <?php endforeach;?>
             </ul>
            </div>
           </li>
          </ul>
         </div>
        </div>
       <?php endif;?>
       <?php if ($Updating_Cart):?>
        <button type="submit" class="btn btn_update_cart">Update Cart</button>
       <?php else:?>
        <button type="submit" class="btn btn_add_to_cart">Add to Cart</button>
       <?php endif;?>
              
       <?php  print $Quick_Total ?>
      </div>

       

      product_thumbnail.tpl.php

      1. Find this:

        <?php if ($Options || $Agreements):?>
      2. Change to:
        <?php if ($Options || $Agreements || $Price_Scheme == 'sets'):?>
      3. Find this:

        <div class="center">
         <?php print $Quick_Total?>
         Quantity: <input class="qty" type="number" id="<?php print $ID_Prefix ?>quantity" name="quantity" value="<?php print $Quantity_Value?>" />       
         <button type="submit" class="btn btn_add_to_cart">Add to Cart</button>
        </div>
      4. Change to:
        <div class="center">
         <?php if ($Price_Scheme == 'single'):?>
          <span class="qty_label">Quantity: </span>
          <input class="qty <?php print $Qty_Class ?>" type="number" id="<?php print $ID_Prefix ?>quantity" name="quantity" value="<?php print $Quantity_Value?>" />
         <?php elseif ($Price_Scheme == 'sets'):?>
          <div class="prod_options sc_form">
           <div class="fields_box">
            <ul class="same_line_labels <?php if (count($Options) == 0):?>one_field<?php endif;?>">
             <li class="req">
              <label><span>Quantity</span></label>
              <div class="fields_box_field valign_middle">
               <ul class="radios">
                <?php foreach($Price_Sets as $Price_Set):?>
                 <li>
                  <input class="sc_check qty <?php print $Qty_Class ?> <?php print $ID_Prefix.'quantitySet'?>" data-qty="<?php print $Price_Set['Qty_1']?>"  data-base_price="<?php print $Price_Set['Price']?>" type="radio" id="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>" name="quantity" value="pp<?php print $Price_Set['record_number']?>" <?php if ($Quantity_Value == "pp$Price_Set[record_number]"):?>checked="checked"<?php endif;?> />
                  <label for="<?php print $ID_Prefix ?>quantity-<?php print $Price_Set['Index']?>">
                   <?php print "$Price_Set[Qty_1] $Price_Set[Set_Name]"?> - <?php print sc_price($Price_Set['Price'],'txt')?>
                  </label>
                 </li>
                <?php endforeach;?>
               </ul>
              </div>
             </li>
            </ul>
           </div>
          </div>
         <?php endif;?>
         <?php print $Quick_Total?>
         <button type="submit" class="btn btn_add_to_cart">Add to Cart</button>
        </div>
      5. Find this:

        <a onmouseover="scShowToolTip('<?php print $Tooltip_ID ?>')" onmouseout="scHideToolTip('<?php print $Tooltip_ID ?>')" href="<?php print $URL ?>"><?php print $Display_Name?></a>
      6. Change to:
        <a onmouseover="scShowToolTip('<?php print $Tooltip_ID ?>')" onmouseout="scHideToolTip('<?php print $Tooltip_ID ?>')" href="<?php print $URL ?>">
         <?php print $Display_Name?>
         <?php if ($Show_Product_Code && $Product_Code):?>
          <span class="prod_code"><?php print $Product_Code ?></span>
         <?php endif;?>
        </a>
      7. Find this:

        <?php elseif ($Base_Price): ?>
         <div class="prod_price">
          <?php print sc_price($Base_Price) ?>
         </div>
        <?php endif; ?>
      8. Add above:
        <?php elseif ($Price_Scheme == 'sets' && $Start_Price):?>
         As low as <?php print sc_price($Start_Price).'/'.$Set_Name_Singular ?>

         

        slideshow.tpl.php

        1. Find this:

          <div class="<?php print $Show['CSS_Class']?>" data-csl-items="<?php print $Show['opItems']?>" data-csl-autoplay="<?php print $Show['opAutoplay']?>" data-csl-loop="<?php print $Show['opLoop']?>" data-csl-nav="<?php print $Show['opNav']?>" data-csl-animateout="<?php print $Show['opAnimateOut']?>">
        2. Change to:
          <div class="<?php print $Show['CSS_Class']?>" data-csl-items="<?php print $Show['opItems']?>" data-csl-autoplay="<?php print $Show['opAutoplay']?>" data-csl-autoplaytimeout="<?php print $Show['opAutoplayTimeout']?>" data-csl-loop="<?php print $Show['opLoop']?>" data-csl-nav="<?php print $Show['opNav']?>" data-csl-animateout="<?php print $Show['opAnimateOut']?>">

          

        store_content.tpl.php

        1. Find this:

          <?php if (!isset($_GET['print_order'])) print sc_breadcrumb_nav(); ?>
        2. Add above:
          <?php print $Offline ?>

         

        store_home.tpl.php

        1. Find this:

          <?php foreach($Contents as $Content): ?>
        2. Add above:
          <?php print $Offline ?>

            

        Templates you should revert

         

         

         

         

        style_main.css.php

        With the release of Squirrelcart version 4.0 in October of 2013, it became no longer necessary to modify style_main.css.php. We strongly discouraged modification of this file in all documentation released since that date.

        The correct way to customize your CSS for Squirrelcart is by extending our built-in CSS using a file named style_custom.css.php which only contains the changes you wish to make. See this page for more info.

         

        If you have a customized version of style_main.css.php:

        1. Make a copy of your custom theme so you can work on it without disturbing the default theme. See the Copying a Theme for Testing topic for instructions. After copying your custom theme using those instructions, make sure it is set as your user account's current theme.
        2. Read our documentation explaining how to extend our CSS
        3. Using those instructions, create a style_custom.css.php file inside your new custom theme folder.
        4. Rename the style_main.css.php file in your new custom theme folder to style_main.css.OLD.php to disable it.
        5. If any of these files are present in your new custom theme folder, rename them to disable them:
          style_variant2_800.css.php
          style_variant2_1024.css.php
          style_variant2_1280.css.php
          style_variant2_fluid.css.php
        6. With these files disabled, you have disabled all of your custom CSS. You should now see more options to choose from for this new theme when setting your current theme. If you would like to change the appearance to be responsive, change the Width theme setting to responsive. Change the other theme options as you wish until you have something close to what you want. Then, continue below to add your custom CSS back in.
        7. Using a comparison tool like Diff Now (free, online) or Beyond Compare, compare your style_main.css.OLD.php file with the style_main.css.php file in the squirrelcart/themes/squirrelcart/ folder from the version you are upgrading from.

          For example, if you are upgrading from v4.5.4 you will be comparing your file to the style_main.css.php file in squirrelcart/themes/squirrelcart from your file backup of v4.5.4. This will show you every line you changed as compared to the original style_main.css.php file from the version you are upgrading from.
        8. Copy only the changes that you made to the style_custom.css.php file. You'll have to have some knowledge of CSS to do this. You can view your changes in the storefront to see their effect.
        9. When done, set your new custom theme as the store's default theme

         

         

        Need help?

        Lighthouse Development (the makers of Squirrelcart) offer upgrade services. Please see this page for more information:

        https://www.squirrelcart.com/upgrade-service

         

        Our standard upgrade service does not include updating custom theme templates. If you are interested in pricing to update your custom theme for version 5 please contact us:

        https://www.squirrelcart.com/contact

         

         

         

         


        © 2001-2017 Lighthouse Development. All Rights Reserved.