Jump to content

how to create new fields in home text editor and insert the values in database


anil.adodis@gmail.com
 Share

Recommended Posts

HI i need to display extra info on my home page so i have added 2 new fields in my Home Text Editor Module thru editorial.php page and i have manually created separate DB table in my prestashop database. now iam getting that fields displayed in my Back Office Home Text Editor Module but am unable to insert the data in to my table i have written insert code just like used for other field s but am failed to insert the datas . Can any one suggest me the code for doing this and in which corresponding pages i should make changes .THANKS IN ADVANCE. iam using Prestashop version 1.4.1.

Share this post


Link to post
Share on other sites

Hi
I have added two extra field in home text editor (i.e. editor module)
download the attached zip file and extract copy EditorialClass.php and editorial.php in module->editorial folder

uninstal your module from admin pannel and then reinstall the module. It will automatically add two field in database table editorial_lang and two text field in the page .
for your security reason backup your editorial module

I hope your problem will resolve now
these are applicable above prestashop 1.4+

editorial.zip

Share this post


Link to post
Share on other sites

Thank you very much Mr Vivek Kumar Tripati for responding soon with a error free code for my problem. I need to further disturb you by asking one single query that the new fields 'body_newfield1' 'body_newfield2' i entered in the Home Text Editor Module can be stored in a new table rather than existing table if yes can u pls provide me the code for that bcos i have tried this in the same manner (100% no change !!!) u have done it in this files u have sent but tried to add it with different table but failed i think u can help me out in this manner. Any How thanks A Response Means a Lot....
Anil
Bangalore

Share this post


Link to post
Share on other sites

Hi Anil

I am sending new files
I hope which will meet you requirement in this file a seprate table name new_test is being created and value of two fields(new field1, new field2) will be stored in that for each language option
you can get the these value from that table while displaying in front office

editorial.zip

Share this post


Link to post
Share on other sites

Hi Mr Vivek. Today i have come up with new query i think u can solve my problem easily. Thing is that i need to add a youtube video in my product page like in i can add videos in Home page thru Home Text Editor option. if there ia any option like that please tell me in steps to resolve my problem. Thanks in Advance Anil.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More