Forum
shop checkout page code
So I am trying to make checkout page for shop. Here are the steps I have followed
- create a file pages/checkout.php
- place header and footer layout and below code in middle
<?php
// Show the cart with a non-interactive template
perch_shop_cart([
'template'=>'cart/cart_static.html'
]);
// Show the order addresses
perch_shop_order_addresses();
// Show the payment form
perch_shop_payment_form('stripe');
?>
- create a content page in admin area for checkout with master page "checkout"
- front end go to domain.com/checkout
I see static shopping cart with pay now button.
I was expecting checkout progress, i.e. I want customer to enter shipping address or select from list of address on file. I guess I am trying to find out how to get standard flow of checkout
Let me know if I am doing wrong or missing anything.
There's a detailed example of how to use the Stripe checkout process on the page in the documentation: https://docs.grabaperch.com/addons/shop/gateways/stripe/
I am not trying to use stripe yet. I am trying to build checkout pages (i.e. address input, address select, order confirmation, and then pay now link.
I can see cart, and i have checkout now, button that takes me nowhere right now
Perhaps look at the flow on the Nest demo site:
https://github.com/PerchCMS/perchdemo-nest/tree/master/public_html/perch/templates/pages/shop
This https://github.com/PerchCMS/perchdemo-nest/tree/master/public_html/perch/templates/pages/shop is very very helpful. I don't know why I could not find it anywhere before.