Skip to content

Upgrading Web Store templates to 2.5

ktwbc edited this page Oct 29, 2012 · 11 revisions

#Upgrading Web Store 2.1.7 templates to 2.5

This guide details the changes that were made from the Basic, Deluxe and Framework templates from version 2.1.7 to 2.5. This guide is useful for those who wish to upgrade their existing templates with the new version.

Please note that we strongly recommend looking at the new Brooklyn template in 2.5, and consider applying your customizations to that template set as an alternative to these upgrades. The new Brooklyn template fully scales with iPad and smartphones, making shopping on those devices much easier than the older templates. Even with the changes listed below, mobile functionality is not guaranteed, and these older templates may be discontinued on future versions.

If you received messages during your upgrade process that manual template files needed to be changed, use this guide to apply the necessary changes. Depending on how customized your templates are, not all of the lines listed here may still be applicable to your situation. Certain files, especially index.tpl.php, may be easier to start fresh from the 2.5.0 DMG instead of applying these changes manually. You will need to evaluate your own needs on a case by case basis.

For convenience, we have attempted to detail why the item changed to help evaluate if it is necessarily for your customized templates.

##File Guide

##cart_item.tpl.php

Fixes a bug where a custom description on a Quote would be overridden by Web Store display, and a display bug when using a discount

Change

<?= _xls_truncate($_ITEM->Prod->Name, 63) ?>

to

<?= _xls_truncate($_ITEM->Description, 63) ?>

Change

<?= _xls_currency($_ITEM->Sell) ?><?= ($_ITEM->Discounted)?sprintf("<br/><strike>%s</strike>" , _xls_currency($_ITEM->SellBase) ):"";  ?>

to

<?= ($_ITEM->Discounted) ? sprintf("<strike>%s</strike><br>", _xls_currency($_ITEM->SellBase))._xls_currency($_ITEM->SellDiscount)
: _xls_currency($_ITEM->Sell);  ?>

##checkout.tpl.php

Moves Calculate Shipping button down by Shippping dropdowns, adds new Create Account feature on checkout.

Change

<?php $this->pnlCustomer->Render(); ?>

<?php $this->pnlBillingAdde->Render(); ?>

to

<?php $this->pnlCustomer->Render(); ?>
<?php $this->PasswordControlWrapper->Render(); ?>
<?php $this->pnlBillingAdde->Render(); ?>

Change

<?php $this->pnlShipping->Render(); ?>

to

<div class="left">
<?php $this->pnlShipping->Render(); ?>
</div>
<div class="left shippingbutton">
	<?php
if(isset($this->butCalcShipping) && ($this->butCalcShipping->Visible))
	$this->butCalcShipping->Render()
?>
</div>

Change

<?php $this->pnlVerify->Render(); ?>

to

<?php $this->pnlVerify->Render(); ?>

<?php $this->LoadActionProxy->Render(); ?>

##checkout_reg_account_info.tpl.php

Adds second Email Address field to prevent typos on email addresses.

Change

<legend><?php _xt('Account Information') ?></legend>

to

<legend><?php _xt('Customer Contact') ?></legend>

Change

<div class="left margin clear">
			<dl>
				<dt><label for="Email"><span class="red">*</span> <span class="red">*</span><?php _xt("Email"); ?></label></dt>
				<dd><?php $this->txtCREmail->RenderWithError() ?></dd>
			</dl>
		</div>

to

<div class="left margin clear">
		<dl>
			<dt><label for="Email"><span class="red">*</span> <?php _xt("Email"); ?></label></dt>
			<dd><?php $this->txtCREmail->RenderWithError() ?></dd>
		</dl>
	</div>
	<?php if (!$this->isLoggedIn()) { ?>
	<div class="left margin clear">
		<dl>
			<dt><label for="EmailConfirm"><span class="red">*</span> <?php _xt("Email (Confirm)"); ?></label></dt>
			<dd><?php $this->txtCRConfEmail->RenderWithError() ?></dd>
		</dl>
	</div>
	<? } ?>

##checkout_verify.tpl.php

Wraps Captcha block in IfThen check, if captcha has been disabled in admin panel, will remove it. Also adds Please Wait spinner on Submit button for feedback to user on form submit.

Change

	<fieldset style="display: block; float: left;">
		<legend><?php _xt('Submit your order') ?></legend>

		<div class="block margin">
			<dl>
				<dt><label for="Name"><?php $this->lblVerifyImage->Render(); ?></label></dt>
			</dl>
		</div>

		<div class="block margin">
			<dl class="left">
				<dt><label for="Verify"><?php _xt("Enter the text from the above image"); ?></label></dt>
				<dd><?php $this->txtCRVerify->Text=""; $this->txtCRVerify->RenderWithError() ?></dd>
			</dl>
		</div>

to

<fieldset>
	<legend><?php _xt('Submit your order') ?> <?php
        if ($this->CaptchaControl->Wait)
             $this->CaptchaControl->Wait->Render();
    ?></legend>

<?	if (_xls_show_captcha('checkout')) { ?>
		<div class="block margin">
			<dl>
				<dt><label for="Name"><?php $this->lblVerifyImage->Render(); ?></label></dt>
			</dl>
		</div>

		<div class="block margin">
			<dl class="left">
				<dd><?php $this->txtCRVerify->RenderWithError(); ?></dd>
			</dl>
		</div>
<? } ?>

Change

				<dd><?php $this->chkAgree->Render(); ?><label for="cConfirm"
       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']) ); ?>

to

<dd><?php $this->chkAgree->Render(); ?><label for="cConfirm"
       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_url("terms-and-conditions") , _xls_get_conf('STORE_NAME' , $_SERVER['HTTP_HOST']) ); ?>

##contact_us.tpl.php

Wraps Captcha in IfThen loop to determine if captcha should be shown on Contact Us form

Change

	<p><?php $this->lblVerifyImage->Render(); ?> <br style="clear:both;"/></p>

	<p><label for="Verify"><?php _xt("Enter the image from the above text"); ?></label></p>
			<?php $this->txtVerify->RenderWithError() ?>

to

	<?	if (_xls_show_captcha('contactus')) { ?>
		<div class="block margin">
			<dl>
				<dt><label for="Name"><?php $this->lblVerifyImage->Render(); ?></label></dt>
			</dl>
		</div>

		<div class="block margin">
			<dl class="left">
				<dd><?php $this->txtCRVerify->RenderWithError(); ?></dd>
			</dl>
		</div>
	<? } ?>

##crumbtrail.tpl.php

Due to new URL structure, Crumbtrail was simplified and moved into the core, requiring less output in template

Change

<a href="index.php"><img src="<?php echo templateNamed('css'); ?>/images/breadcrumbs_home.png"	style="display: block; float: left; margin: 0 10px 0 12px;"></a>

to

<a href="<?php echo _xls_site_url(); ?>"><img src="<?php echo templateNamed('css'); ?>/images/breadcrumbs_home.png"	style="display: block; float: left; margin: 0 10px 0 12px;"></a>

Change

			<li>
				<a <?php if(isset($crumb['link'])): ?>
						href="<?= $crumb['link']; ?>"
					<?php elseif(isset($crumb['key'])): ?>
						href="index.php?<?= $crumb['key']; ?>"
					<?php else: ?>
						href="#"<?php endif; ?>
						title="<?= $crumb['name']; ?>"
					<?php if(isset($crumb['pxy'])): ?>
						<?= $crumb['pxy'] ; ?>
					<?php endif; ?>  >

					<?= _xls_truncate($crumb['name'], 45, "...", true); ?>

to

		<li>
			<a href="<?= _xls_site_url($crumb['link']); ?>" title="<?= $crumb['name']; ?>" >
				<?= _xls_truncate($crumb['name'], 45, "...", true); ?>

##customer_register.tpl.php

Changes to new checkout widget structure. Though older fields will still work, highly advised to switch to this structure.

Due to the quantity of changes, this file should be replaced with a new customer_register.tpl.php

##email_cart.tpl.php

Adds cart items to receipt.

The original file was blank, replace with new email_cart.tpl.php

##email_footer.tpl.php

ADMIN_EMAIL field has been removed from Admin Panel, now uses address in Store Information setup

Change

<p style="display: block; float: left; margin: 8px 0 0 15px; color: #fff;"><a href="mailto:<?= _xls_get_conf('ADMIN_EMAIL'); ?>"><?= _xls_get_conf('ADMIN_EMAIL'); ?></a></p>

to

<p style="display: block; float: left; margin: 8px 0 0 15px; color: #fff;"><a href="mailto:<?= _xls_get_conf('EMAIL_FROM'); ?>"><?= _xls_get_conf('EMAIL_FROM'); ?></a></p>

##email_gift_registry.tpl.php

Change in URL structure. Old URLs will forward, so this is technically optional but recommended.

Change

<?= _xls_site_dir() . "/index.php?xlspg=gift_search_detail&gift_token=" . $gift->GiftCode ?><br/><br/>

to

<?= _xls_site_url("gift_search_detail/pg") . "?gift_token=" . $gift->GiftCode ?><br/><br/>

##email_header.tpl.php

CSS Additions for new cart items in receipt. Since HTML email requires CSS in the email itself instead of referencing URL.

Change

<base href="<?= _xls_site_dir(false);?>/"/>

to

<base href="<?= _xls_site_url();?>"/>

Change

table {
font-size: 12px;
}

to

table {
font-size: 12px;
border: 0px;
width: 750px;
margin: 0 auto;

}

tbody {
background-color: #E9EBEA;
}

.graphicheader {
height: 100px;
text-align: left;
width=750px;
background-color: #ffffff;
}

#cartitems table {
	width: 730px;
	margin-top: 10px;
	margin-bottom: 20px;

}

#cartitems th {
background: none repeat scroll 0 0 #000000;
color: #FFFFFF;
font-weight: bold;
padding-left: 2px;
text-align: left;
}

#cartitems .summary {
text-align:right;
font-weight: bold;
}


#cartitems .rightprice {
text-align:right;
}

#cartitems .shipping {
vertical-align: top;
text-align: left;
}

Change

<table border="0" width="780px" style="margin: 0 auto; background: #E9EBEA;">
  <tbody>
    <tr>
      <th style="height: 105px; text-align: left;" width="780px" background="<?= templateNamed('images/email_header_bg.png') ?>">
      <a href="index.php">

to

<table>
    <tr>
      <th class="graphicheader">
      <a href="/">

##email_order_notification.tpl.php

Change

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

to

    </tr>
 </table>
<table>
  <tbody>
    <tr>
     <td style="padding:15px;" width="750px">

##email_order_notification_owner.tpl.php

URL structure changes.

Change

<a href="<?= _xls_site_dir() . "/index.php?xlspg=order_track&getuid=" . $cart->Linkid;  ?>"><?= _xls_site_dir() . "/index.php?xlspg=order_track&getuid=" . $cart->Linkid;  ?></a><br/><br/>

to

<a href="<?= _xls_site_dir() . "/order-track/pg?getuid=" . $cart->Linkid;  ?>"><?= _xls_site_dir() . "/order-track/pg?getuid=" . $cart->Linkid;  ?></a><br/><br/>

##gift_search_item.tpl.php

Change

<p class="title"><a href="index.php?xlspg=gift_search_detail&gift_code=<?= $_ITEM->GiftCode ?>" alt="<?php _xt('View') ?>"><?= $_ITEM->RegistryName ?></a></p>

to

<p class="title"><a href="<? echo _xls_site_url("/gift-search-detail/pg"); ?>?gift_code=<?= $_ITEM->GiftCode ?>" alt="<?php _xt('View') ?>"><?= $_ITEM->RegistryName ?></a></p>

##index.tpl.php

Many changes here due to SEO and Third-party integration. Header has been cleaned up to use controls from Web Store. Keywords are removed (no longer used). og: meta tags used by Facebook, Pinterest added. Structure of document incorrect (body tags out of sequence, etc). Dynamic menu tabs set in Admin panel require removing hard-coded tabs in this file. Flash Messages (alerts to customer) also added so they need to be displayed if they exist.

Change

	<?php
		$meta_desc = _xls_stack_pop('xls_meta_desc');

		if($meta_desc){
	?>
		<meta name="description" content="<?= $meta_desc; ?>">
	<?php
		}
	?><?php
		$meta_keywords = _xls_stack_pop('xls_meta_keywords');

		if($meta_keywords){
	?>
		<meta name="keywords" content="<?= $meta_keywords; ?>">
	<?php
		}
	?><?php
		$redirect = _xls_stack_pop('xls_meta_redirect');

		if($redirect && isset($redirect['url']) && isset($redirect['delay'])){
	?>
		<meta http-equiv="refresh" content="<?= $redirect['delay']; ?>;URL=<?= $redirect['url']; ?>"/>
	<?php
		}
	?>

to

<?php
	$redirect = _xls_stack_pop('xls_meta_redirect');
	if($redirect && isset($redirect['url']) && isset($redirect['delay']))
	echo '<meta http-equiv="refresh" content="'.$redirect['delay'].';URL='.$redirect['url'].'"/>';
?>

Change

<?php global $strPageTitle; ?>
<?php if (isset($strPageTitle)): ?>
		<title><?=  _xls_get_conf('STORE_NAME', _sp('Shopping cart'));   ?> : <?php _xt($strPageTitle); ?></title>
<?php endif; ?>

to

<title><?php echo _xls_stack_get('xls_page_title'); ?></title>
<link rel="canonical" href="<?php echo _xls_stack_pop('xls_canonical_url'); ?>" />

<meta name="description" content="<?php echo _xls_stack_get('xls_meta_desc'); ?>">
<meta property="og:title" content="<?php echo _xls_stack_pop('xls_page_title'); ?>" />
<meta property="og:description" content="<?php echo _xls_stack_pop('xls_meta_desc'); ?>" />
<meta property="og:image" content="<?php echo _xls_stack_pop('xls_meta_image'); ?>" />

<meta name="google-site-verification" content="<?php echo _xls_get_conf('GOOGLE_VERIFY'); ?>" />

Change

<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="<?= templateNamed('css') ; ?>/ie7.css" />
<![endif]-->

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="<?= templateNamed('css') ; ?>/ie6.css" />
<![endif]-->

to

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="<?= templateNamed('css') ; ?>/ie.css" />
<![endif]-->

Change

<?php $this->RenderBegin(); ?>

to

<?php $this->RenderBegin(); ?>
<?php $this->lblSharingHeader->Render(); ?>

Change

<div class="right"><a href="#" <?php $this->pxyLoginLogout->RenderAsEvents() ?>class="loginbox"><?php _xt("Login"); ?></a> &nbsp;|&nbsp; <a href="index.php?xlspg=customer_register"><?php _xt("Register"); ?></a></div>

to

<div class="right"><a href="#" <?php $this->pxyLoginLogout->RenderAsEvents() ?>class="loginbox"><?php _xt("Login"); ?></a> &nbsp;|&nbsp; <a href="<? echo _xls_site_url('customer-register/pg'); ?>"><?php _xt("Register"); ?></a></div>

Change

<div class="text"><div style="margin: 0 105px 0 0; display: block; float: left;"><a href="index.php?xlspg=myaccount"><?= _xt("My Account"); ?></a></div> <?php $this->lblLogout->Render(); ?></div>

to

<div class="text"><div style="margin: 0 105px 0 0; display: block; float: left;"><a href="<? echo _xls_site_url('myaccount/pg'); ?>"><?= _xt("My Account"); ?></a></div> <?php $this->lblLogout->Render(); ?></div>

Change

<a href="index.php">
	<img src="<?php
	 $img =  _xls_get_conf('HEADER_IMAGE' ,  false );

	 if(!$img)
	  $img = templateNamed('images') . '/webstore_installation.png';
	 else{
	  $img = _xls_get_url_resource($img);
	 }
	 echo $img;
	 ?>" />
</a>

to

<a href="<?php echo _xls_site_url(); ?>">
	<img src="<? echo _xls_site_url(_xls_get_conf('HEADER_IMAGE' ,  false )); ?>" />
</a>

Change

<?php $this->menuPnl->Render() ?>

		<div id="nav" class="rounded">
			<ul>
				<li id="products"><a href="index.php" style="border-left: none;"></a></li>
				<li id="newProducts"><a href="<?= _xls_custom_page_url('new') ?>"><?php _xt('New Products'); ?></a></li>
				<li id="topProducts"><a href="<?= _xls_custom_page_url('top') ?>"><?php _xt('Top Products'); ?></a></li>
				<li id="promotions"><a href="<?= _xls_custom_page_url('promo') ?>"><?php _xt('Promotions'); ?></a></li>
				<li id="contact"><a href="index.php?xlspg=contact_us"><?php _xt('Contact'); ?></a></li>
				<li id="search"><?php $this->searchPnl->Render(); ?></li>
			</ul>
		</div>

to

<?php $this->menuPnl->Render(); ?>

	<div id="nav" class="rounded-top">
		<?php
		echo '<a class="productmenu" href="'._xls_site_url().'"><span class="innertab">&nbsp;</span></a>'; //will be covered up by products menu
			foreach ($this->arrTopTabs as $arrTab)
				echo '<a class="tab'.count($this->arrTopTabs).'" href="'.$arrTab->Link.'"><span class="innertab">'.$arrTab->Title.'</span></a>';
		?>
		<div id="searchentry"><?php $this->searchPnl->Render(); ?></div>
	</div>

Change

<noscript>
	<h1>
	<?php  _xt('This store requires you to have Java-Script enabled in your browser.'); ?>
	</h1>
	</noscript>

to (note added FlashMessage line and removed H1)

<?php $this->ctlFlashMessages->Render(); ?>
	<noscript>
	<?php  _xt('This store requires you to have Java-Script enabled in your browser.'); ?>
	</noscript>

Change

	<div class="right">
					<a href="<?= _xls_custom_page_url('about') ?>"><?php _xt('About Us'); ?></a>
					| <a href="<?= _xls_custom_page_url('tc') ?>"><?php _xt('Terms & Conditions'); ?></a>
					| <a href="<?= _xls_custom_page_url('privacy') ?>"><?php _xt('Privacy Policy'); ?></a>
					| <a href="index.php?xlspg=sitemap"><?php _xt('Sitemap'); ?></a>
			</div>
	</div>


	<!-- place google analytics here -->

to

<div class="right">
			<?php
				foreach ($this->arrBottomTabs as $arrTab)
					echo '<a href="'.$arrTab->Link.'">'._sp($arrTab->Title).'</a> |';
				?><a href="sitemap/pg"><?php _xt('Sitemap'); ?></a>
			</div>
	</div>


	<?php $this->lblGoogleAnalytics->Render(); ?>

Remove (will be replaced later in file)

<?php $this->RenderEnd(); ?>

Change

<?php if(_xls_get_conf('DEBUG_TEMPLATE' , false)):  ?>

to

<?php if (_xls_get_conf('DEBUG_TEMPLATE', 0) == 1):  ?>

Change

<?php endif; ?>
	</body>
</html>

to

<?php endif; ?>

<?php $this->lblSharingFooter->Render(); ?>
<?php $this->RenderEnd(); ?>
</html>

##login_box.tpl.php

URL structure change only.

Change

<h1>Login <a href="index.php?xlspg=customer_register" style="font-size: 14px;"><?php _xt('Create an Account') ?></a></h1>

to

<h1>Login <a href="customer-register/pg" style="font-size: 14px;"><?php _xt('Create an Account') ?></a></h1>

##menu.tpl.php

SEO Change to remove bad Alt tag for arrows. Added feature to place Families (brands) above or below product menu with new Admin Panel option.

Change

echo "<img src=\"" . templateNamed('css')  . "/images/arrow-right.gif\" class=\"arrow\" alt=\"Submenu\" /></a><ul>\n";

to

echo "<img src=\"" . templateNamed('css')  . "/images/arrow-right.gif\" class=\"arrow\" /></a><ul>\n";

Change

?>

		<div id="nav_products">

to

function print_families(){

	$strLabel=_xls_get_conf('ENABLE_FAMILIES_MENU_LABEL' , 'By Manufacturer');
	echo '<li><a href="#">'.$strLabel;
	echo '<img src="'.templateNamed('css').'/images/arrow-right.gif" class="arrow" style="margin: 1px 0 0 10px;" alt="'.$strLabel.'" /></a>';
	echo '<ul>';
	$families= Family::LoadAll(QQ::Clause(QQ::OrderBy(QQN::Family()->Family)));
	foreach($families as $family) {
		echo '<li><a href="'.$family->RequestUrl.'/f/">'.$family->Family.'</a></li>';
	}
	echo '</ul></li>';

}
?>

		<div id="nav_products">

Change

<li><a href="javascript:{}"><?php _xt('Products'); ?></a>
					<ul>

to

<li><a href="javascript:{}"><?php _xt('Products'); ?></a>
				<ul>
					<?php if(_xls_get_conf('ENABLE_FAMILIES', 0)==2)
						print_families();
					?>

Change

<?php if(_xls_get_conf('ENABLE_FAMILIES', 1)): ?>
							<li>
								<a href="#"><?php _xt('By Manufacturer'); ?><img src="<?php echo templateNamed('css'); ?>/images/arrow-right.gif" class="arrow" style="margin: 1px 0 0 10px;" alt="Submenu" /></a>
								<ul>
									<?php $families = Family::LoadAll();?>
									<?php foreach($families as $family): ?>
										<li><a href="index.php?family=<?= urlencode($family->Family) ?>"><?= $family->Family ?></a></li>
									<?php endforeach; ?>
								</ul>
							</li>
						<?php endif; ?>

to

<?php if(_xls_get_conf('ENABLE_FAMILIES', 0)==1)
							print_families();
						?>

##minicart.tpl.php

Drag and drop removed in 2.5, changes display message to be dynamic. Minor changes in photo formatting.

Change

<div style="height: 113px; width: 128px; margin: 50px auto 0 auto; padding: 45px 20px 0 12px; text-align: center; color: #666;"><?php _xt("Drag Selections Here"); ?></div>

to

<div style="height: 113px; width: 128px; margin: 50px auto 0 auto; padding: 45px 20px 0 12px; text-align: center; color: #666;"><?php _xt($this->strEmptyCartMessage); ?></div>

Change

<a href="index.php?xlspg=cart" class="review rounded"><?php _xt("Edit Cart"); ?></a>
<a href="index.php?xlspg=checkout" class="gocheckout rounded"><?php _xt("Check Out"); ?></a>

to

<a href="cart/pg" class="review rounded"><?php _xt("Edit Cart"); ?></a>
<a href="<? echo _xls_site_url("checkout/pg");?>" class="gocheckout rounded"><?php _xt("Check Out"); ?></a>

##minigift.tpl.php

URL changes only.

Change

<p style="margin-left:20px;"><A HREF="index.php?xlspg=gift_registry"><?php _xt("Gift Management"); ?></A></p>

to

<p style="margin-left:20px;"><A HREF="<?php echo _xls_site_url("gift-registry/pg"); ?>"><?php _xt("Gift Management"); ?></A></p>

Change

<p style="margin-left:20px;"><A HREF="index.php?xlspg=gift_list"><?php _xt("Gift List"); ?></A></p>

to

<p style="margin-left:20px;"><A HREF="<?php echo _xls_site_url("gift-list/pg"); ?>"><?php _xt("Gift List"); ?></A></p>

Change

<p style="margin-left:20px;"><A HREF="index.php?xlspg=gift_search"><?php _xt("Search"); ?></A></p>

to

<p style="margin-left:20px;"><a ref="<?php echo _xls_site_url("gift-search/pg"); ?>"><?php _xt("Search"); ?></A></p>

##myaccount.tpl.php

URL changes

Change

<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="customer-register/pg"><img src="<?= templateNamed('css/images/btn_edit.png') ?>" onclick="document.location.href='<?= _xls_site_url("customer-register/pg") ?>'" alt="<?php _xt('Edit') ?>"/></a></p>

Change

<td><a href="index.php?xlspg=order_track&getuid=<?php _xt($order->Linkid); ?>"><?php _xt($order->IdStr);?></a></td>

to

<td><a href="order_track/pg?getuid=<?php _xt($order->Linkid); ?>"><?php _xt($order->IdStr);?></a></td>

Change

<a href="index.php?xlspg=gift_registry&registry_id=<?=  $registry->Rowid  ?>"><?=  $registry->RegistryName  ?></a><br/>

to

<a href="<?php echo _xls_site_url("gift-registry/pg"); ?>"><?php _xt('Click here') ?></a> to create a wish list.

Change

<a href="index.php?xlspg=sro_track&dosearch=&zipcode=<?= $repair->Zipcode ?>&orderid=<?= $repair->LsId ?>"><?=  $repair->LsId  ?></a><br/>

to

<a href="<?= _xls_site_url("sro-track/pg") ?>?dosearch=true&emailphone=<?= $repair->CustomerEmailPhone ?>&orderid=<?= $repair->LsId ?>"><?=  $repair->LsId  ?></a><br/>

##offline.tpl.php

Removal of ADMIN_EMAIL config tag, now uses EMAIL_FROM

Change

<h2><?php _xt("Feel free to contact us at"); ?> <strong><?= _xls_get_conf('STORE_PHONE') ?></strong> <?php _xt("or by email at"); ?>  <a href="mailto:<?= _xls_get_conf('ADMIN_EMAIL'); ?>"><?= _xls_get_conf('ADMIN_EMAIL'); ?></a></h2>

to

<h2><?php _xt("Feel free to contact us at"); ?> <strong><?= _xls_get_conf('STORE_PHONE') ?></strong> <?php _xt("or by email at"); ?>  <a href="mailto:<?= _xls_get_conf('EMAIL_FROM'); ?>"><?= _xls_get_conf('EMAIL_FROM'); ?></a></h2>

##order_list.tpl.php

Shouldn't be running URLs through the language translator.

Change

<a href="index.php?xlspg=order_track&getuid=<?php _xt($_ITEM->Linkid); ?>"><?php _xt("View"); ?></a>

to

<a href="<?php echo _xls_site_url("order-track/pg"); ?>?getuid=<?php echo $_ITEM->Linkid; ?>"><?php _xt("View"); ?></a>

Change

 _xt('<br style="clear:both;"/>', false);

to

echo '<br style="clear:both;"/>';

##order_view.tpl.php

Added additional field to show payment reference number.

Change

<?php _xt('Status') ?>: <?php $this->lblOrderStatus->Render() ?>

to

<?php _xt('Status') ?>: <?php $this->lblOrderStatus->Render() ?><br />
<?php _xt('Payment Transaction #') ?>: <?php $this->lblOrderPaymentData->Render() ?>

Change

<br style="clear:both"/>
<?php endif; ?>

to

<br style="clear:both"/>
<?php $this->lblConversionCode->Render(); ?>
<?php endif; ?>

##product_detail.tpl.php

Added new features to enable/disable display of certain elements in display, such as Product Code. Cleaned up HTML tags for better SEO. Now display category in product details.

Change

<div class="product_details border rounded" style="display: block; float: left;">

to

<div class="product_details border rounded">

Change

<h1><?php $this->lblTitle->Render(); ?></h1>
<h2><?= $this->prod->Code ?><!-- <?= $this->prod->Rowid ?>--></h2>

to

<h1><?php $this->lblTitle->Render(); ?></h1>
<?php if(_xls_get_conf('SHOW_TEMPLATE_CODE' , 1)): ?>
 <h2><?= $this->prod->Code ?></h2>
<?php endif; ?>

##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="<?php echo "height: "._xls_get_conf("MINI_IMAGE_WIDTH")."px; width: "._xls_get_conf("MINI_IMAGE_HEIGHT")."px;" ?>"/></a>

to

<a href="#" <?php $_CONTROL->Form->pxyEnlarge->RenderAsEvents($img->Rowid) ?>><img src="<?= Images::GetImageLink($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>

##product_list.tpl.php

Change

<?php if(isset($this->category) && $this->category->ImageExist): ?>
	<div style="float:left; display:inline;">
	<img src="<?= $this->category->ListingImage; ?>" />
	</div>
<?php elseif(isset($this->image) && $this->image): ?>
	<div style="float:left; display:inline;">
	<img src="<?= $this->image; ?>" />
	</div>
<?php endif; ?>

to

<?php if( _xls_get_conf('ENABLE_CATEGORY_IMAGE',0) && isset($this->category) && $this->category->ImageExist): ?>
	<div style="float:left; display:inline;">
	<img src="<?= $this->category->CategoryImage; ?>" />
	</div>
<?php endif; ?>

Change

<?php endif; ?>
<br style="clear:both"/>

</div>
<br style="clear:both"/>
<div id="main_panel" class="rounded">

        <?php $this->dtrProducts->Render(); ?>

        <br style="clear:both"/>


</div>

to (note first two lines are flipped)

<br style="clear:both"/>
<?php endif; ?>
<h1><?php echo _xls_stack_get('override_category') != '' ? _xls_stack_pop('override_category') : $this->category->Name; ?></h1>
</div>

<?php if ($this->dtrProducts->TotalItemCount>0) : ?>
	<div id="main_panel" class="rounded">
    <?php $this->dtrProducts->Render(); ?>
    <br style="clear:both"/>
	</div>
<?php endif; ?>

##product_list_item.tpl.php

Expanded cell to accomodate slashed item, introduced Admin Panel option to turn on/off slashed prices.

Change (this is basically the whole file)

<div class="product_cell">

<h2><a href="<?php _xt($_ITEM->Link); ?>"><?= _xls_truncate(_sp($_ITEM->Name) , 50); ?></a></h2>

<?php $_FORM->render_prod_drag_image($_ITEM) ?>

<div class="product_cell_price rounded"><a href="<?php _xt($_ITEM->Link); ?>"><?= _xls_currency($_ITEM->Price); ?></a></div>
<p> <!--<a href="<?php _xt($_ITEM->Link); ?>"><?php _xt($_ITEM->Code); ?></a --></p>

</div>

to

<div class="product_cell">

<h2><a href="<?php echo $_ITEM->Link; ?>"><?= _xls_truncate(_sp($_ITEM->Name) , 50); ?></a></h2>

<?php $_FORM->render_prod_drag_image($_ITEM) ?>
<?php
if(_xls_get_conf('ENABLE_SLASHED_PRICES' , 0)==2 &&
	$_ITEM->SellWeb != 0 &&
	$_ITEM->SellWeb < $_ITEM->Sell)
	echo '<div class="price_reg">'._sp("Regular Price").' : <strike>'.
		_xls_currency($_ITEM->Sell).'</strike></div>';
	else echo '<div class="price_reg">&nbsp;</div>';
	?>
<div class="product_cell_price rounded"><a href="<?php echo $_ITEM->Link; ?>"><?= _xls_currency($_ITEM->Price); ?></a></div>
<p> <!--<a href="<?php echo $_ITEM->Link; ?>"><?php echo $_ITEM->Code; ?></a --></p>

</div>

##reg_billing_address.tpl.php

Corrected formatting, removed redundant code.

Change

<legend><?php _xt("Billing Address") ?></legend>

to

<legend><span class="red">*</span> <?php _xt("Billing Address") ?></legend>

Change

	<?php if(isset($this->chkSame) && ($this->chkSame->Visible)): ?>
	<dl>
	<dd style="margin-top: 20px;"><?php $this->chkSame->Render() ?></dd>
	</dl>
	</fieldset>
	<?php endif; ?>

to

	<dl>
	<dd style="margin-top: 20px;"><?php $this->chkSame->Render() ?></dd>
	</dl>

</fieldset>

##reg_shipping_address.tpl.php

Moved formatting to CSS file, removed Company field from Shipping since it doesn't get sent to LightSpeed and causes customer confusion. Removed Calculate Shipping button here because it's moved to the shipping widget.

Change

<fieldset style="width:370px;" class="shipping">

to

<fieldset class="shipping">

Change

<?php  if(isset($this->txtCRShipFirstname)):   ?>

		<div class="left margin">
			<dl>
				<dt><label for="First Name"><?php _xt("First Name") ?></label></dt>
				<dd><?php $this->txtCRShipFirstname->RenderWithError(); ?></dd>
			</dl>
		</div>
<?php  endif; ?>

<?php  if(isset($this->txtCRShipLastname)):   ?>

		<div class="left margin">
			<dl class="left">
				<dt><label for="Last Name"><?php _xt("Last Name") ?></label></dt>
				<dd><?php $this->txtCRShipLastname->RenderWithError(); ?></dd>
			</dl>
		</div>
<?php  endif; ?>

to

<?php  if(isset($this->blnShowShippingNames)):   ?>
		<div class="left margin">
			<dl>
				<dt><label for="First Name"><?php _xt("First Name") ?></label></dt>
				<dd><?php $this->txtCRShipFirstname->RenderWithError(); ?></dd>
			</dl>
		</div>

		<div class="left margin">
			<dl class="left">
				<dt><label for="Last Name"><?php _xt("Last Name") ?></label></dt>
				<dd><?php $this->txtCRShipLastname->RenderWithError(); ?></dd>
			</dl>
		</div>
<?php  endif; ?>

Change

<dd><?php $this->txtCRShipZip->Render() ?></dd>

to

<dd><?php $this->txtCRShipZip->RenderWithError() ?></dd>

Remove

	<?php if(isset($this->butCalcShipping) && ($this->butCalcShipping->Visible)): ?>
	<dl>
	<dd style="margin-top: 20px;"><?php $this->butCalcShipping->Render() ?></dd>
	</dl>
	</fieldset>
	<?php endif; ?>

##sidebar.tpl.php

Removed H1 tags since we shouldn't be using that because of SEO. Uses new CSS element instead for formatting.

Change

<h1 class="rounded" style="color: #111;" onclick="$('#<?= $pnl->ControlId ?>_container').slideToggle('slow');"><?= $name; ?></h1>

to

<div class="clickbar rounded" style="color: #111;" onclick="$('#<?= $pnl->ControlId ?>_container').slideToggle('slow');"><?= $name; ?></div>

##sidebar_wishlist.tpl.php

URL structure changes only.

Change

<a href="index.php?xlspg=gift_registry"><strong><?php _xt('My Wish Lists'); ?></strong></a>

to

<a href="<?= _xls_site_url("gift-registry/pg") ?>"><strong><?php _xt('My Wish Lists'); ?></strong></a>

Change

<a href="index.php?xlspg=gift_search"><strong><?php _xt('Find Wish Lists'); ?></strong></a>

to

<a href="<?= _xls_site_url("gift-search/pg") ?>"><strong><?php _xt('Find Wish Lists'); ?></strong></a>

##sro_list_item.tpl.php

URL structure changes, removing running HTML through the translator.

Change

 Status: <span class="<?= $this->sro_status_css($_ITEM->Status); ?>"><?php _xt($_ITEM->Status); ?></span><br/>
 <a href="#" <?php $this->pxySro->RenderAsEvents($_ITEM->Rowid); ?>><?php _xt("View"); ?><a/>

to

Status: <?php _xt($_ITEM->Status); ?><br/>
<a href="<?php echo _xls_site_url('sro-track/pg?dosearch=true&orderid='.$_ITEM->LsId.'&emailphone='.$_ITEM->CustomerEmailPhone); ?>"><?php _xt("View"); ?></a>

Change

_xt('<br style="clear:both;"/>', false);

to

echo '<br style="clear:both;"/>';

##sro_view.tpl.php

Added spacing in SRO display.

Change

<li class="medium left"><?= $repair->Family ?></li>
<li class="large"><?= $repair->Description ?></li>
<li class="medium"><?= $repair->PurchaseDate ?></li>
<li class="medium"><?= $repair->SerialNumber ?></li>

to

<li class="medium left"><?= $repair->Family ?>&nbsp;</li>
<li class="large"><?= $repair->Description ?>&nbsp;</li>
<li class="medium"><?= $repair->PurchaseDate ?>&nbsp;</li>
<li class="medium"><?= $repair->SerialNumber ?></li>

##webstore.css

The changes here are grouped into Additions, Changes and Deletions. Depending on your existing customizations, not all of the changes and deletions will apply. Additions should be done to support new features.

###ADD: (These are all new blocks)

#MainPanel h1 {
margin:30px 0px 5px;
font-size: 14pt;
font-weight: bold;
}


#nav a:hover {
background:url(images/nav_bg_hover.png);
}

#nav .innertab{
		display: table-cell;
		vertical-align: middle;
}
#nav a.productmenu { min-width: 105px; width: 105px; max-width: 105px;}


/* Formatting for automated tabs. Note these do NOT refer to 1st, 2nd, 3rd and 4th tabs */
/* Instead, these are used WHEN there are 4 tabs, or 3 tabs, etc. So #tab4 is used for all */
/* tabs when four are turned on, since width is proportional to the count() */
#nav a.tab1 { width:182px; }
#nav a.tab2 { width:182px; }
#nav a.tab3 { width:142px; }
#nav a.tab4 { width:112px; }
#nav a.tab5 { width:90px; }
#nav a.tab6 { width:75px; }


#searchedge {
border-left:1px solid #adadad;
clear:both;
height:30px;
padding:6px 0px 0 8px;
position:absolute;
margin-left:563px;
width:1px;
}
#searchentry {

clear:both;
height:30px;
padding:6px 0px 0 8px;
position:absolute;
margin-left:564px;
width:199px;
}

.product_detail_image {
text-align: center;
}

.product_cell .price_reg {
padding-bottom: 6px;
}


.flash_message {
display:block;
margin-left: 15px;
margin-right: 15px;
margin-bottom: 20px;
padding: 15px;
font-size: large;
font-weight: bold;
background-color: #FCF0AD;
border: 1px solid #ccaaaa;
}

.shippingbutton {
margin-left: 15px;
margin-top: 25px;
}



.product_details {
display: block;
float: left;
margin-left: 2px;
margin-top: 5px;
width: 762px;
clear: both;
}

#sharingtools {
display:relative;
height: 28px;
margin-top: -26px;
margin-left: 155px;
text-align: right;
width: 280px;
z-index: 1100;
}


#customer_registration input[type='checkbox'],.border input[type='checkbox'],#checkout input[type='checkbox'],.xlsfset input[type='checkbox'] {
color:#444;
height:20px;
padding:2px 4px;
border: 0px none;
}

###ADD: (add to existing blocks)

.product_cell img,.product_cell_image { cursor: hand; cursor: pointer; }
.product_details .price { line-height:1.5; }

###CHANGE

Because these are shorthanded changes within blocks, we have notated the block and the line change, which you will need to locate within the block. (Don't erase the entire block with these changes, in other words, just locate the item that changed.)

For example, below we see the line

#products a { height:22px; } to { height:24px; }

This means that you want to find the full block that shows:

#products a {
background:url();
display:block;
float:left;
height:22px;
width:100px;
}

and make the single line change so your end result looks like

#products a {
background:url();
display:block;
float:left;
height:24px;
width:100px;
}

Nothing else in the block would change.

#header { margin:0 0 20px; } to  { margin:0 0 10px; }
#nav { height:45px; width:765px;} to  {height:36px; width:100%; }
#nav a {
	height:57px;
	overflow:hidden;
	padding:18px 0 12px;
} to
#nav a {
	text-shadow: none;
	display: table;
	height: 36px;
	float: left;
	margin: 0px;
}

#products a { height:22px; } to { height:24px; }
#nav_products { height:45px; margin:4px 0 15px;top:140px;} to  { height:36px;top:128px; left-margin:48px; }

#nav_products a { padding:15px 7px 16px 10px; } to  {margin-left:-3px; padding:15px 0 11px 10px;}

li.search_item to search_item  (removing .li)
li.search_item:hover, ul.autocomplete li.search_selected to search_item:hover, autocomplete search_selected (removing li. and ul.)

#main_panel {margin:-10px 0 15px;} to {margin: 0px 0 15px; }
.product_cell {max-height:190px; height:190px; min-height:190px; } to {max-height:193px; height:193px; }

#sidebar h1 { } becomes #sidebar .clickbar {  font-weight: bold; }  (we're renaming block and adding a line)

#customer_registration fieldset,#checkout fieldset,.xlsfset fieldset { width:717px; } to {width:317px;}

#customer_registration .margin,.border .margin,#checkout .margin,.xlsfset .margin { margin:0 15px;} to {margin:0 5px;}
#checkout legend { margin-top:40px;} to {margin-top:0px; }

.registry_row .invitee_email {display: block; float: left;} to  { } (removing elements)

legend { margin:-26px 0 0 -11px;} to {margin:-6px 0 0 -11px; }

###DELETE: (remove the individual lines from the blocks, not the whole block)

#customer_registration legend,.border legend,.xlsfset legend { margin-left:40px; }

.border,.registry,.cart {margin:0 auto 15px auto; width:764px; }

#nav li { display:inline; list-style:none; width:100%; } DELETE THIS WHOLE BLOCK
Clone this wiki locally