So I've finally got round to mastering HTML + CSS and my PHP is developing.
I've learnt how to create my own forms, scripts and how to save the data in a DB.
Now I'm looking to start developing within OC.
So I've been looking at the OC and the it's files/code. I've learnt how to create my own custom page so now I can run PHP within my own custom page.
I'm starting to understand the MVC+L structure that OC uses and I'm venturing out into storing and pulling info from the DB.
I've created a table within my DB. Now I want to learn how to query the DB and insert data to it within OC but I have no idea how to do this. I don't understand how to do it using the MVC stucture and I don't know how to get the DB login using OC's variables. If you guys could help me learn I would be extremely grateful.
Thanks,
Keiron
I've learnt how to create my own forms, scripts and how to save the data in a DB.
Now I'm looking to start developing within OC.
So I've been looking at the OC and the it's files/code. I've learnt how to create my own custom page so now I can run PHP within my own custom page.
I'm starting to understand the MVC+L structure that OC uses and I'm venturing out into storing and pulling info from the DB.
I've created a table within my DB. Now I want to learn how to query the DB and insert data to it within OC but I have no idea how to do this. I don't understand how to do it using the MVC stucture and I don't know how to get the DB login using OC's variables. If you guys could help me learn I would be extremely grateful.
Thanks,
Keiron
Last edited by keiron1992 on Sun Feb 02, 2014 9:41 am, edited 1 time in total.
New member
Yes but the model file is not used. I want to enter my own SQL to query and insert data. How do I query the DB using the model and if I create a form how do I insert the data to the DB?
I can do this on its own entering all the DB login details etc but how can I do this within my custom tpl,model and controller?
I can do this on its own entering all the DB login details etc but how can I do this within my custom tpl,model and controller?
New member
You can use $db to query and run the sql and then use the result
Peter here has written more about it here, worth a read
http://stackoverflow.com/questions/1347 ... ncart-guru
If you want to edit existing files, you can also do it using vqmod
Let me hit a PM to you with my skype and I can help you with one flow on how things work
Peter here has written more about it here, worth a read
http://stackoverflow.com/questions/1347 ... ncart-guru
If you want to edit existing files, you can also do it using vqmod
Let me hit a PM to you with my skype and I can help you with one flow on how things work
Donate here to show support if you think I have helped you today!
Opencart Documentation
I've followed this tutorial so far: http://forum.opencart.com/viewtopic.php?t=59542
So now I want to allow customers to submit a comment
I've created a form in the TPL file but what do I put as the action? Normally I would point to another PHP file with DB login (host, db, user, password) etc then grab the POST and save these as variables and insert them to the DB but how do I do this within OC?
So now I want to allow customers to submit a comment
I've created a form in the TPL file but what do I put as the action? Normally I would point to another PHP file with DB login (host, db, user, password) etc then grab the POST and save these as variables and insert them to the DB but how do I do this within OC?
New member
If you can go through this with me on Skype I'd be happy to send some cash your way for the help.nvedia wrote:Let me hit a PM to you with my Skype and I can help you with one flow on how things work
I'll have a read through that now but let me know if you would be willing to give me some training and I'll compensate you for your time.
Thanks,
Keiron
New member
Yeah I'm really going to need your help. It's a useful doc but I need help inserting data to the DB. Please add me, my username is live:keiron1992 or keiron1992@hotmail.com I'm online now.
New member
New member
nvedia has been really helpful so far
If I ever manage to figure this out I will write up a nice tutorial for the beginners here
If I ever manage to figure this out I will write up a nice tutorial for the beginners here

New member
Who the heck is Peter? I wrote that!nvedia wrote:Peter here has written more about it here, worth a read
http://stackoverflow.com/questions/1347 ... ncart-guru

Who is online
Users browsing this forum: No registered users and 120 guests