Author |
Topic |
|
niallpm
Starting Member
Ireland
8 Posts |
Posted - July 01 2008 : 07:59:18
|
I need to create 5 new long description fields in the products table.
I've added the fields into the table as data type text (MSSQL)
I've set the parameters for xproductotherfields and xproductothercaptions.
I can see the new fields showing up in the product add/edit screens, but they are only 50 char long, single line textboxes.
I need these form fields to be displayed as large textarea types boxes, preferably with the formatting options that appear for Short Description and Long Description.
Is this possible??? |
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 01 2008 : 09:49:35
|
Hi, yes this is possible and if you are ok with adding code to asp files then this is how you would create the custom extended description fields. (You cannot set memo fields up through the Admin panel)
First you will need to go to Admin panel and remove the entries for xproductotherfields and xproductothercaptions. Make sure you have added the extra fields to the database products table eg exdesc2, exdesc3, exdesc4 and set the data type to memo.
Open file shopa_addproduct.asp in an html or text editor and save a copy (just in case you need to revert back)
Find the following line (260 approx) memexdesc = request.form("memexdesc") Add the following code for each of your new fields: memexdesc2 = request.form("memexdesc2") memexdesc3 = request.form("memexdesc3") memexdesc4 = request.form("memexdesc4")
Then find the following line (530 approx) PCreateRowText "Long Description", "memexdesc", memexdesc,3,"extendeddesc" Add the following code for each of your new fields: PcreateRowText "XXX Description", "memexdesc2", memexdesc2,3,"exdesc2" PcreateRowText "YYY Description", "memexdesc3", memexdesc3,3,"exdesc3" PcreateRowText "ZZZ Description", "memexdesc4", memexdesc4,3,"exdesc4"
(The green highlighted code is the Caption that will appear next to the text field)
Save the file and upload to your server.
Your extra extended decription fields should now be available in the product records.
Hope this helps
Carrol www.deanston-electrical.co.uk
|
|
|
niallpm
Starting Member
Ireland
8 Posts |
Posted - July 01 2008 : 11:30:19
|
Hi Carrol and thanks for that excellent response.
I have done exactly as you said and I do have my extra extended description fields displaying perfectly.
The only problem is that nothing I enter into the new fields is getting stored in the database.
I've looked everywhere to make sure I didn't miss anything, but clearly I have.
Any ideas ????
Thanks
Niall |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 01 2008 : 11:48:27
|
My apologies, I forgot to add the update record part.
In shopa_addproduct.asp find the following line (1071 approx) memexdesc = objrs("extendeddesc") Add the following code for each of your new fields: memexdesc2 = objrs("exdesc2") memexdesc3 = objrs("exdesc3") memexdesc4 = objrs("exdesc4")
Then find this line (2240 approx) pupdatefield "extendeddesc", memexdesc add the following code for each new field: pupdatefield "exdesc2", memexdesc2 pupdatefield "exdesc3", memexdesc3 pupdatefield "exdesc4", memexdesc4
That should update the new fields
Regards,
Carrol www.deanston-electrical.co.uk
|
|
|
niallpm
Starting Member
Ireland
8 Posts |
Posted - July 03 2008 : 04:55:48
|
Thanks once again Carrol.
I've made those code changes exactly as you described and also done a global text search for every example of extended description scripts just to see if I'd missed anything, but for the life of me, I cannot get the content of my new extended description fields to save into the database.
I see that in shop$db.asp there is a reference (around line 1641) to 'memextdesc=objrs("extendeddesc") but this has been remarked out..... I wonder if making a change here might work.... or possibly unbalance the whole system ???
Any thoughts you might have would be greatly appreciated.
Regards,
Niall |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 03 2008 : 06:12:08
|
open shop$db.asp
find following line (109 approx) Dim memExDesc Add the following Dim memexdesc2
then find following line (1660 approx) 'memextdesc=objrs("extendeddesc") below this line add the following memexdesc2 = objrs("exdesc2")
Save the file and upload
If you are using a MySql database you may need to add code to the file shopmysqlsubs.asp. Just let me know
Regards,
Carrol www.deanston-electrical.co.uk
|
Edited by - carfin on July 03 2008 06:12:58 |
|
|
niallpm
Starting Member
Ireland
8 Posts |
Posted - July 03 2008 : 06:33:14
|
Carrol, you are a genius
That is now working perfectly in MSSQL and it really solves a lot of problems for me.
A thousand thank you's for your kind assistance.
Best regards,
Niall |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
|
gnathanson
Starting Member
USA
4 Posts |
Posted - September 07 2008 : 19:11:53
|
Carrol:
Just found this thread on a search, and I have followed it to the letter. Everything works, it's wonderful, saved the day, all that...
But, I have a wierd issue that the data in my new field is not displaying in the simple edit mode. It shows up in the advanced edit field display box.
I'm building the shop for a client, and really need them to be able to edit in Simple.
Help?
Thanks, Gabe. |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - September 08 2008 : 05:14:48
|
Hi Gabe,
sorry but I don't really understand what you mean by Simple Edit Mode. |
|
|
savvymedias
VP-CART New User
191 Posts |
Posted - October 31 2009 : 15:35:54
|
I have fields added... but I am running into issues in display.
How are you calling these new fields to display on the products page? |
|
|
savvymedias
VP-CART New User
191 Posts |
Posted - October 31 2009 : 16:11:36
|
Ok. Finally got it to work. Removed from the xproductotherfields and xproductothercaptions and now everything is good to go. YOU SAVED MY HAIR! |
|
|
|
Topic |
|