sivakiran Posted May 9, 2013 Share Posted May 9, 2013 i tried to bridge my application with prestashop to insert into cart using a webservice. iam able to insert into the db but the items are not displayed in the cart in FO Please help me out Link to comment Share on other sites More sharing options...
Andrej Stas Posted May 9, 2013 Share Posted May 9, 2013 (edited) Sorry, there's not enough information to help you out. The more details you provide the more chance of finding the solution. just a quick thought - are those products checked as visible in the back office? Edited May 9, 2013 by Andrej Stas (see edit history) Link to comment Share on other sites More sharing options...
sivakiran Posted May 9, 2013 Author Share Posted May 9, 2013 I have used this service to add products into my cart. <?php ini_set("display_errors",0); define('DEBUG', true); define('DEBUG', true); define('PS_SHOP_PATH', 'http://myplaza.Central.net'); define('PS_WS_AUTH_KEY', 'EOTPGSLHBVKTMJ1B3M9I3WGNGYHLS8EK'); require_once('PSWebServiceLibrary.php'); $psXML = <<<XML <prestashop> <cart> <id/> <id_shop_group>1</id_shop_group> <id_shop>1</id_shop> <id_carrier>1</id_carrier> <id_address_delivery>1</id_address_delivery> <id_address_invoice>1</id_address_invoice> <id_currency>1</id_currency> <id_customer>0</id_customer> <id_guest>10</id_guest> <id_lang>1</id_lang> <recyclable>1</recyclable> <gift>0</gift> <associations> <cart_rows> <cart_row> <id_product>5</id_product> <id_product_attribute>9</id_product_attribute> <quantity>1</quantity> </cart_row> </cart_rows> </associations> </cart> </prestashop> XML; $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $xml = new SimpleXMLElement($psXML); $opt = array( 'resource' => 'carts' ); $opt['postXml'] = $xml->asXML(); $xml = $webService->add( $opt ); ?> They are inserted and visible in the DB but not listed in the cart in front office Link to comment Share on other sites More sharing options...
Recommended Posts