-
Notifications
You must be signed in to change notification settings - Fork 63
Template Upgrade
This document will detail the upgrade directions to upgrade your theme/look and feel if you have modified or created your own set. This document covers all template changes from 2.0.7 all the way to the most recent version. This document is useful for those upgrading from earlier versions to the most recent Web Store version. If you already have a version in between, just scroll down to your appropriate starting point.
If you are receiving white screens, AJAX errors or other upgrade issues, run an Upgrade Check on your site to see what upgrade items may have been missed. Use your store URL with /install.php?check (i.e. http://store.example.com/install.php?check or http://www.example.com/store/install.php?check depending on your setup)
No template changes were made
Add the following to the top of the file, where HTML code begins:
<html>
<head>
Add the following after the </style> tag:
</head>
<body>
<div>
Change the line
<a href="<?= $_ITEM->Prod->Link ?>"><img src="<?= $_ITEM->Prod->SmallImage ?>" class="gregistry_img" /></a>
<p class="product"><a href="<?= $_ITEM->Prod->Link ?>"><?= _xls_truncate($_ITEM->Prod->Name , 50) ?></a>
To
<a href="index.php?product=<?= $_ITEM->Prod->Code ?>&ajax=true" class="iframe"><img src="<?= $_ITEM->Prod->SmallImage ?>" class="gregistry_img" /></a>
<p class="product"><a href="index.php?product=<?= $_ITEM->Prod->Code ?>&ajax=true" class="iframe"><?= _xls_truncate($_ITEM->Prod->Name , 50) ?></a>
Add the following lines after your include for jquery.min.js in the <head> section:
<script type="text/javascript" src="assets/js/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="assets/js/fancybox/jquery.easing-1.4.pack.js"></script>
<link rel="stylesheet" href="assets/js/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
Add the following line within the $(document).ready function:
$("a.iframe").fancybox();
Change the line
<div style="position: relative; top: -53px;">
To
<div class="receipt_checkout_continue rounded-bottom">
Change the line
<p class="price"><?= _xls_currency($_ITEM->Sell) ?>
<?= ($_ITEM->SellDiscount > 0)?sprintf("<br/><strike>%s</strike>" , _xls_currency($_ITEM->SellBase) ):""; ?>
</p>
To
<p class="price">
<?= ($_ITEM->Discounted)?_xls_currency($_ITEM->SellDiscount) . sprintf("<br/><strike>%s</strike>" , _xls_currency($_ITEM->SellBase)):_xls_currency($_ITEM->Sell); ?>
</p>
Add the following line right above pnlShipping->Render(); ?>
<?php if(isset($this->pnlPromoCode) && ($this->pnlPromoCode->Visible)): ?>
<?php $this->pnlPromoCode->Render() ?>
<?php endif; ?>
Add the following line to the very bottom of this file
<td style="padding:15px;" width="780px">
Change the line
<p class="price"><?= _xls_currency($_ITEM->Sell) ?><?= ($_ITEM->SellDiscount > 0)?sprintf("<br/><strike>%s</strike>" , _xls_currency($_ITEM->SellBase) ):""; ?></p>
To
<p class="price"><?= ($_ITEM->Discounted)?_xls_currency($_ITEM->SellDiscount) . sprintf("<br/><strike>%s</strike>" , _xls_currency($_ITEM->SellBase) ):_xls_currency($_ITEM->Sell); ?></p>
Change
<?php foreach($this->orders as $order): ?>
<a href="index.php?xlspg=order_track&getuid=<?= $order->Linkid ?>"><?= $order->IdStr ?></a><br/>
<?php endforeach; ?>
To
<table width='100%'>
<?php foreach($this->orders as $order): ?>
<tr>
<td><a href="index.php?xlspg=order_track&getuid=<?php _xt($order->Linkid); ?>"><?php _xt($order->IdStr);?></a></td>
</tr>
<?php endforeach; ?>
</table>
Change
<a href="#" <?php $_CONTROL->Form->pxyEnlarge->RenderAsEvents($img->Rowid) ?>><img src="<?= Images::GetUrl($img->Rowid , Images::SMALL); ?>" alt="" class="" style="height: 40px; width: 40px;"/></a>
To
<a href="#" <?php $_CONTROL->Form->pxyEnlarge->RenderAsEvents($img->Rowid) ?>><img src="<?= Images::GetUrl($img->Rowid , Images::SMALL); ?>" alt="" class="" style="<?php echo "height: "._xls_get_conf("MINI_IMAGE_WIDTH")."px; width: "._xls_get_conf("MINI_IMAGE_HEIGHT")."px;" ?>"/></a>
Add the following to the top of the file between the areas
$this->misc_components['advanced_search']->SetCustomStyle('margin-left','-3px');
if (QApplication::IsBrowser(QBrowserType::Firefox))
$this->misc_components['search_img']->SetCustomStyle('margin-left','-5px');
Add the following line after = $this->misc_components['search_img']->Render(); ?>, just before span
<?= $this->misc_components['advanced_search']->Render(); ?>
Add the following CSS class
.receipt_checkout_continue {
position: relative;
top: -53px;
}
Change
.products_sliber_theme_bg
to
.products_slider_theme_bg
Make sure you've added the adv_search.png from the installer to the "images" subfolder under your templates/css folder
Change the line
<p class="right" style="margin: -2px 15px 0 0;><a href="index.php?customer_register"><img src="<?= templateNamed('css/images/btn_edit.png') ?>" onclick="document.location.href='index.php?customer_register'" alt="<?php _xt('Edit') ?>"/></a></p>
To
<p class="right" style="margin: -2px 15px 0 0;"><a href="index.php?customer_register"><img src="<?= templateNamed('css/images/btn_edit.png') ?>" onclick="document.location.href='index.php?customer_register'" alt="<?php _xt('Edit') ?>"/></a></p>
Change the line
<meta name="Generator" content="Xilva Lightspeed Webstore <?= _xls_version(); ?>" />
To
<meta name="Generator" content="LightSpeed Webstore <?= _xls_version(); ?>" />
Change the line
<p><?php $this->lblDescription->Render() ; ?></p>
To
<div class="description"><?php $this->lblDescription->Render() ; ?></div>
Change the line
sold #eee
To
solid #eee
Add
.product_details .description {
border:1px solid #555;
margin:20px 0;
padding:15px;
}
All changes in this version are to use the Translator properly for any foreign language translation. If this is not necessary for your store, you may choose to skip these changes as they are not critical for English-only stores.
Change the line
<h1>Advanced Search</h1>
To
<h1><?php _xt('Advanced Search') ?></h1>
Change the line
<dd><?php $this->txtPromoCode->Render() ?> <?php $this->btnPromoVerify->Render('Text=Apply Promo Code') ?></dd>
To
<dd><?php $this->txtPromoCode->Render() ?> <?php $this->btnPromoVerify->Render('Text='._sp("Apply Promo Code")) ?></dd>
Change the line
<dt><label for="Email"><span class="red">*</span> Email</label></dt>
To
<dt><label for="Email"><span class="red">*</span> <?php _xt("Email"); ?></label></dt>
Change the line
<dt><label for="Confirm Email"><span class="red">*</span> Confirm Email</label></dt>
To
<dt><label for="Confirm Email"><span class="red">*</span> <?php _xt("Confirm Email"); ?></label></dt>
Change the line
<dt><label for="Password"><span class="red">*</span> Password</label></dt>
To
<dt><label for="Password"><span class="red">*</span> <?php _xt("Password"); ?></label></dt>
Change the line
<dt><label for="cPassword"><span class="red">*</span> Confirm Password</label></dt>
To
<dt><label for="cPassword"><span class="red">*</span> <?php _xt("Confirm Password"); ?></label></dt>
Change the line
class="opt"><?php printf(_sp("I hereby agree to the <a href=\"%s\" target=\"_new\">Terms and Conditions</a> of shopping with %s") , _xls_site_dir() . "/index.php?cpage=tc" , _xls_get_conf('STORE_NAME' , $_SERVER['HTTP_HOST']) ); ?>
To
class="opt"><?php printf(_sp("I hereby agree to the")." <a href=\"%s\" target=\"_new\">"._sp("Terms and Conditions")."</a> "._sp("of shopping with")." %s" , _xls_site_dir() . "/index.php?cpage=tc" , _xls_get_conf('STORE_NAME' , $_SERVER['HTTP_HOST']) ); ?>
No template changes were made.
If you are translating Web Store to a localized language using .PO files, all template files need to be modified with the new _xt() function (for Xsilva Translate). The modification would be the same for all templates, simply replace all occurrences of the _p function with the _xt function. If you are logged in via ssh to your web server, you can use tools built into the operating system to find and replace any occurrences of _p( with _xt( . If you are using a text editing utility like Textwrangler, BBEdit, Coda or Dreamweaver, you would need to open all files within your current template folder, and do a find and replace on all files with the same terms.