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

Add Array to xcart_config table

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-14-2011, 07:26 AM
 
fwm fwm is offline
 

Advanced Member
  
Join Date: Apr 2011
Posts: 78
 

Default Add Array to xcart_config table

Hi All,

I was wondering is there a way to do this? I have a graphic that I want to appear on a number of my static pages in x-cart. I have a lot of them. SO I would like to add a list of pages such as

page1.html, page2.html, page3.html...

And in a couple of the tpl files I would like to do something like

{if $page_data.filename|in_array($config.Appearance.fw mp_pages)}
display image{/if}

Does anyone have any idea how to do this?

Thanks,
FWM.
__________________
X-Cart 4.1.9
X-Cart 4.4.1
X-Cart Platinum 4.6.1
Reply With Quote
  #2  
Old 12-14-2011, 07:30 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Add Array to xcart_config table

Sure, this can be done. I don't perfectly understand what you want to do, but I can help you initialize a variable and query a table to build your array and load your variable.

I am performing a search for example code, will check back with it in a minute.

-Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 12-14-2011, 08:32 AM
 
fwm fwm is offline
 

Advanced Member
  
Join Date: Apr 2011
Posts: 78
 

Default Re: Add Array to xcart_config table

Thanks for the note,

However I figured out a different way to do the same thing.
__________________
X-Cart 4.1.9
X-Cart 4.4.1
X-Cart Platinum 4.6.1
Reply With Quote
  #4  
Old 12-14-2011, 08:48 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Add Array to xcart_config table

Good deal. For future reference I have found that postauth.php is a great place to initialize site wide custom variables.

-Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
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 06:16 PM.

   

 
X-Cart forums © 2001-2020