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

fatal error when I click on a subcategory

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-01-2003, 12:50 AM
 
permutations permutations is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 7
 

Default fatal error when I click on a subcategory

First of all, I can't get my subcategories to display on launch. The root has to be clicked, which I don't like. Second, when I click on a subcategory, I get this fatal error:

Fatal error: Smarty plugin error: [in customer/main/subcategories.tpl line 28]: unknown tag - '"Categories"|lower' in /home/permutat/public_html/xcart/Smarty-2.3.0/Smarty.class.php on line 1993

Please tell me how to solve both these problems.
Reply With Quote
  #2  
Old 01-01-2003, 07:15 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Hi,

Was this working out of the box or has it stopped working since you modified the templates?

What version are you running?
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 03-03-2003, 07:05 PM
 
Wanderingp Wanderingp is offline
 

Newbie
  
Join Date: Feb 2003
Location: Tucson, AZ
Posts: 4
 

Default Same error.

The same thing is happening to me at www.wanderingp.com. I have more info on it though. (Or at least what is going on with mine.)

This error:
Fatal error: Smarty plugin error: [in customer/main/subcategories.tpl line 28]: unknown tag - '"Categories"|lower' in /home2/peddler/public_html/Smarty-2.3.0/Smarty.class.php on line 1993

Happens right after I compiled my templates into Emglish and then reloading my customer front-end and clicking on any category. If i restore the templates and reload the customer frontend, it works fine. Compile again, gives the same error. So I know what caused it, just not how to resolve it. Any help would be appreciated.

More info:
ver. 3.3.3
Also, I just reset my host, and reinstalled xcart. same problem.

Thanks,
Scott Steiner
Wandering Peddlers
Reply With Quote
  #4  
Old 03-03-2003, 10:42 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

make sure under Smarty-2.3.0/plugins/ that the file modifier.lower.php exists, if it doesn't, create it and copy paste the following code in it:

Code:
<?php /* * Smarty plugin * ------------------------------------------------------------- * Type: modifier * Name: lower * Purpose: convert string to lowercase * ------------------------------------------------------------- */ function smarty_modifier_lower($string) { return strtolower($string); } ?>
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #5  
Old 03-03-2003, 10:49 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

great call :P
__________________
ex x-cart guru
Reply With Quote
  #6  
Old 03-04-2003, 11:23 AM
 
Wanderingp Wanderingp is offline
 

Newbie
  
Join Date: Feb 2003
Location: Tucson, AZ
Posts: 4
 

Default

That file exists and contains the correct code.
Reply With Quote
  #7  
Old 03-10-2003, 06:59 PM
 
Wanderingp Wanderingp is offline
 

Newbie
  
Join Date: Feb 2003
Location: Tucson, AZ
Posts: 4
 

Default Fixed it!

Ok. So I finally resolved it.

in /customer/main/subcategories.tpl - Basically it put in {"Categories"|lower}. After compiling, it should be "Categories"|lower - no {}. After i took those out its working like a charm.

the code it put in after compiling to English (about lines 24-30):
Code:
<td align=right nowrap><font class=Text> {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } products {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } {"Categories"|lower} {/if} </font></td>

Code that fixed it:
Code:
<td align=right nowrap><font class=Text> {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } products {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } "Categories"|lower {/if} </font></td>

Thanks everyone for all your help!
__________________
----------
Scott Steiner
Wandering Peddler
Reply With Quote
  #8  
Old 03-25-2003, 09:53 PM
 
flytyme flytyme is offline
 

Member
  
Join Date: Feb 2003
Location: Dayton, OH, US
Posts: 22
 

Default

I just encountered the same problem today and used your solution thanks.
__________________
Security is mostly a superstition. It does not exist in nature nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure or nothing. - Hellen Keller
Reply With Quote
  #9  
Old 05-17-2003, 12:00 AM
 
Flatline Flatline is offline
 

Newbie
  
Join Date: Apr 2003
Location: California
Posts: 7
 

Default Re: Fixed it!

[quote="Wanderingp"]Ok. So I finally resolved it.

Thanks again for posting your fix. I had the same situation after compiling to English and your fix fixed it.
__________________
\"I\'d rather have a bottle in front of me than a frontal lobotomy.\" Tom Waits
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 10:03 AM.

   

 
X-Cart forums © 2001-2020