Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

pages and page numbers

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-21-2005, 04:45 AM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default pages and page numbers

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} &lt;&lt;{*** 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} &gt;&gt;{*** 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
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote
  #2  
Old 06-30-2005, 06:06 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Still having issues or did you get this fixed?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-30-2005, 06:12 PM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

Thanks for the reply,

Yes with some help from the smarty forum I was able to find out that it was because the host was running an old version of PHP

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=5583&highlight=

I got the host to switch servers to a more up-to-date one.

Things are working just as I had hoped now.

Justin
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote
  #4  
Old 06-30-2005, 06:14 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Excellent...sorry I didn't get a chance to respond sooner, not many other people answering posts around here anymore
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:24 PM.

   

 
X-Cart forums © 2001-2020