I'm currently transfering stores between hosts with a custom template that I built last year.
Everything looks good on the old site, but it's running incrediblly slow, especially updating products, thus the server switch.
The page numbers on the old site worked as I thought they should but on the new site I'm getting huge numbers of pages that don't exists. The template and php files were a direct copy from the working store, and everything else seems to be working fine.
This is X-cart 4.0.5 on linux
original page:
http://yarnsmith.co.uk/xcart/home.php?cat=3 (slow)
new page:
http://160.79.206.160/xcart/home.php?cat=3
(I am currently returning the values for all the smarty page number variables for reference)
My process on the transfer to the new server was this...
Create new database
upload with phpmyadmin
copy xcart files
manually update the config file
manually update the auth.php with new path
backup old site from xcart admin
find and replace all old local server path names with the new ones
go into the new xcart admin and restore the database
It seemed to work just fine... other than this strange problem.
Any ideas?
my navagation.tpl file looks like this
Code:
{* $Id: navigation.tpl,v 1.14 2004/06/24 13:09:51 max Exp $ *}
{if $total_pages gt 2}
Total Pages: {$total_pages}
Start Page: {$start_page}
navigation_page: {$navigation_page}
total_pages: {$total_pages}
total_super_pages: {$total_super_pages}
current_super_page: {$current_super_page}
start_page: {$start_page}
{section name=page loop=$total_pages start=$start_page}
{if %page.first%}
{if $navigation_page gt 1}
<<{*** Beginning Arrow ***}
{/if}
{/if}
{if %page.index% eq $navigation_page}
{if %page.index% eq %page.last%}
{%page.index%}{*** Current Page is Last Page ***}
{else}
<span class="current_page_number">{%page.index%}</span> •{*** Current Page ***}
{/if}
{else}
{if $navigation_page eq %page.last%}
{%page.index%}{*** Last Additional Page ***}
{else}
{%page.index%} •{*** Additional Pages ***}
{/if}
{/if}
{if %page.last%}
{math equation="pages-1" pages=$total_pages assign="total_pages_minus"}
{if $navigation_page lt $total_super_pages*$config.Appearance.max_nav_pages}
>>{*** Ending Arrow ***}
{/if}
{/if}
{/section}
{if $current_super_page lt $total_super_pages}
[img]{$ImagesDir}/rarrow_2.gif[/img]
{/if}
{/if}
and navigation.php looks like this though I didn't modify it
Code:
#
# $Id: navigation.php,v 1.14 2004/03/05 07:03:25 svowl Exp $
#
if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }
if (empty($page)) $page=1;
$first_page = $objects_per_page*($page-1);
#
# $total_super_pages - how much groups of pages exists
#
$total_super_pages = (($total_nav_pages-1) / ($config["Appearance"]["max_nav_pages"] ? $config["Appearance"]["max_nav_pages"] : 1));
#
# $current_super_page - current group of pages
#
$current_super_page = ceil($page / $config["Appearance"]["max_nav_pages"]);
#
# $start_page - start page number in the list of navigation pages
#
$start_page = $config["Appearance"]["max_nav_pages"] * ($current_super_page - 1);
#
# $total_pages - the maximum number of pages to display in the navigation bar
# plus $start_page
$total_pages = ($total_nav_pages>$config["Appearance"]["max_nav_pages"] ? $config["Appearance"]["max_nav_pages"]+1 : $total_nav_pages) + $start_page;
#
# Cut off redundant pages from the tail of navigation bar
#
if ($total_pages > $total_nav_pages)
$total_pages = $total_nav_pages;
if ($page > 1 and $page >= $total_pages) {
$page = $total_pages - 1;
$first_page = $objects_per_page*($page-1);
}
$smarty->assign("navigation_page", $page);
$smarty->assign("total_pages", $total_pages);
$smarty->assign("total_super_pages", $total_super_pages);
$smarty->assign("current_super_page", $current_super_page);
$smarty->assign("start_page", $start_page + 1);
Thanks for any help that can be offered!
Justin