Forum

Thread tagged as: Shop

shop checkout page code

So I am trying to make checkout page for shop. Here are the steps I have followed

  1. create a file pages/checkout.php
  2. 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');
        ?>
  1. create a content page in admin area for checkout with master page "checkout"
  2. 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.

sawan ruparel

sawan ruparel 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

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

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.