| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding custom fields of type text | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Adding custom fields of type text
I need the ability to create additional custom fields which can be edited (as per the detailed description) with the WYSIWYG editor.
Which table should I add the additional fields to? Bear in mind that they need to be of type TEXT so cannot be added directly by X-Cart in the extra fields table. I thought of adding them to the same table holding the detailed description field? Presumably I should be able to use similar Smarty code that handles the Product detailed description field?
__________________
John Legg www.TheDebugStore.com 5.4.1.18 Business, Crisp White Skin Template Backorder-Preorder Module X-Cart to Zoho Creator (in progress) Zoho Creator <-> Zoho Inventory for order processing NGINX hosted - XC virtual server |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Adding custom fields of type text
I've done this in the past - You'll first need to create the custom fields within the xcart_products table.
Then some code edits are required within certain .php & .tpl files. Have a look at this youtube video, it should point you in the right direction - http://www.youtube.com/watch?v=-7ESOW0pKU4
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Adding custom fields of type text
Thanks
I had a feeling that the fields needed to be added to the table xcart_products_lng_en. This table contains the descr and fulldescr fields of type text and it would allow me then to modify the fields for language variants in the future. The table xcart_products table in its default state does not seem to contain any text fields, just varchar(255) fields. I am sure there is a goods reason for this? I was thinking that if I placed the fields in the xcart_products_lng_en table, I would be able to use similar php code and tpl smarty code as the description fields to process the new fields. Maybe I am worrying too much.
__________________
John Legg www.TheDebugStore.com 5.4.1.18 Business, Crisp White Skin Template Backorder-Preorder Module X-Cart to Zoho Creator (in progress) Zoho Creator <-> Zoho Inventory for order processing NGINX hosted - XC virtual server |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Adding custom fields of type text
I guess xcart_products_lng_en is the logical place to create the fields if you are creating an multilingual site.
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
|
|||
X-Cart forums © 2001-2020
|