brianbrey
Member
Posted 8 months ago #
We are attempting to pass the product_sku through to the gateway (we used the sample gateway as the base). The Merchant we are using is NMI (custom developed gateway for wp e-commerce).
The desired format is:
product_sku_1=sku number
product_sku_2=sku number
product_sku_3=sku number
etc.
Any help would be greatly appreciated. This has been a few days of frustration coding and and 3 attempts at finding help on getshopped.org forums). Not an easy place to get help.. :(
THANK YOU
http://wordpress.org/extend/plugins/wp-e-commerce/
brianbrey
Member
Posted 8 months ago #
I tried this but didn't have any luck..
$data['product_sku_'.$i] = $item['sku'];
It's difficult to say without understanding how you've got the cart data in your merchant file. If you have a $wpsc_cart_item object, then the SKU is held as $wpsc_cart_item->sku.
brianbrey
Member
Posted 8 months ago #
thanks so much for the response.
I used the instructions at link to create the gateway. I see the $wpsc_cart being used, but not the $wpsc_cart_item object.
This code (From the link you posted)
foreach($wpsc_cart->cart_items as $i => $Item) {
Loops through each item in the cart, and $Item will be set to a wpsc_cart_item object, so $Item->sku should work...
brianbrey
Member
Posted 8 months ago #
excellent.. This helps a great deal..
Thanks so much!