title = "Checkout"
url = "/checkout"
layout = "main"
is_hidden = 0

[PaymentMethodList]

[ShippingTypeList]

[MakeOrder]
mode = "ajax"
redirect_on = 1
redirect_page = "order-complete"
==
<?php
function onInit()
{
    $obPluginManager = \System\Classes\PluginManager::instance();
    $this['location_is_available'] = $obPluginManager->hasPlugin('RainLab.Location');
}
?>
==
{% set obActiveShippingType = ShippingTypeList.make().active().sort().first() %}
{% set obCartPositionList = Cart.get(obActiveShippingType) %}

{% set arBreadcrumbs = [
    {'name': 'Home', 'url': 'index'|page},
    {'name': 'Checkout', 'url': 'checkout'|page}
] %}

<div class="container">
    {% partial 'navigation/breadcrumbs/breadcrumbs' arBreadcrumbs=arBreadcrumbs %}
    {% partial 'product/cart-position-list/cart-position-list' obCartPositionList=obCartPositionList obActiveShippingType=obActiveShippingType %}
    {% if obCartPositionList.count > 0 %}
        {% partial 'form/checkout-form/checkout-form' %}
    {% endif %}
</div>