intense Posted February 27, 2011 Share Posted February 27, 2011 Hi, I'm developing a programm which will parse XML files and add products from that file (or update them) into prestashop.If I will select category from the menu and some product after that from the list, it will normaly display it so everythink is OK.But now, if I select some product from the "New products" or "Featured products" section or by clicking hotlink it will throw me a Fatal error but URL's are same.I found that I can enable backtrace so here is it: http://pastebin.com/RKYLBtUYAnd here is a screenshot that explain what I mean: http://www.upnito.sk/0/jjee2szpmdzs2qyzyxzkawedm2e965ge.pngI cannot provide source code of the parser because it's closed source but I can provide mysql queries which I'm using to import products into prestashop. Here they are:insert into ps_product (id_manufacturer,quantity,price,wholesale_price,reference,supplier_reference,active,date_add,date_upd,id_tax) values (?,?,?,?,?,?,1,now(),now(),0) <-inserting productselect id_product from ps_product where reference=? and supplier_reference=? <-getting product idinsert into ps_product_lang (id_product,id_lang,description,link_rewrite,name) values (?,?,?,?,?) <-inserting description, name and link rewriteinsert into ps_category_product (id_category,id_product) values (1,?) <--- inserting into default categoryinsert into ps_category_product (id_category,id_product) values (?,?) <--- inserting into categoryHave I missed somethink or where is problem? (I don't know php so I don't understand that backtrace very well)Sorry for my English and thanks for help. :-) Link to comment Share on other sites More sharing options...
intense Posted February 27, 2011 Author Share Posted February 27, 2011 Problem solved. I'm stupid, I forget to insert data into id_category_default column :-) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now