lundi 5 octobre 2015

Skip the Order page in Woocommerc

I have a site and I want the one page checkout site. alphamaxis.com this is my site when I have click on the Rush my Order then I have one more step on which step order id generating. But I want that when user click on home page Rush my order button then it redirect to checkout page. On home page I am using contact form and storing all the value into session and then use user information for billing address. Hope this make sense.

Following code I am using:

$_SESSION['rnd_user']=$_POST;
$product_id = 209;
$woocommerce->cart->empty_cart();
if ($woocommerce->cart->get_cart_contents_count() == 0) {
    $woocommerce->cart->add_to_cart($product_id);
}
wp_redirect($_POST['success_url']);

hope this make sense. Any help will appreciate. Thanks in advance . Looking forward for your positive and quick reply.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire