Jump to content

Unable to view my cart items in PS 1.5.2


Recommended Posts

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

×
×
  • Create New...