This page has been written as a guide to aid you in upgrading your site from v3.0.0 to v3.5.0 and after. Please read this page in its entirety before attempting to upgrade.
If you were previously registered for UPS Online Tools, it has been replaced by UPS Developer Kit and requires that you register again. See this page for instructions.
If you are using our SEO URLs (advanced) feature and are upgrading to Squirrelcart PRO v3.5.0 or newer, you'll need to update your .htaccess file to add support for the Downloads and Store Locator modules. This is only needed if you are using those modules.
- Open your .htaccess file in an editor
- If you find a section like this:
RewriteEngine On
RewriteRule ^(products|categories|content|news|reviews|testimonials|contact)/?(.*)$ store.php/$1/$2 [L]
Add |downloads|store-locator inside the first set of parentheses, at the very end:
RewriteEngine On
RewriteRule ^(products|categories|content|news|reviews|testimonials|contact|downloads|store-locator)/?(.*)$ store.php/$1/$2 [L]
- If you find a section like this:
<Files ~ "categories|products|content|news|reviews|testimonials|contact">
ForceType application/x-httpd-php
</Files>
Add |content inside the quotes, directly before the last quote:
<Files ~ "categories|products|content|news|reviews|testimonials|contact|downloads|store-locator">
ForceType application/x-httpd-php
</Files>
- Save the file
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 v3.5.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.
- Locate this code:
<?php print $News_Groups?>
- Directly after that code, add this:
<?php if (!empty($Agreements)): ?>
<div class="terms">
<img class="sc_header" src="<?php print $Terms_Image['dyn'] ?>" alt="Terms & Conditions" width="<?php print $Terms_Image['width'] ?>" height="<?php print $Terms_Image['height'] ?>">
<?php foreach($Agreements as $Agreement): ?>
<div class="boxc">
<fieldset>
<h3><?php print $Agreement['Display_Name'] ?></h3>
<div class="agree_text">
<?php print $Agreement['Agreement']?>
</div>
<div class="agree_print">
<a target="_blank" href="<?php print $Agreement['Print_URL'] ?>">Print Agreement</a>
</div>
<div class="agree_fld valign_middle">
I agree <input class="check" type="checkbox" name="<?php print $Agreement['Field_Name'] ?>" <?php print $Agreement['Checked'] ?> />
</div>
</fieldset>
<!-- below is for rounded corners -->
<b class="cn tr"></b><b class="cn br"></b><b class="cn tl"></b><b class="cn bl"></b>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
- Locate this code:
<a href="#" id="continue_btn_link" class="continue_btn btn co_btn_disabled" onclick="document.getElementById('address_form').submit(); return false;"></a>
- Add this before it:
<?php if (!empty($Agreements)): ?>
<div class="terms">
<img class="sc_header" src="<?php print $Terms_Image['dyn'] ?>" alt="Terms & Conditions" width="<?php print $Terms_Image['width'] ?>" height="<?php print $Terms_Image['height'] ?>">
<?php foreach($Agreements as $Agreement): ?>
<div class="boxc">
<fieldset>
<h3><?php print $Agreement['Display_Name'] ?></h3>
<div class="agree_text">
<?php print $Agreement['Agreement']?>
</div>
<div class="agree_print">
<a target="_blank" href="<?php print $Agreement['Print_URL'] ?>">Print Agreement</a>
</div>
<div class="agree_fld valign_middle">
I agree <input class="check" type="checkbox" name="<?php print $Agreement['Field_Name'] ?>" <?php print $Agreement['Checked'] ?> />
</div>
</fieldset>
<!-- below is for rounded corners -->
<b class="cn tr"></b><b class="cn br"></b><b class="cn tl"></b><b class="cn bl"></b>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
- Locate this code:
<?php print $reCAPTCHA_HTML?>
- Add this directly above:
<?php if (!empty($Agreements)): ?>
<div class="terms">
<img class="sc_header" src="<?php print $Terms_Image['dyn'] ?>" alt="Terms & Conditions" width="<?php print $Terms_Image['width'] ?>" height="<?php print $Terms_Image['height'] ?>">
<?php foreach($Agreements as $Agreement): ?>
<div class="boxc">
<fieldset>
<h3><?php print $Agreement['Display_Name'] ?></h3>
<?php if ($Agreement['Product_Names']):?>
<div class="agree_details">
This agreement applies to the following product(s):
<?php print implode(', ',$Agreement['Product_Names'])?>
</div>
<?php endif; ?>
<div class="agree_text">
<?php print $Agreement['Agreement']?>
</div>
<div class="agree_print">
<a target="_blank" href="<?php print $Agreement['Print_URL'] ?>">Print Agreement</a>
</div>
<div class="agree_fld valign_middle">
I agree <input class="check" type="checkbox" name="<?php print $Agreement['Field_Name'] ?>" <?php print $Agreement['Checked'] ?> />
</div>
</fieldset>
<!-- below is for rounded corners -->
<b class="cn tr"></b><b class="cn br"></b><b class="cn tl"></b><b class="cn bl"></b>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
If you are using VAT (used in the European Union), we recommend reverting this template (delete it from your custom theme folder if present).
- Locate this code:
<?php if ($Handling_Total): ?>
Handling Fee:<br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php if ($Other_Fee['Details_URL']): ?>
<a class="ship_detail_popup tip" href="<?php print $Other_Fee['Details_URL']?>" title="<?php print $Other_Fee['Description']?>"><?php print $Other_Fee['Label'] ?></a>:<br />
<?php else: ?>
<?php print $Other_Fee['Label'] ?>:<br />
<?php endif;?>
<?php endforeach; ?>
-
Locate this code:
<?php if ($Handling_Total): ?>
<?php print sc_price($Handling_Total) ?><br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php print sc_price($Other_Fee['Amount']) ?><br />
<?php endforeach; ?>
- Locate this code:
<?php if ($Handling_Total): ?>
Handling Fee:<br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php if ($Other_Fee['Details_URL']): ?>
<a class="ship_detail_popup tip" href="<?php print $Other_Fee['Details_URL']?>" title="<?php print $Other_Fee['Description']?>"><?php print $Other_Fee['Label'] ?></a>:<br />
<?php else: ?>
<?php print $Other_Fee['Label'] ?>:<br />
<?php endif;?>
<?php endforeach; ?>
-
Locate this code:
<?php if ($Handling_Total): ?>
<?php print sc_price($Handling_Total) ?><br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php print sc_price($Other_Fee['Amount']) ?><br />
<?php endforeach; ?>
For all four of the above templates, the changes are the same with the exception of #1 and #2 below which are only for order_detail.tpl.php.
- For order_detail.tpl.php ONLY - Find this line:
<a href="<?php print $Shipping_Details_URL ?>" class="ship_detail_popup" target="_blank" >Shipping total:</a><br/>
- For order_detail.tpl.php ONLY - Replace with:
<a href="<?php print $Shipping_Details_URL ?>" class="ship_detail_popup tip" target="_blank" title="<?php print $Shipping_Details_Truncated ?>">Shipping total:</a><br/>
- Find this code:
<?php if ($Handling_Total): ?>
Handling Fee:<br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php if ($Other_Fee['Details_URL']): ?>
<a class="ship_detail_popup tip" href="<?php print $Other_Fee['Details_URL']?>" title="<?php print $Other_Fee['Description']?>"><?php print $Other_Fee['Label'] ?></a>:<br />
<?php else: ?>
<?php print $Other_Fee['Label'] ?>:<br />
<?php endif;?>
<?php endforeach; ?>
- Find this code:
<?php if ($Handling_Total): ?>
<?php print sc_price($Handling_Total) ?><br />
<?php endif; ?>
- Add this below it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php print sc_price($Other_Fee['Amount']) ?><br />
<?php endforeach; ?>
Both of these templates require the same changes.
- Find this line:
<?php if ($VAT_Total): ?>
- Add this above it:
<?php foreach ($Other_Fees as $Other_Fee): ?>
<?php print $Other_Fees['Label'].': '.sc_price($Other_Fee['Amount'], 'text') ?>
<?php endforeach; ?>
- Find this line:
if ($Option_Detail_Value['Price']) print " @ ".sc_price($Option_Detail_Value['Price'],'text');
- Replace with:
if ($Option_Detail_Value['Price'] > 0) print " @ ".sc_price($Option_Detail_Value['Price'],'text');
- Find this line:
if ($Option_Detail['Value'][0]['Price']) print " @ ".sc_price($Option_Detail['Value'][0]['Price'],'text');
- Replace with:
if ($Option_Detail['Value'][0]['Price'] > 0) print " @ ".sc_price($Option_Detail['Value'][0]['Price'],'text');
- Find this line:
<div class="agree <?php print $Agreement['Instance']?>" style="width: <?php print $Agreement['Width'] ?>px;">
- Change to:
<div class="agree <?php print $Agreement['Instance']?>">
- Find this line:
<div class="agree_text" style="width: <?php print $Agreement['Width'] ?>px; height: <?php print $Agreement['Height'] ?>px">
- Change to:
<div class="agree_text">
- Find this line:
<a href="<?php print $Pre_Add_to_Cart_URL ?>" id="add_to_cart_link<?php print $Form_ID ?>" class="<?php print $Add_to_Cart_Class ?> btn co_btn_disabled" <?php if (!$Opts_not_Shown): ?>onclick="document.getElementById('add_to_cart_form_<?php print $Form_ID?>').submit(); return false"<?php endif;?>></a>
- Change to:
<a href="<?php print $Pre_Add_to_Cart_URL ?>" rel="nofollow" id="add_to_cart_link<?php print $Form_ID ?>" class="<?php print $Add_to_Cart_Class ?> btn co_btn_disabled" <?php if (!$Opts_not_Shown): ?>onclick="document.getElementById('add_to_cart_form_<?php print $Form_ID?>').submit(); return false"<?php endif;?>></a>
-
Find this:
.agree {
margin: 15px auto;
}
-
Change to this:
.agree {
margin: 15px auto;
width: 350px;
}
-
Find this:
.agree_text {
text-align: left;
border: black solid 1px;
overflow: auto;
padding: 5px;
background-color: #ececec;
margin: 0 auto;
width: 350px;
height: 150px;
}
-
Change to:
.agree_text {
text-align: left;
border: black solid 1px;
overflow: auto;
padding: 5px;
background-color: #ececec;
margin: 0 auto;
width: 350px;
height: 200px;
}
-
Find this:
.ship_rates {
float: left;
}
-
Change to this:
.ship_rates {
float: left;
width: 500px;
}
-
Find this:
#check_number {
width: 50px;
}
-
Add this below it:
.terms .agree_text {
width: auto;
margin: 0 20px;
}
.terms .agree_fld {
text-align: center;
font-size: 14px;
}
.terms .agree_print {
margin-right: 25px;
}
.terms .agree_details {
color: gray;
margin: 0 20px 10px 20px;
}
.account_form .terms .sc_header {
margin-left: -35px;
}
© 2001-2017 Lighthouse Development. All Rights Reserved.