Glossary Item Box

Squirrelcart v6.1.0

v6.1.0

Overview

This page has been written as a guide to aid you in upgrading your site to v6.1.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.1 includes major discount improvements. Buy / Get type discounts have been completely overhauled. As a result, any Buy X Get Y type discounts you have enabled in your store will be disabled by the upgrade script. After upgrading you will need to go over your discount records and adjust them as needed.

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.1.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:

 

product_detail.tpl.php

  1. 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 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; ?>
  2. Change to:
    <?php if (isset($Buy_For_Price)):?>
     <span class="prod_price">
      <?php print $Price_Label?> <?php print $Buy_Qty?> for <?php print sc_price($Buy_For_Price) ?>
      <span class="price_xtra">Only <span <?php print $SchemaOrg_Price?>><?php print sc_price($Base_Price) ?></span> each</span>
     </span>
    <?php elseif (isset($Get_For_Price)):?>
     <span class="prod_price">
      <?php print $Price_Label?>
      <?php if ($Get_For_Price > 0):?>
       <?php print $Get_Qty?> for <?php print sc_price($Get_For_Price) ?>
      <?php else:?>
       <?php print $Get_Qty?> free!
      <?php endif;?>
      
      <span class="price_xtra price_qlfy">When you buy <?php print $Buy_Qty?><?php print $Buy_Or_More?>
       <?php if ($Get_Self_Qlfy):?>
        at regular price
       <?php else:?>
        <a href="<?php print $Discounts_URL?>">qualifying item(s)</a>
       <?php endif;?>
      </span>
     </span>
    <?php elseif ($Base_Price): ?>
     <span class="prod_price">
      <?php print $Price_Label?> <span <?php print $SchemaOrg_Price?>><?php print sc_price($Base_Price) ?></span>
      <?php if ($Buy_Or_More):?>
       <span class="price_xtra">When you buy <?php print $Buy_Qty?> or more</span>
      <?php endif;?>
     </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; ?>
  3. Find this:

    <div class="prod_section discounts">
  4. Change to:
    <div id="prodDisc" class="prod_section discounts">
  5. Find this:

    <div class="discount_description <?php print $Discount['Instance'] ?>">
  6. Change to:
    <div id="disc<?php print $Discount['record_number']?>" class="discount_description <?php print $Discount['Instance'] ?>">
  7. Find this:

    <div class="discount_ad_price">
     <?php if ($Discount['Can_Discount_Options']):?>
      <span class="discount_ad_price_right">You Save: <?php print $Discount['Savings_Percent'] ?>%!</span>
     <?php else: ?>
      <span class="discount_ad_price_left"><?php print $Discount['Price_Label']?> <?php print sc_price($Discount['Discount_Price']) ?></span>
      <span class="discount_ad_price_right">You Save: <?php print sc_price($Discount['Savings_Amt']) ?> (<?php print $Discount['Savings_Percent'] ?>%)!</span>
     <?php endif;?>
    </div>
  8. Change to:
    <div class="discount_ad_price">
     <?php if ($Discount['Can_Discount_Options']):?>
      <span class="discount_ad_price_right">You Save: <?php print $Discount['Savings_Percent'] ?>%!</span>
     <?php else: ?>
      <span class="discount_ad_price_left"><?php print $Discount['Price_Label']?> <?php print sc_price($Discount['Discount_Price']) ?> / ea</span>
      <span class="discount_ad_price_right">You Save: <?php print sc_price($Discount['Savings_Amt']) ?> (<?php print $Discount['Savings_Percent'] ?>%)!</span>
     <?php endif;?>
     
     <?php if ($Discount['Limit']):?>
      &nbsp;&nbsp;&nbsp;(Limit <?php print $Discount['Limit']?>)
     <?php endif;?>
    </div>
    <?php if ($Discount['Buy_Get']):?>
     <div class="price_apply">
      Pricing applies to <?php print $Discount['Get_Qty']?>,
      when you buy <?php print $Discount['Buy_Qty']?> <?php if ($Discount['Buy_Range'] == 'or more'):?>or more<?php endif;?>
      
      <?php if ($Discount['Buy_What'] == 'categories' && !empty($Discount['Buy_Categories'])):?>
       product(s) from the following categories:
       <ul class="qlfy_prods">
        <?php foreach($Discount['Buy_Categories'] as $Buy_Category):?>
         <li><a href="<?php print $Buy_Category['URL']?>"><?php print $Buy_Category['Name']?></a></li>
        <?php endforeach;?>
       </ul>
      <?php elseif ($Discount['Buy_What'] == 'products' && !empty($Discount['Buy_Products'])):?>
       of the following products:
       <ul class="qlfy_prods">
        <?php foreach($Discount['Buy_Products'] as $Buy_Product):?>
         <li><a href="<?php print $Buy_Product['URL']?>"><?php print $Buy_Product['Name']?></a></li>
        <?php endforeach;?>
       </ul>
      <?php endif;?>
     </div>
    <?php endif;?>

 

product_thumbnail.tpl.php

  1. Find this:

    <div class="sale_price prod_price
  2. Change to:
    <!--  setup a tooltip to help explain sale pricing on mouseover -->       
    <div class="sale_price prod_price tip" title="
     <?php if (isset($Buy_For_Price)):?>
      <?php print $Buy_Qty?> for <?php print sc_price($Buy_For_Price,'text') ?>&lt;br/&gt;
      (Only <?php print sc_price($Base_Price,'text') ?> each)
     <?php elseif (isset($Get_For_Price)):?>
      <?php if ($Get_For_Price > 0):?>
       <?php print $Get_Qty?> for <?php print sc_price($Get_For_Price,'text') ?>
      <?php else:?>
       <?php print $Get_Qty?> free
      <?php endif;?>
      when you buy <?php print $Buy_Qty?><?php print $Buy_Or_More?>
      <?php if ($Get_Self_Qlfy):?>
       at regular price
      <?php else:?>
       qualifying item(s)
      <?php endif;?>
     <?php endif; ?>      
    ">

  

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.