Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Template Upgrade

ktwbc edited this page Apr 18, 2012 · 17 revisions

Template Upgrade Guide

Introduction

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.

Helpful Hint

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)

THE FOLLOWING CHANGES ARE FROM 2.0.7 TO 2.0.8

No template changes were made

THE FOLLOWING CHANGES ARE FROM 2.0.8 TO 2.0.9

email_header.tpl.php

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>

gift_search_detail_item.tpl.php

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>

index.tpl.php

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" />

assets/js/webstore.js (Note the /assets folder, not your /templates folder)

Add the following line within the $(document).ready function:

$("a.iframe").fancybox();

THE FOLLOWING CHANGES ARE FROM 2.0.9 TO 2.1.0

cart.tpl.php

Change the line

 <div style="position: relative; top: -53px;">

To

 <div class="receipt_checkout_continue rounded-bottom">

cart_item.tpl.php

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>

checkout.tpl.php

Add the following line right above pnlShipping->Render(); ?>

<?php if(isset($this->pnlPromoCode) && ($this->pnlPromoCode->Visible)): ?>
<?php $this->pnlPromoCode->Render() ?>
<?php endif; ?>

email_header.tpl.php

Add the following line to the very bottom of this file

<td style="padding:15px;" width="780px">

generic_cart_item.tpl.php

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>

myaccount.tpl.php

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>

product_detail_additional_images.tpl.php

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>

searchbox.tpl.php

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(); ?>

/templates/(your template)/css/webstore.css

Add the following CSS class

.receipt_checkout_continue {
	position: relative; 
	top: -53px;
}

Change

.products_sliber_theme_bg

to

.products_slider_theme_bg

/templates/(yourtemplatename)/css

Make sure you've added the adv_search.png from the installer to the "images" subfolder under your templates/css folder

THE FOLLOWING CHANGES ARE FROM 2.1.0 TO 2.1.3

myaccount.tpl.php

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>

index.tpl.php

Change the line

<meta name="Generator" content="Xilva Lightspeed Webstore <?= _xls_version(); ?>" />

To

<meta name="Generator" content="LightSpeed Webstore <?= _xls_version(); ?>" />

product_detail.tpl.php

Change the line

    <p><?php $this->lblDescription->Render() ; ?></p>

To

    <div class="description"><?php $this->lblDescription->Render() ; ?></div>   

search_advanced.tpl.php

Change the line

sold #eee

To

solid #eee    

/templates/(your template)/css/webstore.css

Add

.product_details .description {
border:1px solid #555;
margin:20px 0;       
padding:15px;       
}

THE FOLLOWING CHANGES ARE FROM 2.1.3 TO 2.1.5

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.

/templates/(your template)/search_advanced.tpl.php

Change the line

<h1>Advanced Search</h1>

To

<h1><?php _xt('Advanced Search') ?></h1>

/templates/(yourtemplate)/promocode.tpl.php

Change the line

<dd><?php $this->txtPromoCode->Render() ?>&nbsp;<?php $this->btnPromoVerify->Render('Text=Apply Promo Code') ?></dd>

To

<dd><?php $this->txtPromoCode->Render() ?>&nbsp;<?php $this->btnPromoVerify->Render('Text='._sp("Apply Promo Code")) ?></dd>

/templates/(yourtemplate)/customer_register.tpl.php

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>

/templates/(yourtemplate)/checkout_verify.tpl.php

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']) ); ?>

THE FOLLOWING CHANGES ARE FROM 2.1.5 TO 2.1.7

No template changes were made.

Optional Changes

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.

Clone this wiki locally