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)
-   -   Add Array to xcart_config table (https://forum.x-cart.com/showthread.php?t=62019)

fwm 12-14-2011 07:26 AM

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.

totaltec 12-14-2011 07:30 AM

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

fwm 12-14-2011 08:32 AM

Re: Add Array to xcart_config table
 
Thanks for the note,

However I figured out a different way to do the same thing.

totaltec 12-14-2011 08:48 AM

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


All times are GMT -8. The time now is 11:56 AM.

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