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

Template Cache Not Updating

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-07-2009, 01:17 AM
 
jaydee jaydee is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 37
 

Default Template Cache Not Updating

Any changes I make to the templates are not reflected in the website until I empty the templates_c folder.

I've just moved my X-Cart to a new host. On my old host, I could save changes to a template, refresh in my browser and have the changes instantly visible. Now, on my new host, I need to empty the templates_c folder, hence forcing the templates to re-cache, before I can see the changes.

Permissions are 777 on all of /var.

What could be causing this? I couldn't find any similar problem when searching the forum.

Many thanks.
__________________
jd.
-
X-Cart Gold 4.1.9
Red-Hat Server
Reply With Quote
  #2  
Old 02-07-2009, 04:07 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Template Cache Not Updating

Actually this is normal behavior. You can clear the cache by entering cleanup.php in your web browser at the directory where your xcart resides on your server.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 02-07-2009, 04:46 AM
 
jaydee jaydee is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 37
 

Default Re: Template Cache Not Updating

Oh! So every time I make a change to a template file, no matter how small, I should be running cleanup.php?? That seems rather fussy... Perhaps my old server just wasn't set up correctly?

Thanks for your help.
__________________
jd.
-
X-Cart Gold 4.1.9
Red-Hat Server
Reply With Quote
  #4  
Old 02-07-2009, 07:20 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Template Cache Not Updating

Smarty provides a method to increase speed by caching the templates so they do not need to be recompiled. This should NOT be used when you are making changes to your site templates, as no template changes will be recognized while the check is disabled. So if making changes, you will need to ensure this variable is set to "true."

You can enable template caching by opening the file "Smarty.class.php" in your smarty directory and editing this variable to "false":

/**
* This tells Smarty whether to check for recompiling or not. Recompiling
* does not need to happen unless a template or config file is changed.
* Typically you enable this during development, and disable for
* production.
*
* @var boolean
*/
var $compile_check = true;

/**
* This forces templates to compile every time. Useful for development
* or debugging.
*
* @var boolean
*/
var $force_compile = true;
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following 2 users thank JWait for this useful post:
gb2world (06-27-2009), jaydee (02-07-2009)
  #5  
Old 02-07-2009, 04:17 PM
 
jaydee jaydee is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 37
 

Default Re: Template Cache Not Updating

Perfect! Thanks for that. Still not sure what was happening on my old server but at least things are working properly now.

Cheers,
__________________
jd.
-
X-Cart Gold 4.1.9
Red-Hat Server
Reply With Quote
  #6  
Old 02-18-2009, 04:57 PM
 
originalwest originalwest is offline
 

Member
  
Join Date: May 2004
Posts: 23
 

Default Re: Template Cache Not Updating

Got the same problem... but where is "Smarty.class.php" .. and where is the smarty directory
Reply With Quote
  #7  
Old 02-18-2009, 05:35 PM
 
balinor balinor is offline
 

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

Default Re: Template Cache Not Updating

Welcome to the X-Cart forums originalwest ! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:

http://forum.x-cart.com/showthread.php?t=23970

Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your questions correctly. Thanks!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 02-18-2009, 10:20 PM
 
jaydee jaydee is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 37
 

Default Re: Template Cache Not Updating

originalwest,

Your Smarty directory is xcartdir/Smarty-2.6.19/. Your version number may differ and 'xcartdir' is the directory with all your x-cart files.

You'll find Smarty.class.php in this folder.

Cheers,
__________________
jd.
-
X-Cart Gold 4.1.9
Red-Hat Server
Reply With Quote
  #9  
Old 02-19-2009, 10:41 AM
 
originalwest originalwest is offline
 

Member
  
Join Date: May 2004
Posts: 23
 

Default Re: Template Cache Not Updating

mmm... OK

Doesn't look like the Smarty-2.6.19 folder came with the download (4.20) as with earlier versions.

Guess we need that first.
Reply With Quote
  #10  
Old 06-27-2009, 12:31 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Template Cache Not Updating

In 4.2 - the smarty directory is here: /include/lib/smarty
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
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 11:53 AM.

   

 
X-Cart forums © 2001-2020