Post by Adi09 » Sat Aug 27, 2016 5:04 pm

Hello!
I want to make forms on cart page (name, address and number phone). I make that, but when I clicked on confim, it display :

Code: Select all

Fatal error: Uncaught exception 'Exception' with message 'Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Bushnell Full Metal Banner Dusk & Dawn Telescope','Bushnell',1,TK 7500.00,TK 75' at line 2<br />Error No: 1064<br />insert into ocbp_order_product(order_id,product_id,name,model,quantity,price,total) values(17,,'Bushnell Full Metal Banner Dusk & Dawn Telescope','Bushnell',1,TK 7500.00,TK 7500.00)' in /home/***/public_html/system/library/db/mysqli.php:40 Stack trace: #0 /home/**/public_html/system/library/db.php(16): DB\MySQLi->query('insert into ocb...', Array) #1 /home/**/public_html/catalog/controller/checkout/cart.php(1068): DB->query('insert into ocb...') #2 [internal function]: ControllerCheckoutCart->insert() #3 /home/**/public_html/system/engine/action.php(51): call_user_func_array(Array, Array) #4 /home/**/public_html/catalog/controller/startup/router.php(25): Action->execute(Ob in /home/**x/public_html/system/library/db/mysqli.php on line 40
How to fix it?

Newbie

Posts

Joined
Sun Aug 21, 2016 6:41 pm

Post by IP_CAM » Tue Aug 30, 2016 7:44 am

at best, by learning on, how OpenCart is built, to function, by the MVC(L) - Framework Structure.
Then, you'll find out, that this is no simple HTML style-like Setup, where one is able, to add a couple of
Lines on a Source, to create some additional fields in a Form, or somewhere on screen. :D
Exept for errors, by nature of things...
---
http://docs.opencart.com/developer/module/
---
http://code.tutsplus.com/tutorials/from ... -cms-21627
---
https://www.google.ch/search?q=OpenCart+MVC-L
---
If you want to find out, study some simple VqMod's, on, how they are built,
to find out, wich related controller/... , language/..., and evtl. model/... /whatever.php
File is related/involved to/in the (usually name- (and mostly sub/-) matching!) view/theme/... /whatever.tpl
File Functions, you want to modify in any form.
---
And depending on what you are trying to achieve, don't forget, to modify/add-to the ADMIN Section
accordingly, to make it work, editable, and visible or data-wise, otherwise, it cannot be Admin handled and/or edited.

Good Luck ! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 11 guests