This page has been written as a guide to aid you in upgrading your site from v3.0.0 to v3.3.0 and after. Please read this page in its entirety before attempting to upgrade.
If you are using our SEO URLs (advanced) feature and are upgrading to Squirrelcart PRO v3.3.0 or newer, you'll need to update your .htaccess file to add support for the new Contact module.
- Open your .htaccess file in an editor
- If you find a section like this:
RewriteEngine On
RewriteRule ^(products|categories|content|news|reviews|testimonials)/?(.*)$ store.php/$1/$2 [L]
Add |contact inside the first set of parentheses, at the very end:
RewriteEngine On
RewriteRule ^(products|categories|content|news|reviews|testimonials|contact)/?(.*)$ store.php/$1/$2 [L]
- If you find a section like this:
<Files ~ "categories|products|content|news|reviews|testimonials">
ForceType application/x-httpd-php
</Files>
Add |content inside the quotes, directly before the last quote:
<Files ~ "categories|products|content|news|reviews|testimonials|contact">
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.3.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 foreach($Item['Option_Details'] as $Option_Detail): ?>
<li class="<?php print $Option_Detail['Alt'] ?>">
<label><?php print $Option_Detail['Name'] ?>:</label> <?php print $Option_Detail['Value'] ?>
</li>
<?php endforeach; ?>
- Replace it with this:
<?php foreach($Item['Option_Details'] as $Option_Detail): ?>
<li class="<?php print $Option_Detail['Alt'] ?>">
<label>
<?php if ($Option_Detail['Qty_Allow'] && !$Option_Detail['Allow_Multiples']):?>
(<?php print $Option_Detail['Quantity']?>)
<?php endif; ?>
<?php print $Option_Detail['Name'] ?>:
</label>
<?php if (count($Option_Detail['Value']) > 1):?>
<ul class="opt_detail_values">
<?php foreach($Option_Detail['Value'] as $Option_Detail_Value):?>
<li>
<?php if ($Option_Detail_Value['Quantity']): ?>
(<?php print $Option_Detail_Value['Quantity']?>)
<?php endif; ?>
<?php print $Option_Detail_Value['Value'] ?>
<?php if ($Option_Detail_Value['Price']): ?>
@ <?php print sc_price($Option_Detail_Value['Price']) ?>
<?php endif; ?>
</li>
<?php endforeach;?>
</ul>
<?php else: ?>
<?php if ($Option_Detail['Value'][0]['Quantity'] > 1 && $Option_Detail['Allow_Multiples']): ?>
(<?php print $Option_Detail['Value'][0]['Quantity']?>)
<?php endif; ?>
<?php print $Option_Detail['Value'][0]['Value'] ?>
<?php if ($Option_Detail['Value'][0]['Price'] && $Option_Detail['Value'][0]['Quantity'] > 1 && $Option_Detail['Allow_Multiples']): ?>
@ <?php print sc_price($Option_Detail['Value'][0]['Price']) ?>
<?php endif; ?>
<?php endif;?>
</li>
<?php endforeach; ?>
- Locate this code:
<?php foreach($Item['Option_Names'] as $Option_Name): ?>
<a class="opt_col_name" href="<?php print $Item['URL'] ?>" title="click to modify options"><?php print $Option_Name ?>:</a>
<?php endforeach; ?>
- Replace it with this:
<?php foreach($Item['Option_Details'] as $Option_Detail): if ($Option_Detail['Show_in_Column']): ?>
<a class="opt_col_name <?php print $Option_Detail['Tooltip_Class']?>" href="<?php print $Item['URL'] ?>"
title="
<?php if ($Option_Detail['Show_Tooltip']): ?>
<?php if ($Option_Detail['Tooltip_Show_Qty'] && count($Option_Detail['Value']) == 1):?>
(<?php print $Option_Detail['Quantity']?>) <?php print $Option_Detail['Name']?> @ <?php print sc_price($Option_Detail['Price']/$Option_Detail['Quantity'],'txt') ?> each<br/><br/>
<?php endif;?>
<?php print $Option_Detail['Tooltip_Text'] ?>
<?php else: ?>
click here to modify
<?php endif; ?>
"
>
<?php if ($Option_Detail['Qty_Allow'] && !$Option_Detail['Allow_Multiples']):?>
(<?php print $Option_Detail['Quantity']?>)
<?php endif; ?>
<?php print $Option_Detail['Name'] ?>:
</a>
<?php endif; endforeach; ?>
- Locate this code:
<?php if ($Options): ?>
- Replace it with this:
<?php if ($Options || $Agreements): ?>
- Locate this code:
<div class="prod_detail <?php print $Discount_Class ?>">
- Replace it with this:
<div class="prod_detail <?php print $Extra_Classes ?>">
-
Locate this code:
.breadcrumb_nav,
.nav_link_container ul,
.nav_link_container ol,
.checkout ul,
.order_detail ul,
.sc_form ul {
list-style: none;
margin: 0;
padding: 0;
}
- Replace it with this:
.breadcrumb_nav,
.nav_link_container ul,
.nav_link_container ol,
.checkout ul,
.order_detail ul,
.sc_form ul,
.select_multi {
list-style: none;
margin: 0;
padding: 0;
}
- Locate this code:
/* div containing file upload restrictions */
.opt_restrictions_list {
width: 120px;
border-left: silver solid 1px;
padding-top: 3px;
padding-left: 5px;
color: gray;
float: left;
clear: right;
}
- Add this below it:
.opt_txtlimits {
color: gray;
}
.opt_chars_left {
display: none;
}
.opt_chars_left span {
vertical-align: middle;
}
.opt_qty td {
padding-top: 0px;
vertical-align: top;
}
.prod_options .opt_qty td.opt_instruction {
padding-top: 2px;
}
.opt_qty .opt_field input,
.opt_qty_field {
width: 30px;
}
.opt_qty:hover .opt_qty_arrow {
position: absolute;
z-index: 1;
display: block;
width: 7px;
height: 20px;
background: url(<?php print sc_img('option_qty_arrow','dyn')?>) no-repeat top;
margin-top: -12px;
margin-left: 14px;
}
/* This controls the spacing between each option */
.opt_leading td {
font-size: 1px;
height: 5px;
}
/* This controls the spacing between each option, ONLY when there is at least one option with a qty field present */
.opt_qty_present .opt_leading td {
height: 20px;
}
- Locate this code:
.cart_table .opt_detail li.alt label {
color: #008000;
}
- Add this below it:
ul.opt_detail_values {
margin-left: 10px;
}
.opt_detail .opt_detail_values li {
background: none;
border: none;
padding: 0;
}
- Locate this code:
#print_friendly img {
margin-bottom: -2px;
}
- Replace it with this:
#print_friendly img {
vertical-align: middle;
}
- Add this to the very bottom of the file:
.subcategories {
margin-top: 30px;
}
.subcategories .box_row {
margin-bottom: 30px;
}
.subcategory_img {
display: block;
margin: 0 auto;
}
-
Locate this code:
<a class="tip" href="<?php print $URL ?>" title="<?php print $Tooltip ?>"><?php print $Content_Name ?></a>
- Replace it with this:
<a class="tip" href="<?php print $URL ?>" title="<?php print $Tooltip ?>">
<?php if ($Thumbnail_Image): ?>
<img class="subcategory_img" src="<?php print $Thumbnail_Image['dyn'] ?>" width="<?php print $Thumbnail_Image['width'] ?>" height="<?php print $Thumbnail_Image['height'] ?>" alt="<?php print $Thumbnail_Image['alt'] ?>" title="" />
<?php endif; ?>
<?php print $Content_Name ?>
</a>
These template files have significantly changed. If you have customized these templates, we recommend you copy the new versions into your custom theme and make your customizations over again if needed. If you do not need your customizations, deleting your custom version of the template file will cause Squirrelcart to use the new version of that same template file.
- option_text.tpl.php
- option_textarea.tpl.php
- options.tpl.php
- order_detail.tpl.php
- order_detail_printable.tpl.php
- order_email_customer_html.tpl.php
- order_email_customer_text.tpl.php
- order_email_merchant_html.tpl.php
- order_email_merchant_text.tpl.php
© 2001-2017 Lighthouse Development. All Rights Reserved.