Adding a "listing preview" step in checkout
Hi, i want to add a custom step in the checkout to let customers see a preview of their listing before placing the order.
The tutorial "Adding a Step to Checkout" was very helpful so far but i can't find a solution to my problem.
How can i add a button to get to the next step in the checkout?
Thanks in advance!
This is my custom class so far:
class CustomCheckoutPreviewStep extends APP_Listing_Step {
public function __construct( APP_Listing $listing, $step_id = 'preview-listing', $args = array() ) {
$this->listing = $listing;
$args = array(
'register_to' => array(
"{$this->listing->get_type()}-new" => array( 'after' => 'create-order' ),
"{$this->listing->get_type()}-renew" => array( 'after' => 'create-order' ),
),
);
parent::__construct( $listing, $step_id, $args );
}
function display($order, $checkout) {
//display preview
}
function process($order, $checkout) {
//do something
}
}