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)
-   -   Custom Smarty Objects (https://forum.x-cart.com/showthread.php?t=55125)

inteliboy1 08-17-2010 08:12 PM

Custom Smarty Objects
 
Need a little help with smarty/x-cart though not sure how to search for this┘ it's somewhere between a mod and basic template hacking...


Basically I need to create a new smarty object and be able to define it's variable in the admin. Allowing for custom text and link fields to be used.

So for example-
* $newobject field created in database
* Use {$newobject} in a tpl file
* Assign $newobject a line of text on the admin (in this case I already have a blank custom 'banners' page in the admin ready to go)

Any pointers to do this? I have a php developer I could call but trying to learn a lot myself.

Shamun 08-18-2010 12:24 AM

Re: Custom Smarty Objects
 
Depends on where you want it in the admin.

If you want it in general settings then all you need to do is put the new row into the config table and you'll be able to use {$var} on templates and it'll automatically appear in the settings area.

cflsystems 08-18-2010 02:45 AM

Re: Custom Smarty Objects
 
Or you can just define new language variable so no files or tables have to be modified


All times are GMT -8. The time now is 02:51 PM.

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