<input type=”hidden” value=”<?php echo wpsc_the_product_id(); ?>” name=”product_id”/>
wp-e-commerce/wpsc-theme/wpsc-products_page.php
Earlier this wpsc_the_product_id()
function was getting the correct product id from database i.e 13
but now it is getting 2343
and many more
2364 <-> 15
2369 <-> 16
2371 <-> 17
could anybody please help
Thanks
I found that 2364 is a post id of the product from table wp_posts . In new version of wp-e-commerce I haven’t found this file wpsc-includes/wpsc-query.php . may be thats why wpsc_the_product_id() is getting the_get_Id() i.e post id from product-template.php instead of using wpsc_query.php . I’m confused now .
Please help
Thanxs
In regards to your payment gateway integration, you should never be touching the database directly to get the product_id, but the $wpsc_cart global containing the product. The product ID is going to be the post_ID, as products are custom post types, stored in the wp_posts table.
There is some limited documentation on creating your own payment gateway here –
http://getshopped.org/resources/docs/get-involved/writing-a-new-payment-gateway/
However, the best thing to do would probably be to look at authorize.net, learn what each method is doing, and apply the Helcim API to each of those methods in a new payment gateway file.
thanxs Justin Sainton ,
everything is going good except one thing , when I click on checkbox on cart page(Shipping Address same as Billing Address?) then $wpsc_cart->cart_items gets empty thats why transaction fails but without clicking on that checkbox everything goes fine . Thats why I was getting that error what I had mentioned in my first post .
It’s going to be quite difficult to help you without some further consultation – I can assure you, though, checking Shipping same as Billing doesn’t cause that result with any of the other gateways I’ve used personally, so it’s got to be something in the gateway, theme, or another plugin conflicting.
I’d be happy to help if you want to shoot me an email.
Alternatively, any of the consultants at http://getshopped.org/resources/wp-consultants/developers/ could likely help.
I have found one thing , when I check that checkbox it post data using jquery to another page
var data = {
action: ‘wpsc_shipping_same_as_billing’,
wpsc_shipping_same_as_billing: true
};
jQuery.post(wpsc_ajax.ajaxurl, data, function(response) {
});
and wpsc_shipping_same_as_billing:false when I uncheck the checkbox . But in both cases its response is 0 . I’m unable to figure it out that why this is being used, so would there be any kind of trouble if I comment this out because after commenting this everything is working fine.
and sir it would be my pleasure to have any kind of support from you .
this is my email id vipul.netpyx@gmail.com
Thanks