oohoohoohooh
Programmer
Hi, I'm trying to setup my own amazon web service shopping cart. To do this I need some way of storing some of the information related to the cart and the user so I figured I would use sessions. In my file I put:
This creates a file in the tmp directory with the following contents:
So it seems to me all is working now but when you go to another page you get the results:
I'd appreciate if you could help. Thanks
Code:
session_start();
$xml = simplexml_load_file('[URL unfurl="true"]http://webservices.amazon'[/URL] . get_tld($locale_id) . '/onca/xml?Service=AWSECommerceService&SubscriptionId=' . $subscription_id
. '&AssociateTag=' . $associate_id . '&Operation=CartCreate&Item.1.ASIN=' . $iid . '&Item.1.Quantity=1');
$_SESSION['cart_id'] = $xml->Cart->CartId;
$_SESSION['hmac'] = $xml->Cart->HMAC;
$_SESSION['purchase_url'] = $xml->Cart->PurchaseURL;
This creates a file in the tmp directory with the following contents:
Code:
cart_id|O:16:"SimpleXMLElement":1:{i:0;s:19:"103-3188198-4511023";}
hmac|O:16:"SimpleXMLElement":1:{i:0;s:28:"9FrJnwmBFuekmBzRzauXonTb6KM=";}
purchase_url|O:16:"SimpleXMLElement":1:{i:0;s:194:"[URL unfurl="true"]https://www.amazon.com/[/URL]
gp/cart/aws-merge.html?cart-id=103-3188198-4511023%26associate-id=
punkcentre-20%26hmac=9FrJnwmBFuekmBzRzauXonTb6KM=%26SubscriptionId=
1M0SJ059ZJVGYB9B0Z82%26MergeCart=False";}
So it seems to me all is working now but when you go to another page you get the results:
Code:
PHP Warning: session_start() [function.session-start]: Node no longer exists in C:\[URL unfurl="true"]wwwroot\star[/URL] buyer\common.php on line 58 PHP Warning: session_start() [function.session-start]: Node no longer exists in C:\[URL unfurl="true"]wwwroot\star[/URL] buyer\common.php on line 58 PHP Warning: session_start() [function.session-start]: Node no longer exists in C:\[URL unfurl="true"]wwwroot\star[/URL] buyer\common.php on line 58 PHP Warning: Unknown: Node no longer exists in Unknown on line 0 PHP Warning: Unknown: Node no longer exists in Unknown on line 0 PHP Warning: Unknown: Node no longer exists in Unknown on line 0
I'd appreciate if you could help. Thanks