LemonStand Documentation

shop:checkout_order_review

The shop:checkout_order_review action is designed for creating the Order Review page.  The Order Review page is the last step of the conventional step-by-step checkout process. Usually this page displays full information about the order and has the Place Order button. Please read the generic description of the step-by-step actions in the Step-by-step checkout actions article.

You can create the Place Order button using a submit input element with the "submit" name. The button will send data in a regular POST mode. If you want to create an AJAX-driven Place Order button or link, use the shop:on_checkoutPlaceOrder handler, described in the Supported AJAX handlers section below. Independently of a selected method (POST or AJAX), the user browser will be redirected to a payment page (i.e. a page which has the shop:pay aciton assigned).

Supported and required form fields

You can use the following hidden fields for managing the customer registration email notification and logging in. These fields will take effect only if you defined the register_customer field on the Billing Information checkout step.

  • customer_auto_login - automatically log customer in after placing the order. Accepted values are: 0, 1.
  • customer_registration_notification - send a registration notification email message to customer. LemonStand uses an email template with the shop:registration_confirmation code for the registration notification. Accepted values are: 0, 1.
  • empty_cart - allows to leave the cart content after the order is placed. This allows your customers to return to previous checkout step even if they already placed the order. The default value is 0 (false).

Generated PHP variables

The action provides the following PHP variables, which you can access in the page code.

  • $goods_tax – a value of a goods tax
  • $subtotal – order subtotal sum
  • $shipping_quote – a shipping quote value
  • $shipping_tax – a shipping tax value
  • $total – order total sum
  • $discount - total discount amount. This value is calculated basing on the active discounts.
  • $product_taxes - a list of sales taxes applied to all order items, array. Each element in the array is an object containing the following fields: 
  • - name - the tax name, for example GST, 
    total - total tax value, calculated as amount - discount
  • $shipping_taxes - a list of taxes applied to the shipping service, array. Each element in the collection is an object containing the following fields:
    name - the tax name, for example GST,
    rate - total tax amount

Supported AJAX handlers

  • shop:on_checkoutPlaceOrder - sends an AJAX request to the server, causing LemonStand to create an order basing on the checkout information gathered during the preceding checkout steps. Use this handler for creating a button, or link, for placing the order. Example:
    <input
    	type="image"
    	src="/resources/images/btn_place_order.gif"
    	alt="Place Order and Pay"
    	onclick="return $(this).getForm().sendRequest('shop:on_checkoutPlaceOrder')"/>


Previous: shop:checkout_payment_method
Return to Step-by-step checkout actions