Upgrade your TomatoCart Store from 1.1.8.5 to 1.1.8.6!

In this article, I will teach you how to upgrade your 1.1.8.5 store to 1.1.8.6 step-by-step.

Warning: Please backup all your files and database before doing the upgrade. This is a good practice.

1. Database Upgrade

Execute the following sql in your database:

Note: if you had changed the table names (prefix) “toc_” with your tables prefix, please replace the following “toc_” prefix with your own prefix.To check prefix, you can open your database and check beginning of all TomatoCart tables. If you did not use prefix, replace with empty.

ALTER TABLE toc_variants_specials CHANGE variants_speicals_price variants_specials_price decimal(15,4) NOT NULL;
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Enable the confirmation dialog for add to cart action', 'ENABLE_CONFIRMATION_DIALOG', '1', 'Enable the confirmation dialog for add to cart action', '1', '28', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Enable administrators log', 'ENABLE_ADMINISTRATORS_LOG', '1', 'Set to true if you want to see the logs in the administrators log module', '1', '29', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Search Results In Auto Completer ', 'MAX_DISPLAY_AUTO_COMPLETER_RESULTS', '10', 'Maximum number of search results in auto completer', '3', '19', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Maximum Characters For Product Name in Auto Completer', 'MAX_CHARACTERS_AUTO_COMPLETER', '40', 'Maximum number of characters for product name in auto completer', '3', '20', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Width Of Auto Completer List', 'WIDTH_AUTO_COMPLETER', '400', 'Width of auto completer list', '3', '21', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Image Group Of Auto Completer', 'IMAGE_GROUP_AUTO_COMPLETER', 'thumbnail', 'The image group of the auto completer search list', '4', '9', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Display Varains Options', 'PRODUCT_LIST_VARIANTS_OPTIONS', '1', 'Do you want to display the variants options in the product listing?', '8', '13', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now());
INSERT INTO toc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Display Quantity Input Field', 'PRODUCT_LIST_QUANTITY_INPUT', '1', 'Do you want to display quantity input field in the product listing?', '8', '14', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now());

These sql statements are used to add some new configurations for your store. Please read the guide about how to set the new configurations at Several New Configurations for TomatoCart 1.1.8.6!.

2. File Upgrade

If you didn’t modify any system code, please apply following steps to update your system.

  1. Download 1.1.8.6 package from http://www.tomatocart.com/downloads/download-tomatocart.html.
  2. Open archive and find includes/configure.php to remove it. Afterwards, you have to copy all the other contents to TomatoCart root directory on your web server. You need to override directories and files if your copy process request confirmation.

That’s it. It would be better to clear all the caches under admin panel > tools > cache control module.

If you just customized your template, please apply following steps to update your system.

  1. Download 1.1.8.6 package from http://www.tomatocart.com/downloads/download-tomatocart.html.
  2. Open archive and find the templates directory to remove it. In addition, please delete the includes/configure.php too. Afterwards, you have to copy all the other contents to TomatoCart root directory on your web server. You need to override directories and files if your copy process request confirmation.

For Stores Using Grass Gray Template:

Step 1. Go to templates/glass_gray/index.php

– Find the following code:

<link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="ext/autocompleter/Autocompleter.css" />

– Replace it with the following code:

<?php if ($osC_Services->isStarted('debug') && defined('SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT') && SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT == 1) { ?>
<link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="ext/autocompleter/Autocompleter.css" />
<?php }else {?>
<link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/all.min.css" />
<?php } ?>

– Find the following code:

<script type="text/javascript" src="ext/autocompleter/Autocompleter.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.Request.js"></script>
<script type="text/javascript" src="ext/autocompleter/Observer.js"></script>
<script type="text/javascript" src="includes/javascript/auto_completer.js"></script>
<script type="text/javascript" src="includes/javascript/popup_cart.js"></script>
<script type="text/javascript" src="includes/javascript/bookmark.js"></script>

— Replace them with the following code:

<?php if ($osC_Services->isStarted('debug') && defined('SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT') && SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT == 1) { ?>
<script type="text/javascript" src="includes/javascript/pop_dialog.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.Request.js"></script>
<script type="text/javascript" src="ext/autocompleter/Observer.js"></script>
<script type="text/javascript" src="includes/javascript/auto_completer.js"></script>
<script type="text/javascript" src="includes/javascript/popup_cart.js"></script>
<script type="text/javascript" src="includes/javascript/bookmark.js"></script>
<?php }else { ?>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/all.min.js"></script>
<?php }?>

–Find the following code:

<script type="text/javascript">
  window.addEvent('domready', function() {
    new PopupCart({
      template: '<?php echo $osC_Template->getCode(); ?>',
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>'
    });

    new TocAutoCompleter('keywords', {
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>',
      template: '<?php echo $osC_Template->getCode(); ?>',
      width: 300
    });
  });
  new TocBookmark({
    bookmark: 'bookmark',
    text: '<?php echo $osC_Language->get('bookmark'); ?>',
    img: '<?php echo 'images/bookmark.png'; ?>'
  });  
</script>

— Replace it with:

<script type="text/javascript">
  window.addEvent('domready', function() {
    new PopupCart({
      template: '<?php echo $osC_Template->getCode(); ?>',
      enableDelete: '<?php 
        $box_modules = $osC_Template->osC_Modules_Boxes->_modules;

        $flag = 'yes';
        foreach($box_modules as $box_group => $modules) {
          foreach ($modules as $module_code) {
            if ($module_code == 'shopping_cart') {
              $flag = 'no';

              break 2;
            }
          }
        }

        echo $flag;
      ?>',
      <?php 
        if (defined('ENABLE_CONFIRMATION_DIALOG') && (ENABLE_CONFIRMATION_DIALOG == '1')) {
      ?>
      dlgConfirmStatus: true,
      <?php 
        }else {
      ?>
      dlgConfirmStatus: false,
      <?php 
        }
      ?>
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>',
      error_sender_name_empty: '<?php echo $osC_Language->get("error_sender_name_empty"); ?>',
      error_sender_email_empty: '<?php echo $osC_Language->get("error_sender_email_empty"); ?>',
      error_recipient_name_empty: '<?php echo $osC_Language->get("error_recipient_name_empty"); ?>',
      error_recipient_email_empty: '<?php echo $osC_Language->get("error_recipient_email_empty"); ?>',
      error_message_empty: '<?php echo $osC_Language->get("error_message_empty"); ?>',
      error_message_open_gift_certificate_amount: '<?php echo $osC_Language->get('error_message_open_gift_certificate_amount'); ?>'
    });

    new TocAutoCompleter('keywords', {
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>',
      template: '<?php echo $osC_Template->getCode(); ?>',
      maxChoices: <?php echo defined('MAX_DISPLAY_AUTO_COMPLETER_RESULTS') ? MAX_DISPLAY_AUTO_COMPLETER_RESULTS : 10;?>,
      width: <?php echo defined('WIDTH_AUTO_COMPLETER') ? WIDTH_AUTO_COMPLETER : 400; ?>,
      moreBtnText: '<?php echo $osC_Language->get('button_get_more'); ?>',
      imageGroup: '<?php echo defined('IMAGE_GROUP_AUTO_COMPLETER') ? IMAGE_GROUP_AUTO_COMPLETER : 'thumbnail'; ?>',
    });
  });
  new TocBookmark({
    bookmark: 'bookmark',
    text: '<?php echo $osC_Language->get('bookmark'); ?>',
    img: '<?php echo 'images/bookmark.png'; ?>'
  });  
</script>

Step 2. Go to templates/glass_gray/stylesheet.css

Find the following code:

.button {
  cursor: pointer;
}

— Replace it with:

.button {
  cursor: pointer;
  background: #3498db;
  background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
  background-image: -moz-linear-gradient(top, #3498db, #2980b9);
  background-image: -ms-linear-gradient(top, #3498db, #2980b9);
  background-image: -o-linear-gradient(top, #3498db, #2980b9);
  background-image: linear-gradient(to bottom, #3498db, #2980b9);
  -webkit-border-radius: 8;
  -moz-border-radius: 8;
  border-radius: 8px;
  text-shadow: 1px 1px 3px #666666;
  -webkit-box-shadow: 0px 1px 3px #666666;
  -moz-box-shadow: 0px 1px 3px #666666;
  box-shadow: 0px 1px 3px #666666;
  font-family: Arial;
  color: #ffffff;
  font-size: 12px;
  padding: 5px 8px;
  text-decoration: none;
  margin: 5px;
}

.button:hover {
  background: #3cb0fd;
  background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
  background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
  text-decoration: none;
}

.button.squre {
  border-radius: 0;
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
}

.button.medium {
  font-size: 14px;
  padding: 8px 10px;
}

— Add the following code at the bottom of stylesheet.css:

/* Css3 Animation */
.animated {
  -webkit-animation-duration: 0.5s;
     -moz-animation-duration: 0.5s;
       -o-animation-duration: 0.5s;
          animation-duration: 0.5s;
  -webkit-animation-fill-mode: both;
     -moz-animation-fill-mode: both;
       -o-animation-fill-mode: both;
          animation-fill-mode: both;
}

@-webkit-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@-moz-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@-o-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

.animated.flash {
  -webkit-animation-name: flash;
  -moz-animation-name: flash;
  -o-animation-name: flash;
  animation-name: flash;
}

@-webkit-keyframes slideOutUp {
  0% {
    -webkit-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-2000px);
  }
}

@-moz-keyframes slideOutUp {
  0% {
    -moz-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -moz-transform: translateY(-2000px);
  }
}

@-o-keyframes slideOutUp {
  0% {
    -o-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -o-transform: translateY(-2000px);
  }
}

@keyframes slideOutUp {
  0% {
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-2000px);
  }
}

.slideOutUp {
  -webkit-animation-name: slideOutUp;
  -moz-animation-name: slideOutUp;
  -o-animation-name: slideOutUp;
  animation-name: slideOutUp;
}

@-webkit-keyframes bounceInDown {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -webkit-transform: translateY(30px);
  }

  80% {
    -webkit-transform: translateY(-10px);
  }

  100% {
    -webkit-transform: translateY(0);
  }
}

@-moz-keyframes bounceInDown {
  0% {
    opacity: 0;
    -moz-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -moz-transform: translateY(30px);
  }

  80% {
    -moz-transform: translateY(-10px);
  }

  100% {
    -moz-transform: translateY(0);
  }
}

@-o-keyframes bounceInDown {
  0% {
    opacity: 0;
    -o-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -o-transform: translateY(30px);
  }

  80% {
    -o-transform: translateY(-10px);
  }

  100% {
    -o-transform: translateY(0);
  }
}

@keyframes bounceInDown {
  0% {
    opacity: 0;
    transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    transform: translateY(30px);
  }

  80% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.animated.bounceInDown {
  -webkit-animation-name: bounceInDown;
  -moz-animation-name: bounceInDown;
  -o-animation-name: bounceInDown;
  animation-name: bounceInDown;
}
.productListing tr td:last-child {
width: 125px;
}
.productListing tr td:last-child input {
float:left;
}
.productListing tr td:last-child a {
float:right;
}
input.qtyField {text-align:center;width:35px;margin-left:15px;}
div.qtyBlock {margin-bottom:5px;}
a.readMore {display:block;margin:5px 3px;}
/* Variants*/
.productListing .options li {float:left;margin-left:10px;}
.productListing .options li label {display:block;}
.warning {color:red;text-align:center;}
.alert {border: 1px solid red;}

— Find the following code:

.cart a:hover {text-decoration:none;}
#popupCart .cartCallpased {padding-right:15px;background: url(images/arrow-down.png) no-repeat right center;cursor:pointer;}
#popupCart .cartExpanded {padding-right:15px;background: url(images/arrow-up.png) no-repeat right center;cursor:pointer;}
#popupCartContent .cartEmpty{color:#464646;margin-left:10px;float:left;}
#popupCartContent {width: 312px; z-index: 1000; background-color:#F3F3F3; border-left: 1px solid #D9D9D9; border-right: 1px solid #D9D9D9; border-top: 1px solid #D9D9D9; border-bottom: 1px solid #8B8A8A; padding:0; margin: 0;}
#popupCartContent h6 {color: #BEBEBE;border: 0;}
#popupCartContent .productImage {border: 1px solid #dddddd;}
#popupCartContent .subtotal {color: #464646; font-weight: bold; float: right;margin-right:10px;margin-bottom:10px;}
#popupCartContent .content {border: none}
#btnClosePopCart {background: none;border:0;color:#FFFFFF;cursor:pointer;position:absolute;right:5px;font-weight:bolder;font-size:18px;}

— Replace it with:

.cart a:hover {text-decoration:none;}
#popupCart .cartCallpased {padding-right:15px;background: url(images/arrow-down.png) no-repeat right center;cursor:pointer;}
#popupCart .cartExpanded {padding-right:15px;background: url(images/arrow-up.png) no-repeat right center;cursor:pointer;}
#popupCartContent .cartEmpty{color:#464646;margin-left:10px;float:left;}
#popupCartContent {width: 312px; z-index: 1000; background:none; padding-top:20px; margin: 0;}
#popupCartContent .cartInner {
  padding: 10px;
  border-radius: 4px;
  -webkit-box-shadow: 0 0 3px 3px #CCCCCC;
  -moz-box-shadow: 0 0 3px 3px #CCCCCC;
  box-shadow: 0 0 3px 3px #CCCCCC;
  background: #EEEEEE;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0, #EEEEEE),
    color-stop(0.71, #FFFFFF)
  );
  background-image: -o-linear-gradient(bottom, #EEEEEE 0%, #FFFFFF 71%);
  background-image: -moz-linear-gradient(bottom, #EEEEEE 0%, #FFFFFF 71%);
  background-image: -webkit-linear-gradient(bottom, #EEEEEE 0%, #FFFFFF 71%);
  background-image: -ms-linear-gradient(bottom, #EEEEEE 0%, #FFFFFF 71%);
  background-image: linear-gradient(to bottom, #EEEEEE 0%, #FFFFFF 71%);
}
#popupCartContent table {width:100%;border-collapse: collapse; border-spacing: 0;}
#popupCartContent table.products td {
   border-bottom: 1px solid #CCCCCC;
   padding: 8px 5px;
   vertical-align: center;
}

#popupCartContent table.orderTotals td {padding: 5px;}
#popupCartContent table.orderTotals td.title {width:80%;text-align: right;}
#popupCartContent table.orderTotals td.text {width: 19%;text-align:left;}

#popupCartContent .buttons {margin: 10px 0;}
#popupCartContent .buttons .btnCheckout {float:right;}
#popupCartContent .buttons .btnCart {float:left;}

#popupCartContent h6 {color: #BEBEBE;border-bottom: 1px solid #CCCCCC;padding-bottom: 10px;}
#popupCartContent .productImage {border: 1px solid #dddddd;}
#popupCartContent .subtotal {color: #464646; font-weight: bold; float: right;margin-right:10px;margin-bottom:10px;}
#popupCartContent .content {border: none}
#btnClosePopCart {background: none;border:0;color:#FFFFFF;cursor:pointer;position:absolute;right:5px;font-weight:bolder;font-size:18px;}

/* Pop dialog*/
.dialog {
  width: 400px;
  padding: 15px;
  text-align:center;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 0 5px 5px #CCCCCC;
  -webkit-box-shadow: 0 0 5px 5px #CCCCCC;
  -moz-box-shadow: 0 0 5px 5px #CCCCCC;
  -ms-box-shadow: 0 0 5px 5px #CCCCCC;
  -o-box-shadow: 0 0 5px 5px #CCCCCC;
}
.dialog .btns a {padding: 0 10px;}

— Remove the following code:

/*auto_completer*/
ul.autocompleter-choices {
  display: block;
  color: #000000;
  background-color:#F3F3F3;
  border-left: 1px solid #8B8A8A;
  border-right: 1px solid #8B8A8A;
  border-top: 1px solid #D9D9D9;
  border-bottom: 1px solid #8B8A8A;  
}

ul.autocompleter-choices li{
  color: #616060;
}

ul.autocompleter-choices li.autocompleter-selected {
  background-color: #EAEAEA;
  color: #616060;
}

ul.autocompleter-choices li {
  white-space: normal;
  line-height: 22px;
  padding-left: 15px;
}

ul.autocompleter-choices span.autocompleter-queried, ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried {
  color: #616060;
}

Step 3. Go to templates/glass_gray/content/account/account_history_info.php

— Find the following code:

echo osc_link_object(osc_href_link(FILENAME_DOWNLOAD, 'id=' . $product['orders_products_download_id'] . '&order=' . $_GET['orders']), ' <b>(' . $osC_Language->get('download_file') . ')</b>');

— Replace it with:

echo osc_link_object(osc_href_link(FILENAME_DOWNLOAD, 'id=' . $product['orders_products_download_id'] . '&order=' . $_GET['orders']), $osC_Language->get('download_file'), 'data-max="' . $product['number_of_downloads'] * $product['qty'] . '" data-downloads="0" class="downloadable button"');

— Add the following code at the bottom of the file:

<script type="text/javascript">
  window.addEvent('domready', function() {
    if ($$('.downloadable').length > 0) {
      $$('.downloadable').each(function(item) {
        var downlodableMax = item.getProperty('data-max').toInt(),
            downloadedCounts,
            dlgWaring;

        item.addEvent('click', function(e) {
          downloadedCounts = item.getProperty('data-downloads').toInt();

          //check whether it is allowed to be downloaded
          if (downloadedCounts < downlodableMax) {
            item.setProperty('data-downloads', downloadedCounts + 1);

            return true;
          }else {
            dlgWaring = new popDialog('<?php echo '<p><strong>' . $osC_Language->get('error_download_max_num_of_times') . '</strong></p>';?>');
            dlgWaring.show();

            return false;
          }
        });
      });
    }
  });
</script>

Step 4. Go to templates/glass_gray/content/info/info_sitemap.php

– Find the following code:

<li><?php echo osc_link_object(osc_href_link(FILENAME_INFO), $osC_Language->get('box_information_heading')); ?>
          <ul>
            <?php
                while($Qarticles_listing->next()) {
            ?>
            <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $Qarticles_listing->valueInt('articles_id')), $Qarticles_listing->value('articles_name')); ?></li>
            <?php
                }
            ?>
          </ul>
        </li>

– Replace it with:

<li><?php echo osc_link_object(osc_href_link(FILENAME_INFO), $osC_Language->get('box_information_heading')); ?>
          <ul>
            <?php
                while($Qinformation_listing->next()) {
            ?>
            <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $Qinformation_listing->valueInt('articles_id')), $Qinformation_listing->value('articles_name')); ?></li>
            <?php
                }
            ?>
          </ul>
        </li>
        <?php if ($articles_categories !== null): ?>
          <?php foreach ($articles_categories as $article_category): ?>
            <li>
              <?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles_categories&articles_categories_id=' . $article_category['articles_categories_id']), $article_category['articles_categories_name']); ?>
              <?php if (count($article_category['articles']) > 0): ?>
              <ul>
                <?php foreach ($article_category['articles'] as $article): ?>
                <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $article['articles_id']), $article['articles_name']); ?></li>
                <?php endforeach; ?>
              </ul>
              <?php endif; ?>
            </li>
          <?php endforeach; ?>
        <?php endif; ?>

Step5. Go to templates/glass_gray/content/products/new.php

– Find the following code:

<td valign="top"><?php echo osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qproducts->value('products_id')), '<b><u>' . $Qproducts->value('products_name') . '</u></b>') . '<br />' . $osC_Language->get('date_added') . ' ' . osC_DateTime::getLong($Qproducts->value('products_date_added')) . '<br />' . $osC_Language->get('manufacturer') . ' ' . $Qproducts->value('manufacturers_name') . '<br /><br />' . $osC_Language->get('price') . ' ' . $products_price; ?></td>

– Add the following code before it:

<?php 
          if ($Qproducts->value('products_type') == PRODUCT_TYPE_SIMPLE) {
        ?>
        <td>
          <input type="text" id="qty_<?php echo $Qproducts->valueInt('products_id'); ?>" value="1" size="1" class="qtyField" />
        </td>
        <?php
          }else {
        ?>
        <td></td>
        <?php 
          }
        ?>

Step6. Go to templates/glass_gray/content/products/new.php

– Find the following code:

echo '<div style="margin-top: 10px; float:left; width: 33%; text-align: center">' .
                   '<span style="display:block; height: 32px; text-align: center">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id')), $Qspecials->value('products_name')) . '</span>' . 
                   osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id')), $osC_Image->show($Qspecials->value('image'), $Qspecials->value('products_name')), 'id="img_ac_specials_'. $Qspecials->value('products_id') . '"') . 
                   '<span style="display:block; padding: 3px; text-align: center"><s>' . $osC_Currencies->displayPrice($Qspecials->value('products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($Qspecials->value('specials_new_products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</span>' .
                   osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id') . '&action=cart_add'), osc_draw_image_button('button_add_to_cart.png', $osC_Language->get('button_add_to_cart'), 'class="ajaxAddToCart" id="ac_specials_' . $Qspecials->value('products_id') . '"')) .
                 '</div>';

– Replace it with:

echo '<div style="margin-top: 10px; float:left; width: 33%; text-align: center">' .
                   '<span style="display:block; height: 32px; text-align: center">' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id')), $Qspecials->value('products_name')) . '</span>' . 
                   osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id')), $osC_Image->show($Qspecials->value('image'), $Qspecials->value('products_name')), 'id="img_ac_specials_'. $Qspecials->value('products_id') . '"') . 
                   '<span style="display:block; padding: 3px; text-align: center"><s>' . $osC_Currencies->displayPrice($Qspecials->value('products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($Qspecials->value('specials_new_products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</span>';

                   if ($Qspecials->value('products_type') == PRODUCT_TYPE_SIMPLE) {
                    echo '<div class="qtyBlock"><input type="text" id="qty_' . $Qspecials->valueInt('products_id') . '" value="1" size="1" class="qtyField" /></div>';
                   }

                   echo osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_id') . '&action=cart_add'), osc_draw_image_button('button_add_to_cart.png', $osC_Language->get('button_add_to_cart'), 'class="ajaxAddToCart" id="ac_specials_' . $Qspecials->value('products_id') . '"'));
            echo '</div>';

Step7. Override the templates/glass_gray/modules/jsons/auto_completer.php

– Unzip the downloaded 1.1.8.6 package and copy the templates/glass_gray/modules/jsons/auto_completer.php into the same directory on your web server. Please just override it.

Step8. Override the templates/glass_gray/modules/jsons/popup_cart.php

– Unzip the downloaded 1.1.8.6 package and copy the templates/glass_gray/modules/jsons/popup_cart.php into the same directory on your web server. Please just override it.

Step9. Copy the minified all.min.css and all.min.js

– Unzip the downloaded 1.1.8.6 package and copy the templates/glass_gray/all.min.css  into the same directory on your web server.

– Copy the  templates/glass_gray/javascript/all.min.js into the same directory on your web server.

Done. That’s it for the glass gray template.

For Stores Using  BootStrap Template:

Step1. Go to templates/bootstrap/index.php

– Find the following code:

<link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/stylesheet.css" />
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/stylesheet.responsive.css" />

– Replace it with:

<?php if ($osC_Services->isStarted('debug') && defined('SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT') && SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT == 1) { ?>
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/stylesheet.css" />
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/stylesheet.responsive.css" />
    <link rel="stylesheet" type="text/css" href="ext/autocompleter/Autocompleter.css" />
    <?php } else { ?>
    <link rel="stylesheet" type="text/css" href="templates/<?php echo $osC_Template->getCode(); ?>/css/all.min.css" />
    <?php } ?>

— Find the following code:

<script type="text/javascript" src="ext/autocompleter/Autocompleter.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.Request.js"></script>
<script type="text/javascript" src="ext/autocompleter/Observer.js"></script>
<script type="text/javascript" src="includes/javascript/auto_completer.js"></script>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/popup_cart.js"></script>
<script type="text/javascript" src="includes/javascript/bookmark.js"></script>
<script type="text/javascript" src="ext/menumatic/MenuMatic_0.68.3.js"></script>

— Replace it with:

<?php if ($osC_Services->isStarted('debug') && defined('SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT') && SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT == 1) { ?>
<script type="text/javascript" src="includes/javascript/pop_dialog.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.js"></script>
<script type="text/javascript" src="ext/autocompleter/Autocompleter.Request.js"></script>
<script type="text/javascript" src="ext/autocompleter/Observer.js"></script>
<script type="text/javascript" src="includes/javascript/auto_completer.js"></script>
<script type="text/javascript" src="includes/javascript/popup_cart.js"></script>
<script type="text/javascript" src="includes/javascript/bookmark.js"></script>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/bootstrap.min.js"></script>
<?php }else { ?>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/all.min.js"></script>
<?php }?>

<script type="text/javascript">
  jQuery.noConflict();
</script>

— Find the following code:

<script type="text/javascript">
window.addEvent('domready', function() {
    new PopupCart({
      template: '<?php echo $osC_Template->getCode(); ?>',
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>'
    });
    new TocAutoCompleter('keywords', {
        sessionName: '<?php echo $osC_Session->getName(); ?>',
        sessionId: '<?php echo $osC_Session->getID(); ?>',
        template: '<?php echo $osC_Template->getCode(); ?>',
        width: 320
    });
    new TocBookmark({
        bookmark: 'bookmark',
        text: '<?php echo $osC_Language->get('bookmark'); ?>',
        img: '<?php echo 'images/bookmark.png'; ?>'
    });
});
</script>

<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
  jQuery.noConflict();
</script>
<script type="text/javascript" src="templates/<?php echo $osC_Template->getCode(); ?>/javascript/bootstrap.min.js"></script>

— Replace it with:

<script type="text/javascript">
window.addEvent('domready', function() {
    new PopupCart({
      template: '<?php echo $osC_Template->getCode(); ?>',
      enableDelete: '<?php 
          $box_modules = $osC_Template->osC_Modules_Boxes->_modules;

          $flag = 'yes';
          foreach($box_modules as $box_group => $modules) {
            foreach ($modules as $module_code) {
              if ($module_code == 'shopping_cart') {
                $flag = 'no';

                break 2;
              }
            }
          }

          echo $flag;
        ?>',
      sessionName: '<?php echo $osC_Session->getName(); ?>',
      sessionId: '<?php echo $osC_Session->getID(); ?>'
    });
    new TocAutoCompleter('keywords', {
        sessionName: '<?php echo $osC_Session->getName(); ?>',
        sessionId: '<?php echo $osC_Session->getID(); ?>',
        template: '<?php echo $osC_Template->getCode(); ?>',
        maxChoices: <?php echo defined('MAX_DISPLAY_AUTO_COMPLETER_RESULTS') ? MAX_DISPLAY_AUTO_COMPLETER_RESULTS : 10;?>,
        width: <?php echo defined('WIDTH_AUTO_COMPLETER') ? WIDTH_AUTO_COMPLETER : 400; ?>,
        moreBtnText: '<?php echo $osC_Language->get('button_get_more'); ?>',
        imageGroup: '<?php echo defined('IMAGE_GROUP_AUTO_COMPLETER') ? IMAGE_GROUP_AUTO_COMPLETER : 'mini'; ?>'
    });
    new TocBookmark({
        bookmark: 'bookmark',
        text: '<?php echo $osC_Language->get('bookmark'); ?>',
        img: '<?php echo 'images/bookmark.png'; ?>'
    });
});
</script>

Step2. Go to templates/bootstrap/helper.php

– Remove the following code:

$js_files .= '<script type="text/javascript" src="templates/' . $osC_Template->getCode() . '/javascript/ajax_shopping_cart.js"></script>' . "\n";

– Add the following code at the end of the file:

/**
 * Show the product images for the product listing page
 *
 * @access public
 *
 * @return string
 */
function show_products_listing_image($image, $title, $parameters = '', $group = '', $type = 'products') {
  global $osC_Image;

  if (empty($group) || !$osC_Image->exists($group)) {
    $group = $osC_Image->getCode(DEFAULT_IMAGE_GROUP_ID);
  }

  $group_id = $osC_Image->getID($group);

  $width = $height = '';

  if ( ($osC_Image->_groups[$group_id]['force_size'] == '1') || empty($image) ) {
    $width = $osC_Image->_groups[$group_id]['size_width'];
    $height = $osC_Image->_groups[$group_id]['size_height'];
  }

  if (empty($image)) {
    $image = 'no_image.png';
  } else {
    $image = $type . '/' . $osC_Image->_groups[$group_id]['code'] . '/' . $image;
  }

  return osc_image(DIR_WS_IMAGES . $image, $title, $width, $height, $parameters);
}

Step3. Go to templates/bootstrap/modules/boxes/shopping_cart.php

– Find the following code:

<div class="boxNew">

– Replace it with:

<div class="boxNew boxAjaxShoppingCart">

Step4. Go to templates/bootstrap/modules/product_listing.php

– Find the following code:

$sort_array = get_products_listing_sort();

– Add the following code before it:

//flag to check whether the variants options is enabled
$variants_enabled = (defined('PRODUCT_LIST_VARIANTS_OPTIONS') && PRODUCT_LIST_VARIANTS_OPTIONS == 1) ? true : false;

if ($variants_enabled) {
  //load the language for the variants products
  $osC_Language->load('products');

  //collect the product objects
  $collections = array();
}

— Find the following code:

//product type
$type = $Qlisting->value('products_type');

— Add the following code before it:

//variants options is enabled
  if ($variants_enabled) {
    $collections[] = $osC_Product;
  }

— Find the following code:

$image = $osC_Image->show($Qlisting->value('image'), $Qlisting->value('products_name'), 'class="thumb productImage"');

— Replace it with:

$image = show_products_listing_image($Qlisting->value('image'), $Qlisting->value('products_name'), 'class="thumb productImage"');

— Find the following code:

<div class="right">
    <span class="price">
        <?php echo $osC_Product->getPriceFormated(true); ?></span>
    <span class="buttons hidden-phone">
      <?php 
          if ($Qlisting->value('products_type') == PRODUCT_TYPE_SIMPLE) {
      ?>
        <a id="ac_productlisting_<?php echo $Qlisting->value('products_id'); ?>" class="btn btn-small btn-info ajaxAddToCart" href="<?php echo $buy_now_link; ?>">
      <?php 
          } else {
      ?>
        <a class="btn btn-small btn-info" href="<?php echo $buy_now_link; ?>">
      <?php 
          }
      ?>
          <i class="icon-shopping-cart icon-white "></i> 
          <?php echo $osC_Language->get('button_buy_now'); ?>
        </a><br />
        <?php echo osc_link_object($compare_link, $osC_Language->get('add_to_compare')); ?><br />
        <?php echo osc_link_object($wishlist_link, $osC_Language->get('add_to_wishlist')); ?>
    </span>
</div>

— Replace it with:

<div class="right">
    <span class="price">
        <?php echo $osC_Product->getPriceFormated(true); ?></span>
    <span class="buttons hidden-phone">
      <?php 
          if ($Qlisting->value('products_type') == PRODUCT_TYPE_SIMPLE) {
                        //enable quantity input field
                        if (defined('PRODUCT_LIST_QUANTITY_INPUT') && PRODUCT_LIST_QUANTITY_INPUT == 1) {
      ?>
              <input type="text" id="qty_<?php echo $Qlisting->value('products_id'); ?>" value="1" size="1" class="qtyField" />
      <?php 
            }
      ?> 
        <a id="ac_productlisting_<?php echo $Qlisting->value('products_id'); ?>" class="btn btn-small btn-info ajaxAddToCart" href="<?php echo $buy_now_link; ?>">
      <?php 
          } else {
      ?>
        <a class="btn btn-small btn-info" href="<?php echo $buy_now_link; ?>">
      <?php 
          }
      ?>
          <i class="icon-shopping-cart icon-white "></i> 
          <?php echo $osC_Language->get('button_buy_now'); ?>
        </a><br />
        <?php echo osc_link_object($compare_link, $osC_Language->get('add_to_compare')); ?><br />
        <?php echo osc_link_object($wishlist_link, $osC_Language->get('add_to_wishlist')); ?>
    </span>
</div>

<?php 
    //variants options is enabled
if ($variants_enabled && $view_type=='list') {
  if ($osC_Product->hasVariants()) {
  $combobox_array = $osC_Product->getVariantsComboboxArray();
?>
  <ul class="options variants_<?php echo $osC_Product->getID(); ?> clearfix">
<?php 
    foreach ($combobox_array as $groups_name => $combobox) {
?>
      <li class="variant">
  <label><?php echo $groups_name; ?>:</label>
  <?php echo $combobox; ?>
  </li>
<?php
  }
?>           
</ul>
<?php      
  }
}
?>

— Add the following code at the end of the file

<?php if ($variants_enabled) 
{ 
?>

  <script type="text/javascript" src="includes/javascript/list_variants.js"></script>

  <?php 
  if (count($collections) > 0) {
    foreach ($collections as $product) {
      if ($product->hasVariants()) {
  ?>
        <script type="text/javascript">
          new TocListVariants({
            remoteUrl: '<?php echo osc_href_link('json.php', null, 'SSL', false, false, true); ?>',
            combVariants: $$('.variants_<?php echo $product->getID(); ?> select'),
            variants: <?php echo $toC_Json->encode($product->getVariants()); ?>,
            productsId: <?php echo $product->getID(); ?>,
            hasSpecial: <?php echo $product->hasSpecial() ? 1 : 0; ?>,
            lang: {
              txtInStock: '<?php echo addslashes($osC_Language->get('in_stock'));?>',
              txtOutOfStock: '<?php echo addslashes($osC_Language->get('out_of_stock')); ?>',
              txtNotAvailable: '<?php echo addslashes($osC_Language->get('not_available')); ?>'
            }
          });
        </script>
  <?php
      } 
    }
  }
}
?>

Step5. Remove templates/bootstrap/javascript/popup_cart.js

Step6. Go to templates/bootstrap/javascript/variants.js

– Find the following code snippet:

options: {
    hasSpecial: 0,
    remoteUrl: 'json.php',
    linkCompareProductsCls: '.compare-products',
    linkWishlistCls: '.wishlist',
    lang: {
      txtInStock: 'In Stock',
      txtOutOfStock: 'Out Of Stock',
      txtNotAvailable: 'Not Available',
      txtTaxText: 'incl. tax'
    }
},

– Replace it with:

options: {
    hasSpecial: 0,
    remoteUrl: 'json.php',
    variants: null,
    linkCompareProductsCls: '.compare-products',
    linkWishlistCls: '.wishlist',
    btnAddCls: '.ajaxAddToCart',
    lang: {
      txtInStock: 'In Stock',
      txtOutOfStock: 'Out Of Stock',
      txtNotAvailable: 'Not Available',
      txtTaxText: 'incl. tax'
    }
},

– Find the following code snippet:

initialize: function(options) {
    this.setOptions(options);
    this.checkCompareProducts();
    this.checkWishlist();
    this.initializeComboBox();
    this.updateView();
  },

– Replace it with:

initialize: function(options) {
    this.setOptions(options);

    if (this.options.combVariants !== null && this.options.combVariants.length > 0) {
      this.checkCompareProducts();
      this.checkWishlist();
      this.initializeComboBox();
    }
  },

– Find following code snippet:

updateView: function(choice) {
    var productsIdString = this.getProductsIdString();

    //if it is in the product info page and the product have any variants, add the variants into the compare products link
    if (this.linkCp) {
      var href = this.linkCpHref + '&cid=' + productsIdString.replace(/#/, '_');

      this.linkCp.setProperty('href', href);
    }

    //handler the wishlist
    if (this.linkWp) {
      var href = this.linkWpHref + '&wid=' + productsIdString.replace(/#/, '_');

      this.linkWp.setProperty('href', href);
    }

    var product = this.options.variants[productsIdString];

    if (product == undefined || (product['status'] == 0)) {
      $('productInfoAvailable').innerHTML = '<font color="red">' + this.options.lang.txtNotAvailable + '</font>';
    } else {
      if (this.options.hasSpecial == 0) {
        // get the formatted price of the variants product by ajax requst
        this.sendRequest({action: 'get_variants_formatted_price', products_id_string: productsIdString}, function(response) {
          var result = JSON.decode(response);

          if (result.success == true) {
            $('productInfoPrice').set('html', result.formatted_price);
          }else {
            alert(result.feedback);
          }
        }.bind(this));
      }

      $('productInfoSku').set('text', product['sku']);
      if (this.options.displayQty == true) {
        $('productInfoQty').set('text', product['quantity'] + ' ' + this.options.unitClass);
      }

      if (product['quantity'] > 0) {
        $('productInfoAvailable').set('text', this.options.lang.txtInStock);
      }else {
        $('productInfoAvailable').set('text', this.options.lang.txtOutOfStock);
      }

      $('shoppingCart').fade('in');
      $('shoppingAction').fade('in');

      this.changeImage(product['image']);
    }
  },

– Replace it with:

updateView: function() {
    var productsIdString = this.getProductsIdString(),
        btnAddToCart = $$(this.options.btnAddCls);

    //if it is in the product info page and the product have any variants, add the variants into the compare products link
    if (this.linkCp) {
      var href = this.linkCpHref + '&cid=' + productsIdString.replace(/#/, '_');

      this.linkCp.setProperty('href', href);
    }

    //handler the wishlist
    if (this.linkWp) {
      var href = this.linkWpHref + '&wid=' + productsIdString.replace(/#/, '_');

      this.linkWp.setProperty('href', href);
    }

    var product = this.options.variants[productsIdString];

    if (product == undefined || (product['status'] == 0)) {
      $('productInfoAvailable').innerHTML = '<font color="red">' + this.options.lang.txtNotAvailable + '</font>';

      if (btnAddToCart.length > 0) {
        btnAddToCart[0].addClass('disabled');
      }

    } else {
      btnAddToCart[0].removeClass('disabled');

      if (this.options.hasSpecial == 0) {
        // get the formatted price of the variants product by ajax requst
        this.sendRequest({action: 'get_variants_formatted_price', products_id_string: productsIdString}, function(response) {
          var result = JSON.decode(response);

          if (result.success == true) {
            $('productInfoPrice').set('html', result.formatted_price);
          }else {
            alert(result.feedback);
          }
        }.bind(this));
      }

      $('productInfoSku').set('text', product['sku']);
      if (this.options.displayQty == true) {
        $('productInfoQty').set('text', product['quantity'] + ' ' + this.options.unitClass);
      }

      if (product['quantity'] > 0) {
        $('productInfoAvailable').set('text', this.options.lang.txtInStock);
      }else {
        $('productInfoAvailable').set('text', this.options.lang.txtOutOfStock);
      }

      $('shoppingCart').fade('in');
      $('shoppingAction').fade('in');

      this.changeImage(product['image']);
    }
  },

Step7. Go to templates/bootstrap/javascript/ajax_shopping_cart.js

– Find the following code snippet:

addToCartButton.set('disabled', 'disabled');

– Add following code snippet before it:

if (addToCartButton.hasClass('disabled')) {
    return false;
 }

– Find following code:

duration: 300,

– Replace it with:

duration: 700,

Step8. Go to templates/bootstrap/css/stylesheet.css

– Add the following code at the bottom of the file:

/* Css3 Animation */
.animated {
  -webkit-animation-duration: 0.5s;
     -moz-animation-duration: 0.5s;
       -o-animation-duration: 0.5s;
          animation-duration: 0.5s;
  -webkit-animation-fill-mode: both;
     -moz-animation-fill-mode: both;
       -o-animation-fill-mode: both;
          animation-fill-mode: both;
}

@-webkit-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@-moz-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@-o-keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

@keyframes flash {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

.animated.flash {
  -webkit-animation-name: flash;
  -moz-animation-name: flash;
  -o-animation-name: flash;
  animation-name: flash;
}

@-webkit-keyframes slideOutUp {
  0% {
    -webkit-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-2000px);
  }
}

@-moz-keyframes slideOutUp {
  0% {
    -moz-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -moz-transform: translateY(-2000px);
  }
}

@-o-keyframes slideOutUp {
  0% {
    -o-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -o-transform: translateY(-2000px);
  }
}

@keyframes slideOutUp {
  0% {
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-2000px);
  }
}

.slideOutUp {
  -webkit-animation-name: slideOutUp;
  -moz-animation-name: slideOutUp;
  -o-animation-name: slideOutUp;
  animation-name: slideOutUp;
}

@-webkit-keyframes bounceInDown {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -webkit-transform: translateY(30px);
  }

  80% {
    -webkit-transform: translateY(-10px);
  }

  100% {
    -webkit-transform: translateY(0);
  }
}

@-moz-keyframes bounceInDown {
  0% {
    opacity: 0;
    -moz-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -moz-transform: translateY(30px);
  }

  80% {
    -moz-transform: translateY(-10px);
  }

  100% {
    -moz-transform: translateY(0);
  }
}

@-o-keyframes bounceInDown {
  0% {
    opacity: 0;
    -o-transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    -o-transform: translateY(30px);
  }

  80% {
    -o-transform: translateY(-10px);
  }

  100% {
    -o-transform: translateY(0);
  }
}

@keyframes bounceInDown {
  0% {
    opacity: 0;
    transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    transform: translateY(30px);
  }

  80% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.animated.bounceInDown {
  -webkit-animation-name: bounceInDown;
  -moz-animation-name: bounceInDown;
  -o-animation-name: bounceInDown;
  animation-name: bounceInDown;
}

– Find the following code snippet:

/* Auto Complete */ 
ul.autocompleter-choices{position: absolute;margin: 0;padding: 0;list-style: none;border: 1px solid #CCCCCC;background-color: #FFFFFF;text-align: left;z-index: 50;border-radius: 3px 3px 3px 3px;box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);}
ul.autocompleter-choices li{position: relative;margin: -2px 0 0 0;padding: 0.2em 1.5em 0.2em 1em;display: block;float: none !important;cursor: pointer;font-weight: normal;white-space: nowrap;font-size: 13px;line-height: 28px;color: #000000;}
ul.autocompleter-choices li.autocompleter-selected{background-color: #444; color: #ffffff}
ul.autocompleter-choices span.autocompleter-queried{display: inline;float: none;font-weight: bold;margin: 0;padding: 0;color: #6D7B94;}
ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried{color: #6D7B94;}

– Replace it with:

/* Auto Complete */ 
ul.autocompleter-choices div.details {margin-top:10px;}

– Find the following code snippet:

/* popupCartContent */ 
#popupCartContent {background-clip: padding-box;background-color: #FFFFFF;box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);float: left;left: 0;list-style: none outside none;margin: 2px 0 0;min-width: 160px;padding: 0 0;position: absolute;top: 100%;z-index: 1000;width: 318px;}
#popupCartContent .content {padding: 5px 10px;}
#popupCartContent .content table tr {border-bottom: 1px dashed #CDCDCD;}
#popupCartContent .subtotal {float: right;margin: 8px 0;font-weight: bold;}
#popupCartItems {display: inline-block; margin-right:5px;}
.cart a {text-decoration: none;}

– Replace it with:

/* popupCartContent */ 
#popupCartContent .subtotal {float: right;margin: 8px 0;font-weight: bold;}
#popupCartItems {display: inline-block; margin-right:5px;}
.cart a {text-decoration: none;}

#popupCartContent {width: 312px; z-index: 1000; background:none; padding-top:20px; margin: 0;}
#popupCartContent .cartInner {
  padding: 10px;
  border-radius: 4px;
  -webkit-box-shadow: 0 0 3px 3px #CCCCCC;
  -moz-box-shadow: 0 0 3px 3px #CCCCCC;
  box-shadow: 0 0 3px 3px #CCCCCC;
  background: #FFFFFF;
}
#popupCartContent table {width:100%;border-collapse: collapse; border-spacing: 0;}
#popupCartContent table.products td {
   border-bottom: 1px solid #CCCCCC;
   padding: 8px 5px;
   vertical-align: center;
}

#popupCartContent table.orderTotals td {padding: 5px;}
#popupCartContent table.orderTotals td.title {width:80%;text-align: right;}
#popupCartContent table.orderTotals td.text {width: 19%;text-align:left;}

#popupCartContent .buttons {margin: 10px 0;}
#popupCartContent .buttons .btnCheckout {float:right;}
#popupCartContent .buttons .btnCart {float:left;}

#popupCartContent h6 {border-bottom: 1px solid #CCCCCC;padding-bottom: 10px;}

/* Pop dialog*/
.dialog {
  width: 400px;
  padding: 15px;
  text-align:center;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 0 5px 5px #CCCCCC;
  -webkit-box-shadow: 0 0 5px 5px #CCCCCC;
  -moz-box-shadow: 0 0 5px 5px #CCCCCC;
  -ms-box-shadow: 0 0 5px 5px #CCCCCC;
  -o-box-shadow: 0 0 5px 5px #CCCCCC;
  z-index:9999;
}
.dialog .btns a {padding: 0 10px;}
.dialog .btns .btn {margin: 0 10px;}

– Find following code snippet:

.smOW{display:none; position: absolute; min-width: 180px;overflow:hidden;}

– Replace it with:

.smOW{display:none; position: absolute; min-width: 180px;}

– Find following code snippet:

.boxNew .boxContents ul li a {
    display: inline-block;
}

– Replace it with:

.boxNew .boxContents ul li a {
    display: inline-block;
    font-size:12px;
}

– Find following code snippet:

/** box-review**/
.boxReview {word-break:break-all;}
.boxReview a {display:block;}

– Add following code snippet after it:

/** ajax-shoppingCart **/
.boxAjaxShoppingCart > .boxContents {padding:8px;}

– Find following code snippet:

ul.grid li { 
    position: relative; 
    display: block; 
    float: left; 
    width: 33.333333%; 
    *width: 27.43%;
    border-right: 1px solid #CDCDCD; 
    border-bottom: 1px solid #CDCDCD; 
    padding: 10px 20px; 
    box-sizing: border-box; 
    -moz-box-sizing: border-box; 
    -webkit-box-sizing: border-box; 
}

– Replace it with:

ul.grid li { 
    position: relative; 
    display: block; 
    float: left; 
    width: 33.333333%; 
    *width: 27.43%;
    border-right: 1px solid #CDCDCD; 
    border-bottom: 1px solid #CDCDCD; 
    padding: 10px 15px; 
    box-sizing: border-box; 
    -moz-box-sizing: border-box; 
    -webkit-box-sizing: border-box; 
}

– Add the following code snippet at the bottom of the file:

/** Variants and Quantity filed **/
input.qtyField {margin-bottom:0;text-align:center;width:25px;margin-right:3px;padding:2px 2px;}
ul.options {clear:both;}
ul.options .warning{color:red;}
ul.options .alert{padding:4px 6px;}
ul.options li {border:0;float:left;padding: 5px;vertical-align:center;}
ul.options li label {display:inline-block;padding: 4px 6px;}
ul.options li select {width:auto;margin-bottom:0}

– Remove following code:

#product-info input {width: 30px;}

Step9. Go to templates/bootstrap/content/account/account_history.php

– Find following code snippet:

<div class="content">
  <table border="0" width="100%" cellspacing="2" cellpadding="4">
      <tr>
          <td valign="top"><?php echo '<b>' . $osC_Language->get('order_date') . '</b> ' . osC_DateTime::getLong($Qhistory->value('date_purchased')) . '<br /><b>' . $order_type . '</b> ' . osc_output_string_protected($order_name); ?></td>
          <td width="150" valign="top"><?php echo '<b>' . $osC_Language->get('order_products') . '</b> ' . osC_Order::numberOfProducts($Qhistory->valueInt('orders_id')) . '<br /><b>' . $osC_Language->get('order_cost') . '</b> ' . strip_tags($Qhistory->value('order_total')); ?></td>
          <td width="100" align="center" class="btn-toolbar">
          <a href="<?php echo osc_href_link(FILENAME_ACCOUNT, 'orders=' . $Qhistory->valueInt('orders_id') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'SSL'); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_view'); ?></a>
            <a href="<?php echo osc_href_link(FILENAME_PDF, 'module=account&pdf=print_order&orders_id=' . $Qhistory->valueInt('orders_id')); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_print'); ?></a>
              <?php 
                  if (($Qhistory->valueInt('returns_flag') == 1) && (ALLOW_RETURN_REQUEST == 1)) { 
                      $order = new osC_Order($Qhistory->valueInt('orders_id'));

                      if ($order->hasNotReturnedProduct()) {
              ?>
            <div style = "padding: 2px;">
            <a href="<?php echo osc_href_link(FILENAME_ACCOUNT, 'orders=new_return_request&orders_id=' . $Qhistory->valueInt('orders_id'), 'SSL'); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_return'); ?></a>
            </div>
              <?php 
                      }
                  } 
              ?>    
          </td>
      </tr>
  </table>
</div>

– Replace it with:

<div class="content">
        <table border="0" width="100%" cellspacing="2" cellpadding="4">
            <tr>
                <td valign="top"><?php echo '<b>' . $osC_Language->get('order_date') . '</b> ' . osC_DateTime::getLong($Qhistory->value('date_purchased')) . '<br /><b>' . $order_type . '</b> ' . osc_output_string_protected($order_name); ?></td>
                <td width="150" valign="top"><?php echo '<b>' . $osC_Language->get('order_products') . '</b> ' . osC_Order::numberOfProducts($Qhistory->valueInt('orders_id')) . '<br /><b>' . $osC_Language->get('order_cost') . '</b> ' . strip_tags($Qhistory->value('order_total')); ?></td>
                <td width="150" align="center" class="btn-toolbar">
          <a href="<?php echo osc_href_link(FILENAME_ACCOUNT, 'orders=' . $Qhistory->valueInt('orders_id') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'SSL'); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_view'); ?></a>
                  <a href="<?php echo osc_href_link(FILENAME_PDF, 'module=account&pdf=print_order&orders_id=' . $Qhistory->valueInt('orders_id')); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_print'); ?></a>
                    <?php 
                        if (($Qhistory->valueInt('returns_flag') == 1) && (ALLOW_RETURN_REQUEST == 1)) { 
                            $order = new osC_Order($Qhistory->valueInt('orders_id'));

                            if ($order->hasNotReturnedProduct()) {
                    ?>
            <a href="<?php echo osc_href_link(FILENAME_ACCOUNT, 'orders=new_return_request&orders_id=' . $Qhistory->valueInt('orders_id'), 'SSL'); ?>" class="btn btn-mini" id="btnSaveShippingMethod"><?php echo $osC_Language->get('button_return'); ?></a>
                    <?php 
                            }
                        } 
                    ?>    
                </td>
            </tr>
        </table>
    </div>

Step10. Go to templates/bootstrap/content/info/info_sitemap.php

– Find following code:

<div class="content">

– Replace it with:

<div class="content btop">

– Find following code snippet:

<li><?php echo osc_link_object(osc_href_link(FILENAME_INFO), $osC_Language->get('box_information_heading')); ?>
  <ul>
  <?php
      while($Qarticles_listing->next()) {
  ?>
  <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $Qarticles_listing->valueInt('articles_id')), $Qarticles_listing->value('articles_name')); ?></li>
  <?php
      }
  ?>
  </ul>
  </li>
  <li>
  <?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'faqs'), $osC_Language->get('info_faqs_heading'));?>
  <ul>
  <?php
      while($Qfaqs_listing->next()) {
  ?>
  <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'faqs&faqs_id=' . $Qfaqs_listing->valueInt('faqs_id')), $Qfaqs_listing->value('faqs_question')); ?></li>
  <?php
      }
  ?>
  </ul>
</li>

– Replace it with:

<li><?php echo osc_link_object(osc_href_link(FILENAME_INFO), $osC_Language->get('box_information_heading')); ?>
  <ul>
    <?php
        while($Qinformation_listing->next()) {
    ?>
    <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $Qinformation_listing->valueInt('articles_id')), $Qinformation_listing->value('articles_name')); ?></li>
    <?php
        }
    ?>
  </ul>
</li>
  <?php if ($articles_categories !== null): ?>
    <?php foreach ($articles_categories as $article_category): ?>
    <li>
      <?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles_categories&articles_categories_id=' . $article_category['articles_categories_id']), $article_category['articles_categories_name']); ?>
      <?php if (count($article_category['articles']) > 0): ?>
      <ul>
        <?php foreach ($article_category['articles'] as $article): ?>
        <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'articles&articles_id=' . $article['articles_id']), $article['articles_name']); ?></li>
        <?php endforeach; ?>
      </ul>
      <?php endif; ?>
    </li>
        <?php endforeach; ?>
<?php endif; ?>
<li>
  <?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'faqs'), $osC_Language->get('info_faqs_heading'));?>
  <ul>
    <?php
        while($Qfaqs_listing->next()) {
    ?>
    <li><?php echo osc_link_object(osc_href_link(FILENAME_INFO, 'faqs&faqs_id=' . $Qfaqs_listing->valueInt('faqs_id')), $Qfaqs_listing->value('faqs_question')); ?></li>
    <?php
        }
    ?>
  </ul>
</li>

Step11. Override the templates/bootstrap/modules/jsons/auto_completer.php

– Unzip the downloaded 1.1.8.6 package and copy the templates/bootstrap/modules/jsons/auto_completer.php into the same directory on your web server. Please just override it.

Step12. Override the templates/bootstrap/modules/jsons/popup_cart.php

– Unzip the downloaded 1.1.8.6 package and copy the templates/bootstrap/modules/jsons/popup_cart.php into the same directory on your web server. Please just override it.

Step13. Copy the minified all.min.css and all.min.js

– Unzip the downloaded 1.1.8.6 package and copy the templates/bootstrap/css/all.min.css  into the same directory on your web server.

– Copy the  templates/bootstrap/javascript/all.min.js into the same directory on your web server.

Done. That’s it for the bootstrap template.

If you modified both the core code and template, please upgrade your system through following steps.

Step1. Read the guide to upgrade your template

Step2. Override the ext/autocompleter/Autocompleter.css

– Unzip the downloaded 1.1.8.6 package and copy the ext/autocompleter/Autocompleter.css  into the same directory on your web server.

Step3. Override the ext/mootools/mootools_more.js

– Unzip the downloaded 1.1.8.6 package and copy the ext/mootools/mootools_more.js  into the same directory on your web server.

Step4. Go to includes/classes/articles.php

– Find the following code:

function getArticleCategoriesEntry($categories_id) {
  global $osC_Database, $osC_Language;

  $Qcategories = $osC_Database->query('select articles_categories_name, articles_categories_page_title, articles_categories_meta_keywords, articles_categories_meta_description from :table_articles_categories_description where articles_categories_id = :articles_categories_id and language_id = :language_id');
  $Qcategories->bindTable(':table_articles_categories_description', TABLE_ARTICLES_CATEGORIES_DESCRIPTION);
  $Qcategories->bindInt(':articles_categories_id', $categories_id);
  $Qcategories->bindInt(':language_id', $osC_Language->getID());
  $Qcategories->execute();

  if($Qcategories->numberOfRows() > 0){
  $data = array('articles_categories_name' => $Qcategories->value('articles_categories_name'),
                'page_title' => $Qcategories->value('articles_categories_page_title'),
                'meta_keywords' => $Qcategories->value('articles_categories_meta_keywords'),
                'meta_description' => $Qcategories->value('articles_categories_meta_description'));
  }

  return $data;
}

– Add the following code snippet after it:

function getCategoriesListing() {
  global $osC_Database, $osC_Language;

  //get the articles categories
  $Qcategories = $osC_Database->query('select ac.articles_categories_id, articles_categories_name from :table_articles_categories ac inner join :table_articles_categories_description acd on ac.articles_categories_id = acd.articles_categories_id where ac.articles_categories_status = 1 and acd.language_id = :language_id and ac.articles_categories_id != 1 order by articles_categories_order');
  $Qcategories->bindTable(':table_articles_categories', TABLE_ARTICLES_CATEGORIES);
  $Qcategories->bindTable(':table_articles_categories_description', TABLE_ARTICLES_CATEGORIES_DESCRIPTION);
  $Qcategories->bindInt(':language_id', $osC_Language->getID());
  $Qcategories->execute();

  //check the number of categories
  if ($Qcategories->numberOfRows() < 1) {
    return null;
  }

  $categories = array();
  while ($Qcategories->next()) {
    //get the articles in currency article category
    $Qarticles = $osC_Database->query('select a.articles_id, articles_name from :table_articles a inner join :table_articles_description ad on a.articles_id = ad.articles_id where a.articles_status = 1 and a.articles_categories_id = :articles_categories_id and ad.language_id = :language_id order by a.articles_order');
    $Qarticles->bindTable(':table_articles', TABLE_ARTICLES);
    $Qarticles->bindTable(':table_articles_description', TABLE_ARTICLES_DESCRIPTION);
    $Qarticles->bindInt(':articles_categories_id', $Qcategories->valueInt('articles_categories_id'));
    $Qarticles->bindInt(':language_id', $osC_Language->getID());
    $Qarticles->execute();

    $articles = array();
    if ($Qarticles->numberOfRows() > 0) {
      while ($Qarticles->next()) {
        $articles[] = array('articles_id' => $Qarticles->valueInt('articles_id'), 'articles_name' => $Qarticles->value('articles_name'));
      }
    }

    $categories[] = array('articles_categories_id' => $Qcategories->valueInt('articles_categories_id'), 'articles_categories_name' => $Qcategories->value('articles_categories_name'), 'articles' => $articles);
  }

  $Qcategories->freeResult();
  $Qarticles->freeResult();

  return $categories;
}

Step5. Go to includes/classes/database.php

– Find the following code snippet:

function setLogging($module, $id = null) {
      $this->logging = true;
      $this->logging_module = $module;
      $this->logging_module_id = $id;
    }

– Replace it with:

function setLogging($module, $id = null) {
  if (defined('ENABLE_ADMINISTRATORS_LOG') && ENABLE_ADMINISTRATORS_LOG == '1') {
    $this->logging = true;
  }

  $this->logging_module = $module;
  $this->logging_module_id = $id;
}

– Find the following code snippet:

function getBatchPageLinks($batch_keyword = 'page', $parameters = '', $with_pull_down_menu = true) {
       if ($with_pull_down_menu === false) {
           $string = '<div class="pagination">';
       }

      $string .= $this->getBatchPreviousPageLink($batch_keyword, $parameters);

      if ( $with_pull_down_menu === true ) {
        $string .= $this->getBatchPagesPullDownMenu($batch_keyword, $parameters);
      }else {        
        $string .= $this->getBatchPagesList($batch_keyword, $parameters);       
      }

      $string .= $this->getBatchNextPageLink($batch_keyword, $parameters);

      if ($with_pull_down_menu === false) {
          $string .= '</div>';
      }

      return $string;
}

– Replace it with:

function getBatchPageLinks($batch_keyword = 'page', $parameters = '', $with_pull_down_menu = true) {
      $string = '';

      if ($with_pull_down_menu === false) {
        $string .= '<div class="pagination">';
      }

      if ( $with_pull_down_menu === true ) {
        $string .= $this->getBatchPreviousPageLink($batch_keyword, $parameters);
        $string .= $this->getBatchPagesPullDownMenu($batch_keyword, $parameters);
        $string .= $this->getBatchNextPageLink($batch_keyword, $parameters);
      }else {
        $string .= $this->getBatchPagesList($batch_keyword, $parameters);       
      }

      if ($with_pull_down_menu === false) {
        $string .= '</div>';
      }

      return $string;
}

– Find following code snippet:

/**
     * Output the pagination with list style
     * 
     * @access public
     * @param $batch_keyword [string] - the default url parameter for pagination
     * @param $parameters [string] - the parameters for each page link
     * @return string
     */
    function getBatchPagesList($batch_keyword = 'page', $parameters = '') {
      global $osC_Language;

      //calculte the total pages
      $total_pages = ceil($this->batch_size / $this->batch_rows);

      //output the pagination when total pages is greater than 1
      if ($total_pages > 1) {
        $string .= '<ul>';

        for ( $i = 1; $i <= $total_pages; $i++ ) {
          if ($i == $_GET[$batch_keyword] || ($i == 1 && empty($_GET[$batch_keyword]))) {
            $string .= '<li><span>' . $i . '</span></li>';
          }else {
            $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $i : $batch_keyword . '='  . $i), $i) . '</li>';
          }

        }

        $string .= '</ul>';
      }else {
        $string = sprintf($osC_Language->get('result_set_current_page'), 1, 1);
      }

      return $string;
    }

– Replace it with:

/**
     * Output the pagination with list style
     * 
     * @access public
     * @param $batch_keyword [string] - the default url parameter for pagination
     * @param $parameters [string] - the parameters for each page link
     * @param $max_links [int] - the maximum pages will be displayed in the list style
     * @return string
     */
    function getBatchPagesList($batch_keyword = 'page', $parameters = '', $display_links = 6) {
      global $osC_Language;

      //calculte the total pages
      $total_pages = ceil($this->batch_size / $this->batch_rows);

      //output the pagination when total pages is greater than 1

      if ($total_pages > 1) {
        $string = '<ul>';

        $string .= '<li>' . $this->getBatchPreviousPageLink($batch_keyword, $parameters) . '</li>';

        if ($total_pages > $display_links) {
          //display the the links <= $display_links -1
          if ($_GET[$batch_keyword] <= $display_links -1) {
            //display the links with numbers
            for ( $i = 1; $i <= $display_links; $i++ ) {
              if ($i == $_GET[$batch_keyword] || ($i == 1 && empty($_GET[$batch_keyword]))) {
                $string .= '<li><span>' . $i . '</span></li>';
              }else {
                $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $i : $batch_keyword . '='  . $i), $i) . '</li>';
              }
            }

            //represent the more pages
            $string .= '<li><span>...</span></li>';

            //display the last page link
            $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $total_pages : $batch_keyword . '='  . $total_pages), $total_pages) . '</li>';
          //display the first page link && extra 5 page links&& the last page link
          }else {
            $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . 1 : $batch_keyword . '='  . 1), 1) . '</li>';

            //represent the more pages
            $string .= '<li><span>...</span></li>';

            //display last five links
            if ($total_pages - $_GET[$batch_keyword] <= 3) {
              for ($i = $total_pages -4 ; $i <= $total_pages; $i++) {

                if ($i == $_GET[$batch_keyword]) {
                  $string .= '<li><span>' . $i . '</span></li>';
                }else {
                  $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $i : $batch_keyword . '='  . $i), $i) . '</li>';
                }
              }
            //display previous two pages, current page, latter two pages
            }else {
              for ($i = $_GET[$batch_keyword] -2; $i < $_GET[$batch_keyword] + 2; $i++) {

                if ($i == $_GET[$batch_keyword]) {
                  $string .= '<li><span>' . $i . '</span></li>';
                }else {
                  $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $i : $batch_keyword . '='  . $i), $i) . '</li>';
                }
              }
            }

            //represent the more pages
            if ($i < $total_pages) {
              $string .= '<li><span>...</span></li>';

              //display the last page link
              $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $total_pages : $batch_keyword . '='  . $total_pages), $total_pages) . '</li>';
            }
          }

        //display total pages with number
        }else {
          for ( $i = 1; $i <= $total_pages; $i++ ) {
            if ($i == $_GET[$batch_keyword] || ($i == 1 && empty($_GET[$batch_keyword]))) {
              $string .= '<li><span>' . $i . '</span></li>';
            }else {
              $string .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $parameters ? $parameters . '&' . $batch_keyword . '='  . $i : $batch_keyword . '='  . $i), $i) . '</li>';
            }
          }
        }

        $string .= '<li>' . $this->getBatchNextPageLink($batch_keyword, $parameters) . '</li>';
        $string .= '</ul>';
      }else {
        $string = sprintf($osC_Language->get('result_set_current_page'), 1, 1);
      }

      return $string;
    }

– Find following code snippet:

if ($number_of_pages > 1) {
  $string .= '<span class="previous">';
}

if ( $this->batch_number > 1 ) {
  $string .= osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $get_parameter . $batch_keyword . '=' . ($this->batch_number - 1)), $back_string) . '</span>';
} else {
  $string .= $back_grey_string;
}

$string .= ' ';

if ($number_of_pages > 1) {
  $string .= '</span>';
}

– Replace it with:

if ( $this->batch_number > 1 ) {
        $string .= osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $get_parameter . $batch_keyword . '=' . ($this->batch_number - 1)), $back_string) . '</span>';
} else {
  $string .= '<span>' . $back_grey_string . '</span>';
}

– Find following code snippet:

if ($number_of_pages > 1) {
  $string .= '<span class="next">';
}

$string .= ' ';

if ( ( $this->batch_number < $number_of_pages ) && ( $number_of_pages != 1 ) ) {
  $string .= osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $get_parameter . $batch_keyword . '=' . ($this->batch_number + 1)), $forward_string);
} else {
  $string .= $forward_grey_string;
}

if ($number_of_pages > 1) {
  $string .= '</span>';
}

– Replace it with:

if ( ( $this->batch_number < $number_of_pages ) && ( $number_of_pages != 1 ) ) {
  $string .= osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $get_parameter . $batch_keyword . '=' . ($this->batch_number + 1)), $forward_string);
} else {
  $string .= '<span>' . $forward_grey_string . '</span>';
}

Step6. Go to includes/classes/order.php

– Find following code snippet:

$Qopd->bindValue(':download_count', $Qdownloadable->valueInt('number_of_downloads'));

– Replace it with:

$Qopd->bindValue(':download_count', $Qdownloadable->valueInt('number_of_downloads') * $products['quantity']);

– Find following code snippet:

if ($Qdownloadable->numberOfRows() > 0) {
    $this->products[$index]['downloads_status'] = $Qdownloadable->valueInt('status');
    if ($Qdownloadable->valueInt('status') == 1) {
      $this->products[$index]['orders_products_download_id'] = $Qdownloadable->valueInt('orders_products_download_id');
      $this->products[$index]['products_filename'] = $Qdownloadable->value('orders_products_filename');
      $this->products[$index]['products_cache_filename'] = $Qdownloadable->value('orders_products_cache_filename');
    }
}

– Add following code snippet after it:

//get the max number of downloads
$Qmax_downloads = $osC_Database->query('select number_of_downloads from :table_products_downloadables where products_id = :products_id');
$Qmax_downloads->bindTable(':table_products_downloadables', TABLE_PRODUCTS_DOWNLOADABLES);
$Qmax_downloads->bindInt(':products_id', $Qproducts->valueInt('products_id'));
$Qmax_downloads->execute();

$this->products[$index]['number_of_downloads'] = $Qmax_downloads->valueInt('number_of_downloads');

$Qmax_downloads->freeResult();

Step7. Go to includes/classes/search.php

– Find following code snippet:

$Qlisting = $osC_Database->query('select SQL_CALC_FOUND_ROWS distinct p.*, pd.*, m.*, i.image, vs.status, if(vs.status, vs.variants_speicals_price, if(s.status, s.specials_new_products_price, null)) as specials_new_products_price, if(vs.status, vs.variants_speicals_price, if(s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) as final_price');

– Replace it with:

$Qlisting = $osC_Database->query('select SQL_CALC_FOUND_ROWS distinct p.*, pd.*, m.*, i.image, vs.status, if(vs.status, vs.variants_specials_price, if(s.status, s.specials_new_products_price, null)) as specials_new_products_price, if(vs.status, vs.variants_specials_price, if(s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) as final_price');

– Find following code snippet:

if (DISPLAY_PRICE_WITH_TAX == '1') {
        if ($this->_price_from > 0) {
          $Qlisting->appendQuery('and (if(vs.status, vs.variants_speicals_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= :price_from)');
          $Qlisting->bindFloat(':price_from', $this->_price_from);
        }

        if ($this->_price_to > 0) {
          $Qlisting->appendQuery('and (if(vs.status, vs.variants_speicals_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= :price_to)');
          $Qlisting->bindFloat(':price_to', $this->_price_to);
        }
} else {
  if ($this->_price_from > 0) {
    $Qlisting->appendQuery('and (if(vs.status, vs.variants_speicals_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) >= :price_from)');
    $Qlisting->bindFloat(':price_from', $this->_price_from);
  }

  if ($this->_price_to > 0) {
    $Qlisting->appendQuery('and (if(vs.status, vs.variants_speicals_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) <= :price_to)');
    $Qlisting->bindFloat(':price_to', $this->_price_to);
  }
}

– Replace it with:

if (DISPLAY_PRICE_WITH_TAX == '1') {
        if ($this->_price_from > 0) {
          $Qlisting->appendQuery('and (if(vs.status, vs.variants_specials_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= :price_from)');
          $Qlisting->bindFloat(':price_from', $this->_price_from);
        }

        if ($this->_price_to > 0) {
          $Qlisting->appendQuery('and (if(vs.status, vs.variants_specials_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= :price_to)');
          $Qlisting->bindFloat(':price_to', $this->_price_to);
        }
} else {
  if ($this->_price_from > 0) {
    $Qlisting->appendQuery('and (if(vs.status, vs.variants_specials_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) >= :price_from)');
    $Qlisting->bindFloat(':price_from', $this->_price_from);
  }

  if ($this->_price_to > 0) {
    $Qlisting->appendQuery('and (if(vs.status, vs.variants_specials_price, if (s.status, s.specials_new_products_price, if (pv.products_price, pv.products_price, p.products_price))) <= :price_to)');
    $Qlisting->bindFloat(':price_to', $this->_price_to);
  }
}

Step8. Go to includes/classes/shopping_cart.php

– Find the following code snippet:

'image' => $osC_Product->getImage(),

– Replace it with:

'image' => $osC_Product->getImage($variants),

Step9. Go to includes/classes/specials.php

– Find following code snippet:

$Qspecial = $osC_Database->query('select variants_speicals_price from :table_variants_specials where products_variants_id = :products_variants_id and status = 1');

– Replace it with:

$Qspecial = $osC_Database->query('select variants_specials_price from :table_variants_specials where products_variants_id = :products_variants_id and status = 1');

– Find following code snippet:

$this->_specials['variants'][$variants_id] = $Qspecial->valueDecimal('variants_speicals_price');

– Replace it with:

$this->_specials['variants'][$variants_id] = $Qspecial->valueDecimal('variants_specials_price');

– Find following code snippet:

$Qspecials = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_specials s where p.products_status = 1 and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = :language_id and s.status = 1 order by s.specials_date_added desc');

– Replace it with:

$Qspecials = $osC_Database->query('select p.products_id, p.products_price, p.products_type, p.products_tax_class_id, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_specials s where p.products_status = 1 and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = :language_id and s.status = 1 order by s.specials_date_added desc');

Step10. Go to includes/classes/product.php

– Remove following code snippet:

usort($variants_groups, array('self', '_sortVariantsGroups'));

– Remove following code snippet:

/**
* sort the variants groups based on its its sort order or name (ASC direction)
*
* @access private
* @param array $group_a a
* @param array $group_b
*
* return int
*
*/
function _sortVariantsGroups($group_a, $group_b) {
  if ($group_a['sort_order'] < $group_b['sort_order']) {
    return -1;
  }

  if ($group_a['sort_order'] > $group_b['sort_order']) {
    return 1;
  }

  //sort order is equel. Compare their names
  if ($group_a['sort_order'] == $group_b['sort_order']) {
    return strnatcmp($group_a['groups_name'], $group_b['groups_name']);
  }
}

– Find following code snippet:

$Qvalues = $osC_Database->query('select pve.products_variants_groups_id as groups_id, pve.products_variants_values_id as variants_values_id, pvg.products_variants_groups_name as groups_name, pvg.sort_order as groups_sort_order, pvv.products_variants_values_name as variants_values_name, pvv.sort_order as sort_order from :table_products_variants_entries pve, :table_products_variants_groups pvg, :table_products_variants_values pvv where pve.products_variants_groups_id = pvg.products_variants_groups_id and pve.products_variants_values_id = pvv.products_variants_values_id and pvg.language_id = pvv.language_id and pvg.language_id = :language_id and pve.products_variants_id = :products_variants_id order by pve.products_variants_groups_id');

– Replace it with:

$Qvalues = $osC_Database->query('select pve.products_variants_groups_id as groups_id, pve.products_variants_values_id as variants_values_id, pvg.products_variants_groups_name as groups_name, pvg.sort_order as groups_sort_order, pvv.products_variants_values_name as variants_values_name, pvv.sort_order as sort_order from :table_products_variants_entries pve, :table_products_variants_groups pvg, :table_products_variants_values pvv where pve.products_variants_groups_id = pvg.products_variants_groups_id and pve.products_variants_values_id = pvv.products_variants_values_id and pvg.language_id = pvv.language_id and pvg.language_id = :language_id and pve.products_variants_id = :products_variants_id order by pvg.sort_order, pvg.products_variants_groups_name, pve.products_variants_groups_id');

– Find following code snippet:

//get variant default image
  if ($this->hasVariants()) {
    if (!osc_empty($this->_current_variants)) {
      $product_id_string = osc_get_product_id_string($this->getID(), $this->_current_variants);
      $product_variant = $this->_data['variants'][$product_id_string];

      $default_variant_image = $product_variant['image'];
      break;
    }else if (is_array($this->_data['default_variant']) && !empty($this->_data['default_variant'])) {
      if ($image['id'] == $this->_data['default_variant']['image']) {
        $default_variant_image = $image['image'];
      }
    }
  }

– Replace it with:

//get variant default image
  if ($this->hasVariants()) {
    if (!osc_empty($this->_current_variants)) {
      $current_variants = $this->_current_variants;
    }else if ($variants !== null) {
      $current_variants = $variants;
    }

    if ($current_variants !== null) {
      $product_id_string = osc_get_product_id_string($this->getID(), $current_variants);
      $product_variant = $this->_data['variants'][$product_id_string];

      $default_variant_image = $product_variant['image'];
      break;
    }else if (is_array($this->_data['default_variant']) && !empty($this->_data['default_variant'])) {
      if ($image['id'] == $this->_data['default_variant']['image']) {
        $default_variant_image = $image['image'];
      }
    }
  }

– Find following code snippet:

$Qproducts = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_date_added, pd.products_name, pd.products_keyword, m.manufacturers_name, i.image from :table_products p left join :table_manufacturers m on (p.manufacturers_id = m.manufacturers_id) left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc, pd.products_name');

– Replace it with:

$Qproducts = $osC_Database->query('select p.products_id, p.products_price, p.products_type, p.products_tax_class_id, p.products_date_added, pd.products_name, pd.products_keyword, m.manufacturers_name, i.image from :table_products p left join :table_manufacturers m on (p.manufacturers_id = m.manufacturers_id) left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc, pd.products_name');

Step11. Go to includes/content/info/sitemap.php

– Find following code snippet:

global $osC_Services, $osC_Language, $breadcrumb, $Qarticles_listing, $Qfaqs_listing;

– Replace it with:

global $osC_Services, $osC_Language, $breadcrumb, $Qinformation_listing, $articles_categories, $Qfaqs_listing;

– Find following code snippet:

$articles = new toC_Articles();
$Qarticles_listing = $articles->getListing();

– Replace it with:

//create the article instance to get the articles in each categories
$articles = new toC_Articles();

//get the articles listing for information category
$Qinformation_listing = $articles->getListing(1);

//get articles categories including the articles
$articles_categories = $articles->getCategoriesListing();

Step12. Go to includes/functions/general.php

– Remove following code snippet:

//lei:sort the variant by the options id
ksort($params);

Step13. Go to includes/javascript/ajax_shopping_cart.js

– Find following code snippet:

addToCartButton.set('disabled', 'disabled');

– Replace it with:

if (addToCartButton.hasClass('disabled')) {
    return false;
  }

– Find following code snippet:

//variants
  var selects = $$('tr.variantCombobox select');
  if ($defined(selects)) {
    var variants = '';

    selects.each(function(select) {
      var id = select.id.toString();
      var groups_id = id.substring(9, id.indexOf(']'));

      variants += groups_id + ':' + select.value + ';';
    }.bind(this));

    params.variants = variants; 
  }

– Replace it with:

if ($('qty_' + pID) != null) {
      params.pQty = $('qty_' + pID).get('value');  
  }

  //variants
  var options = null;
  var selects = $$('tr.variantCombobox select');
  var listSelects = $$('.variants_' + pID + ' select');

  if (selects.length > 0) {
      options = selects;
  }else if (listSelects.length > 0) {
      options = listSelects;
  }

  if (options !== null) {
    var variants = '';

    options.each(function(select) {
      var id = select.id.toString();
      var groups_id = id.substring(9, id.indexOf(']'));

      variants += groups_id + ':' + select.value + ';';
    }.bind(this));

    params.variants = variants; 
  }

– Remove following code snippet:

addToCartButton.erase('disabled');

– Find following code snippet:

duration: 700,

– Replace it with:

duration: 300,

Step14. Override includes/javascript/auto_completer.js

– – Unzip the downloaded 1.1.8.6 package and copy the includes/javascript/auto_completer.js into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step15. Override includes/javascript/popup_cart.js

– – Unzip the downloaded 1.1.8.6 package and copy the includes/javascript/popup_cart.js into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step16. Override includes/javascript/variants.js

– – Unzip the downloaded 1.1.8.6 package and copy the includes/javascript/variants.js into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step17. Go to includes/languages/en_US.xml

– Add following code snippet at the bottom of the file:

<definition>
      <key>button_get_more</key>
      <value><![CDATA[Get More]]></value>
      <group>general</group>
 </definition>

 <definition>
      <key>add_to_cart_confirmation</key>
      <value><![CDATA[Success: You have added %s to your shopping cart!]]></value>
      <group>general</group>
 </definition>

 <definition>
      <key>button_return</key>
      <value><![CDATA[Return]]></value>
      <group>general</group>
 </definition>

 <definition>
      <key>button_cart</key>
      <value><![CDATA[Cart]]></value>
      <group>general</group>
 </definition>

Note: if you are using the other languages, please just add these code snippet into the specific language xml file. Then, translate them with the specific language. We will add these languages definitions into the TomatoCart translator platform.

Step18. Go to includes/modules/content/upcoming_products.php

– Remove following code snippet:

//add the css block for this module
$osC_Template->addStyleDeclaration('.clearLeft{clear:left;}
.upcomingProductsModule{overflow: auto; height: 100%;}
.upcomingProductsModule .productItem{width: 32%; float: left; text-align: center; padding: 2px;}
.upcomingProductsModule .productItem .productName{height:30px;}
.upcomingProductsModule .productItem div {margin:3px 0;}');

– Find following code snippet:

$this->_content .= '</div>';

– Add following code after it:

//add the css block for this module
$osC_Template->addStyleDeclaration('.clearLeft{clear:left;}
                                  .upcomingProductsModule{overflow: auto; height: 100%;}
                                  .upcomingProductsModule .productItem{width: 32%; float: left; text-align: center; padding: 2px;}
                                  .upcomingProductsModule .productItem .productName{height:30px;}
                                  .upcomingProductsModule .productItem div {margin:3px 0;}');

Step19. Go to includes/modules/order_confirmation_form.php

– Find the following code:

echo '<br /><nobr><small> <i> - ' . $osC_Language->get('senders_name') . ': ' . $products['gc_data']['recipients_name'] . '</i></small></nobr>';

if ($products['gc_data']['type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
    echo '<br /><nobr><small> <i> - ' . $osC_Language->get('senders_email')  . ': ' . $products['gc_data']['recipients_email'] . '</i></small></nobr>';
}

– Replace it with:

echo '<br /><nobr><small> <i> - ' . $osC_Language->get('senders_name') . ': ' . $products['gc_data']['senders_name'] . '</i></small></nobr>';

if ($products['gc_data']['type'] == GIFT_CERTIFICATE_TYPE_EMAIL) {
  echo '<br /><nobr><small> <i> - ' . $osC_Language->get('senders_email')  . ': ' . $products['gc_data']['senders_email'] . '</i></small></nobr>';
}

Step20. Override includes/modules/product_listing.php

– Unzip the downloaded 1.1.8.6 package and copy the includes/modules/product_listing.php into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step21. Go to includes/toc_constants.php

– Find following code snippet:

define('INFORMATION_SHIPPING_RETURNS', 4);

– Replace it with:

define('INFORMATION_CONDITIONS_OF_USE', 4);

Step22. Go to admin/includes/classes/language.php

– Find following code snippet:

function remove($id) {

– Replace it with:

function remove($id, $del_files = false) {

– Find following code snippet:

osC_Cache::clear('languages');

– Add following code after it:

//delete language files too
  if ($del_files === true) {
    $lang_admin_path = DIR_FS_CATALOG . DIR_FS_ADMIN . 'includes/languages/';
    $lang_front_path = DIR_FS_CATALOG . 'includes/languages/';
    $lang_install_path = DIR_FS_CATALOG . 'install/includes/languages/';
    $lang_code = $Qcheck->value('code');

    if (file_exists($lang_admin_path .  $lang_code . '.php')) {
      @unlink($lang_admin_path . $lang_code . '.php');
    }

    if (is_dir($lang_admin_path .  $lang_code)) {
      osc_remove($lang_admin_path .  $lang_code);
    }

    if (file_exists($lang_front_path .  $lang_code . '.xml')) {
      @unlink($lang_front_path . $lang_code . '.xml');
    }

    if (is_dir($lang_front_path .  $lang_code)) {
      osc_remove($lang_front_path .  $lang_code);
    }

    if (file_exists($lang_install_path .  $lang_code . '.php')) {
      @unlink($lang_install_path . $lang_code . '.php');
    }

    if (is_dir($lang_install_path .  $lang_code)) {
      osc_remove($lang_install_path .  $lang_code);
    }
  }

Step23. Go to admin/includes/classes/specials.php

– Find following code:

'variants_speicals_price' => $Qspecials->value('variants_speicals_price'));

– Replace it with:

'variants_specials_price' => $Qspecials->value('variants_specials_price'));

– Find following code:

$Qvariants_special = $osC_Database->query('select pd.products_name, pv.products_price, vs.variants_specials_id as specials_id, vs.products_variants_id as products_id, vs.variants_speicals_price as specials_new_products_price, vs.specials_date_added, vs.specials_last_modified, vs.start_date, vs.expires_date, vs.date_status_change, vs.status from :table_variants_specials vs inner join :table_products_variants pv on vs.products_variants_id = pv.products_variants_id inner join :table_original_products p on pv.products_id = p.products_id inner join :table_products_description pd on (p.products_id = pd.products_id and pd.language_id = :language_id) where vs.variants_specials_id = :specials_id');

– Replace it with:

$Qvariants_special = $osC_Database->query('select pd.products_name, pv.products_price, vs.variants_specials_id as specials_id, vs.products_variants_id as products_id, vs.variants_specials_price as specials_new_products_price, vs.specials_date_added, vs.specials_last_modified, vs.start_date, vs.expires_date, vs.date_status_change, vs.status from :table_variants_specials vs inner join :table_products_variants pv on vs.products_variants_id = pv.products_variants_id inner join :table_original_products p on pv.products_id = p.products_id inner join :table_products_description pd on (p.products_id = pd.products_id and pd.language_id = :language_id) where vs.variants_specials_id = :specials_id');

– Find following code:

$Qspecial = $osC_Database->query('update :table_variants_specials set variants_speicals_price = :specials_new_products_price, specials_last_modified = now(), expires_date = :expires_date, start_date = :start_date, status = :status where variants_specials_id = :specials_id');

– Replace it with:

$Qspecial = $osC_Database->query('update :table_variants_specials set variants_specials_price = :specials_new_products_price, specials_last_modified = now(), expires_date = :expires_date, start_date = :start_date, status = :status where variants_specials_id = :specials_id');

– Find following code:

$Qspecial = $osC_Database->query('insert into :table_variants_specials (products_variants_id, variants_speicals_price, specials_date_added, expires_date, start_date, status) values (:products_id, :specials_new_products_price, now(), :expires_date, :start_date, :status)');

– Replace it with:

$Qspecial = $osC_Database->query('insert into :table_variants_specials (products_variants_id, variants_specials_price, specials_date_added, expires_date, start_date, status) values (:products_id, :specials_new_products_price, now(), :expires_date, :start_date, :status)');

Step24. Override admin/includes/extmodules/languages/languages_grid.php

– Unzip the downloaded 1.1.8.6 package and copy the admin/includes/extmodules/languages/languages_grid.php into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step25. Go to admin/includes/extmodules/languages/languages_upload_dialog.php

– Find following code snippet:

this.fireEvent('saveSuccess', action.result.feedback);
this.close();
window.location.reload();

– Replace it with:

if (action.result.success) {
  this.fireEvent('saveSuccess', action.result.feedback);
  this.close();
  window.location.reload();  
}else {
  Ext.MessageBox.alert(TocLanguage.msgErrTitle, action.result.feedback);
}

Step26. Go to admin/includes/extmodules/products/main.php

– Find following code snippet:

width:870,

– Replace it with:

width:920,

Step27. Go to admin/includes/extmodules/products/products_grid.php

– Find following code snippet:

{name: 'products_name'},

– Add following code snippet after it:

{name: 'products_sku'},

– Find following code snippet:

{header: "<?php echo $osC_Language->get('table_heading_frontpage'); ?>", align: 'center', renderer: renderStatus, dataIndex: 'products_frontpage', width: 90},

– Add following code after it:

{header: "<?php echo $osC_Language->get('table_heading_sku'); ?>", align: 'center', sortable: true, dataIndex: 'products_sku', width: 80},

Step28. Go to admin/includes/jsons/products.php

– Find following code snippet:

$Qproducts = $osC_Database->query('select distinct p.products_id, p.products_type, pd.products_name, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd, :table_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and p2c.categories_id in (:categories_id)');
  $Qproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
  $Qproducts->bindRaw(':categories_id', implode(',', $in_categories));
} else {
  $Qproducts = $osC_Database->query('select p.products_id, p.products_type, pd.products_name, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd where p.products_id = pd.products_id and pd.language_id = :language_id');
}

if ( !empty($_REQUEST['search']) ) {
  $Qproducts->appendQuery('and pd.products_name like :products_name');
  $Qproducts->bindValue(':products_name', '%' . $_REQUEST['search'] . '%');
}

– Replace it with:

$Qproducts = $osC_Database->query('select distinct p.products_id, p.products_type, pd.products_name, p.products_sku, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd, :table_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and p2c.categories_id in (:categories_id)');
  $Qproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
  $Qproducts->bindRaw(':categories_id', implode(',', $in_categories));
} else {
  $Qproducts = $osC_Database->query('select p.products_id, p.products_type, pd.products_name, p.products_sku, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd where p.products_id = pd.products_id and pd.language_id = :language_id');
}

if ( !empty($_REQUEST['search']) ) {
  $Qproducts->appendQuery('and (pd.products_name like :products_name or p.products_sku like :products_sku)');
  $Qproducts->bindValue(':products_name', '%' . $_REQUEST['search'] . '%');
  $Qproducts->bindValue(':products_sku', '%' . $_REQUEST['search'] . '%');
}

– Find following code snippet:

'products_name' => $Qproducts->value('products_name'),

– Add following code after it:

'products_sku' => $Qproducts->value('products_sku'),

Step29. Override admin/includes/jsons/languages.php

– Unzip the downloaded 1.1.8.6 package and copy the admin/includes/jsons/languages.php into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step30. Go to admin/includes/jsons/specials.php

– Find following code snippet:

'specials_new_products_price' => '<span class="oldPrice">' . $osC_Currencies->format($special_product['products_price']) . '</span> <span class="specialPrice">' . $osC_Currencies->format($special_product['variants_speicals_price']) . '</span>');

– Replace it with:

'specials_new_products_price' => '<span class="oldPrice">' . $osC_Currencies->format($special_product['products_price']) . '</span> <span class="specialPrice">' . $osC_Currencies->format($special_product['variants_specials_price']) . '</span>');

Step31. Go to admin/includes/languages/en_US/modules/ext_desktop.php

– Find following code snippet:

msgDeactiveConfirm = Do you really want to deactive the selected record(s)?

– Add following code snippet after it:

msgDeleteLanguageFiles = Do you want to delete the languages files too?

Step32. Override admin/includes/modules/pdf/invoice.php

– Unzip the downloaded 1.1.8.6 package and copy the admin/includes/modules/pdf/invoice.php  into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step33. Override admin/includes/modules/pdf/order.php

– Unzip the downloaded 1.1.8.6 package and copy the admin/includes/modules/pdf/order.php  into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step34. Override admin/includes/modules/pdf/packagingslip.php

– Unzip the downloaded 1.1.8.6 package and copy the admin/includes/modules/pdf/packagingslip.php  into the same directory on your web server. Please just override it.

Note: A lot of code are modified in this file. So i recommend you just override it. But, if you had modified this file, please contact us via support@tomatocart.com.  We will assist you to update this file.

Step35. Go to admin/includes/modules/services/debug.php

– Find following code snippet:

$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Check Download Directory', 'SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY', '1', 'Show a warning if the digital product download directory does not exist.', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now())");

– Add following code after it:

$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Show The Uncompressed Css And Javascript', 'SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT', '1', 'Show the uncompressed css And javascript in the template .', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now())");

– Find following code snippet:

'SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY');

– Replace it with:

'SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY',
'SERVICE_DEBUG_SHOW_CSS_JAVASCRIPT');

Step36. Go to admin/templates/default.php

– Find following code snippet:

if(!isset($_SESSION['admin'])) {
    require('templates/default/login/login.php');
    exit;
  }

– Add following code snippet after it:

//enable the IE compatible mode
  if (stripos($_SERVER['HTTP_USER_AGENT'], 'msie 9') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'msie 10') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'msie') !== false) {
    header('X-UA-Compatible: IE=7');
  }

– Find following code snippet:

<script type="text/javascript" src="external/tinymec/miframe-min.js"></script>
 <script type="text/javascript" src="external/tinymec/tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript" src="external/tinymec/Ext.ux.TinyMCE.min.js"></script>

– Replace it with:

<script type="text/javascript" src="external/tinymce/miframe-min.js"></script>
<script type="text/javascript" src="external/tinymce/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="external/tinymce/Ext.ux.TinyMCE.min.js"></script>

Done. That’s it.

If you need our assistance for the upgrade, don’t hesitate to contact us via support@tomatocart.com.

Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *


4 + 6 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>