0

I'm developing a template for a website running XCart. I'd like to make it easy for people to change some of the home page content easily without needing to edit any code. Is there way to add configurable options to my template that can be edited in the template options page (in general settings->appearance)?

Vivek
  • 137
  • 1
  • 11

1 Answers1

1

Just insert a record for your option into xcart_config table. You may find a lot of examples of SQL-queries for this in xcart-dir/sql/xcart_data.sql file. The option will be managed automatically by X-Cart on General settings page.

For example: INSERT INTO xcart_config VALUES ('new_option','New option description','option value','Appearance',1000,'numeric','option default value','','uintz');

Then you can use new option in the template as {$config.Appearance.new_option}

classic
  • 544
  • 2
  • 7
  • Thanks, this worked! Sometimes, I have trouble figuring out even the simple things in XCart because I can't find my way around their documentation easily. – Vivek Aug 10 '11 at 19:54