Hi Justin
Thank you for yo answer.
I solved this issue in this way.
In my project the things bought are services and these are adquired from pages (my website is not a classic shop).
I have customized the wpsc-shopping_car_page.php and now it works with parameters (action and value):
my-checkout.php?action=buy_service_1&item_id=2
The code reads the params and loads one specific product to the cart and then the process associates the item id with wpsc product in this way:
$wpsc_cart->empty_cart(false);
$parameters = array('quantity' => 1, 'item_meta' => array ('my_item_id' => $_GET["item_id"]));
$wpsc_cart->set_item( $global_contract_service_prodid, $parameters, true);
But now I am in problems in the next step.
I working with paypal (sandbox mode), and when I do the checkout process with a test paypal account, when I finish the process the “processed” value of the purchase log is 1 (INCOMPLETE_SALE), I don’t know why. I use this to check that the order was payed by the customer after paypal process to show my things in relation to the item.
$sessionid = $_GET['sessionid'];
$purchase_log = new WPSC_Purchase_Log( $sessionid, 'sessionid' );
$purchase_log->is_accepted_payment() => false
$purchase_log->is_incomplete_sale() => true
Do you think that this value is because I am using the test environment of paypal?
Thanks you very much.
UDPATED:
Ok. I am working in localhost with my domain binded to 127.0.0.1 in localhost file. I think that the IPN of Paypal does not works in this scenario.
Do you know something about this?