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

Showing location where u are!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-28-2005, 01:12 PM
  Owl's Avatar 
Owl Owl is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: Sweden
Posts: 92
 

Default Showing location where u are!

I have a lil problem, I want to show on a big <h1> head line where people are, for instance if they are in a category, it will show <h1>Categoryname</h1> and if in a product <h1>Productname<h1> and so on and so on.... for manufacturers also and all the sites
I tried looking into the location.tpl list for the last url there but i couldn't solve it! :/ I think this is already built in within x-cart but im not sure.

{$product.productcode} ? prehaps and all other things like that.. i dunno =)
__________________
-----------------------------------
4.2 rox...

http://www.fivestar.nu | www.nystil.se | www.hidealite.se
Reply With Quote
  #2  
Old 04-28-2005, 02:17 PM
 
balinor balinor is offline
 

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

Default

You are correct, you need to play around with location.tpl.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-28-2005, 11:22 PM
  Owl's Avatar 
Owl Owl is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: Sweden
Posts: 92
 

Default Yah

Yah, I know but hmm i wounder where from the variable $title is coming from, so i can steer what should be in the title and use that variable
__________________
-----------------------------------
4.2 rox...

http://www.fivestar.nu | www.nystil.se | www.hidealite.se
Reply With Quote
  #4  
Old 04-29-2005, 03:17 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

Hi Owl,

You can try this,

Code:
{strip} {section name=position loop=$location} {if %position.last%}{$location[position].0|escape} {else} {/if} {/section} {/strip}

I'm not sure if its exactly what you want, but your welcome to try it.
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote
  #5  
Old 04-29-2005, 03:19 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

With the H1 tag it would look like this.

Code:
{strip} {section name=position loop=$location} {if %position.last%}<H1>{$location[position].0|escape}</H1> {else} {/if} {/section} {/strip}
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote
  #6  
Old 04-29-2005, 03:37 AM
  Owl's Avatar 
Owl Owl is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: Sweden
Posts: 92
 

Default

Yah that would do it, thanks =)
__________________
-----------------------------------
4.2 rox...

http://www.fivestar.nu | www.nystil.se | www.hidealite.se
Reply With Quote
  #7  
Old 04-29-2005, 08:04 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default

Sure would be nice if Xcart would release a kind of API for a lot of the big variables that are passed from PHP to Smarty.

like the location, I think it's an array, but how is it organized. I'm sure we could hack it, but it would be nice if they just gave a little description what is in there. Subcategories are another.

Maybe we could start a thread that explains these variables?
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote
  #8  
Old 04-29-2005, 10:28 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

Quote:
Sure would be nice if Xcart would release a kind of API for a lot of the big variables that are passed from PHP to Smarty.

I'm hearin' that.... although surely that would make life too easy and mean less custom-mod revenue for XC?!

Cynical, i know.... But i'm likely to commission a mod with XC, as I can't work out how to re-use the product_links variable that's assigned to Smarty. An API wouldn't be the be-all and end-all of problems like this, but IMHO, it would certainly make things a bit easier....
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
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:58 PM.

   

 
X-Cart forums © 2001-2020