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

Dollar Sign in Smarty

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-14-2005, 11:31 AM
 
Steele Steele is offline
 

Member
  
Join Date: Feb 2005
Posts: 10
 

Default Dollar Sign in Smarty

Hi all,
How can I compare a string containing dollar sign in smarty?

This:
{if $variable eq "From $79 to $89"}
does not work.

I tried back ticks:
{if $variable eq "From `$`79 to `$`89"}
and also back slashes, but that does not work either.

The string never matches...

Any idea?

Thanks.
__________________
Version 4.0.10
Reply With Quote
  #2  
Old 09-14-2005, 12:41 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

what is it your trying to do ?
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 09-14-2005, 12:51 PM
 
Steele Steele is offline
 

Member
  
Join Date: Feb 2005
Posts: 10
 

Default

I'm trying to place some headers in left categories menu on www.mr-roses.com/home.php

I edited the /skin1/customer/categories.tpl file like this:

Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} {section name=cat_num loop=$categories} {if $categories[cat_num].category eq "50 Roses"} <div id="cat_head">Shop by Quantity</div> {/if} {if $categories[cat_num].category eq "Choose by color"} <div id="cat_head">Shop by Color</div> {/if} {if $categories[cat_num].category eq "Roses by stem length"} <div id="cat_head">Shop by Stem Length</div> {/if} {if $categories[cat_num].category eq "From `$`79 to `$`89"} <div id="cat_head">Shop by Price</div> {/if} {if $categories[cat_num].category eq "Calendar Events"} <div id="cat_head">Shop by Occasion</div> {/if} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

It works fine as you can see, except that "Shop by Price" label.

Thanks.
__________________
Version 4.0.10
Reply With Quote
  #4  
Old 09-14-2005, 05:28 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

just use the variable $cat instead and match it with the category id number
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
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 01:17 PM.

   

 
X-Cart forums © 2001-2020