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

Assign multiple arrays in var

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-25-2009, 11:58 PM
 
nck-k nck-k is offline
 

Newbie
  
Join Date: Mar 2009
Posts: 8
 

Default Assign multiple arrays in var

Hi,

I am trying to assing multiple arrays to 1 var:

Code:
{assign var=curpath value=$c.categoryid|$ct.parentid|$cat}

Complete code:
Code:
{foreach from=$categories item=ct key=catid} {assign var=catpath value=$ct.categoryid_path} {assign var=curpath value=$c.categoryid/$ct.parentid/$cat} <a href="home.php?cat={$ct.categoryid}" title=" en {$catpath} und {$curpath}">{$ct.category}</a> {if ($ct.expanded || $config.Fancy_Categories.fancy_js eq "Y") && $ct.subcategory_count > 0} <ol> <li>{include file="`$fc_skin_path`/fancy_subcategories_sub.tpl" parent=$ct categories=$ct.childs}</li> </ol> {/if} {/foreach}

i get c.categoryid from another loop, this loop is a part of it.

I want to get a var like: 30/5/2 beacause i need to compare this var with the categoryid_path

This all for the solution of this post:
http://forum.x-cart.com/showthread.php?t=46407
__________________
x-cart gold - 4.1.x
Reply With Quote
  #2  
Old 03-26-2009, 04:23 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Assign multiple arrays in var

Hmmm...
Code:
{capture name=weirdURL}$c.categoryid|$ct.parentid|$cat{/capture}
{if $smarty.capture.weirdURL eq $ categoryid_path}
bla-bla-bla
{/if}

Smarty are not so smart while handling arrays. It's sad but true
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
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 04:05 AM.

   

 
X-Cart forums © 2001-2020