X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   fatal error when I click on a subcategory (https://forum.x-cart.com/showthread.php?t=1083)

permutations 01-01-2003 12:50 AM

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.

funkydunk 01-01-2003 07:15 AM

Hi,

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

What version are you running?

Wanderingp 03-03-2003 07:05 PM

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

B00MER 03-03-2003 10:42 PM

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);
}

?>


funkydunk 03-03-2003 10:49 PM

great call :P

Wanderingp 03-04-2003 11:23 AM

That file exists and contains the correct code.

Wanderingp 03-10-2003 06:59 PM

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!

flytyme 03-25-2003 09:53 PM

I just encountered the same problem today and used your solution thanks.
:)

Flatline 05-17-2003 12:00 AM

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.


All times are GMT -8. The time now is 06:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.