Glossary Item Box

Squirrelcart v6.1.0

v4.2.0

Overview

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

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 v4.2.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.

 

category_as_table.tpl.php

  1. Find this line:
    <div class="form_btns">
  2. Change to:
    <div class="form_btns multi_add_footer">

 

checkout_view.tpl.php AND
order_detail.tpl.php AND
order_detail_admin.tpl.php AND
order_email_customer_html.tpl.php AND
order_email_merchant_html.tpl.php

  1. Find this:
    <?php foreach($Items as $Item): ?>
     <tr>
  2. Change to:
    <?php foreach($Items as $Item): ?>
     <tr class="<?php print $Item['Row_Class']?>">

product_detail.tpl.php

  1. Find this:
    <?php print sc_msg($Add_to_Cart_Message,'success') ?>
  2. Add this before:
    <?php if ($Parent_Product_URL) print sc_msg("You are viewing an add-on for <strong>$Parent_Product_Name</strong>. <a href=\"$Parent_Product_URL\">Click here to return</a>.",'info') ?>
  3. Find this:
    <?php if ($Show_Pricing): ?>
  4. Add this after:
    <?php print $Add_On_Products?>

style_main.css.php

  1. Add this to the bottom of the file:

    /*******************************
       Add On Products
    *******************************/
    .add_on_products .cat_products {
       display: table;
       width: 100%;
    }

    .add_on_products .cat_products .box_row {
       display: table-row;
    }

    #sc .add_on_products .box_outer {
       float: none;
       display: table-cell;
       border: silver dotted 1px;
       border-width: 1px 0 0 1px;
       vertical-align: middle;
    }

    #sc .add_on_products .box_outer.has_msg {
       vertical-align: top;
    }

    #sc .add_on_products .box_outer:first-child {
       border-left: 0;
    }

    #sc .add_on_products .box_row:first-child .box_outer {
       border-top: 0;
    }

    .add_on_products .box_inner {
       padding: 10px 0 20px 0;
    }

    .add_on_products .required_instructions {
       display: none;
    }

    .add_on_products .prod_name a:first-child:after {
       content:"";
       width: 16px;
       height: 16px;
       background: url(<?php print sc_img('zoom_in','dyn')?>) no-repeat;
       display: inline-block;
       vertical-align: middle;
       margin-left: 7px;
    }

    .add_on_products .sc_msg {
       text-align: left;
       font-size: 1em;
       border-width: 1px;
    padding: 7px 3px 7px 42px;
    margin: 10px;
       border: 0px;
    border-radius: 5px;
    }

    .add_on_products .sc_msg img {
       width: 24px;
       height: 24px;
       top: 3px;
    }

    .add_on_products .sc_msg p {
       margin: 0;
    }

    .qty_check {
       border: #EDEEEF solid 2px;
       border-radius: 15px;
       padding: 5px 15px;
       display: inline-block;
       cursor: pointer;
    }

    .qty_check:hover {
       border-color: #A7D0E8;
       
    }

    .qty_check * {
       vertical-align: middle;
       cursor: pointer;
    }

    #sc .qty_check input {
       width: auto;
       margin: 0 0 0 10px;
    }

    .addon_prefix {
       font-weight: bold;
       margin-right: 5px;
    }

    tr.addon .td1 {
       padding-left: 30px;
       padding-right: 15px;
    }

    tr.addon .prod_name {
       margin-top: 10px;
    }

    tr.addon .item_btns {
       display: none;
    }

    /*
       Triangle pointing up to indicate add-on belongs to parent above
       We will only do this if page BG is white, else it looks bad
    */
    <?php if (strtolower($ini['pageBgColor']) == '#fff' || strtolower($ini['pageBgColor'] == '#ffffff')):?>
       tr.addon .prod_name_desc:before {
          content: "";
          width: 0px;
          height: 0px;
          border-style: solid;
          border-width: 0 20px 20px 20px;
          border-color: rgba(255,255,255,0) rgba(255,255,255,0) <?php print $ini['pageBgColor']?> rgba(255,255,255,0);
          position: absolute;
          margin: -25px 0 0 15px;
          z-index: 2;
       }
       /* This simulats a border around above triangle */
       tr.addon .td1:before {
          content: "";
          width: 0px;
          height: 0px;
          border-style: solid;
          border-width: 0 21px 21px 21px;
          border-color: rgba(255,255,255,0) rgba(255,255,255,0) <?php print $ini['rowBorderColor']?> rgba(255,255,255,0);
          position: absolute;
          margin: -26px 0 0 14px;
          z-index: 1;
       }
       /*    
          The use of rgba above is to solve a grey border problem that occurs only in Firefox.
          rgba doesn't work in IE <= 8, so we need to use transparent instead
       */
       <?php if ($SC['browser']['browser'] == 'ie' && $SC['browser']['maj_ver'] <= 8.0): ?>
          tr.addon .prod_name_desc:before {
             border-color: transparent transparent <?php print $ini['pageBgColor']?> transparent;
          }
       
          tr.addon .td1:before {
             border-color: transparent transparent <?php print $ini['rowBorderColor']?> transparent;
          }
       <?php endif;?>
    <?php endif;?>

 

 

 


© 2001-2017 Lighthouse Development. All Rights Reserved.