Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {strip}
- {$_show_cart = true}
- {$_cart_count = $wa->shop->cart->count()}
- {*EMPTY*}
- {if empty($_cart_count)}
- <div class="cart-pg" id="cart-content">
- <div class="b-c-row b-c-row_cart">
- <div class="col-main">
- <div class="cart-pg__empty-cart">
- <div class="acc-info-box">
- <div class="acc-info-box__title">[`Your shopping cart is empty`]!</div>
- <div class="acc-info-box__text">{sprintf("[`Sale, special offers and interesting goods review on %s home page %s help you right choice`]","<a href='$wa_app_url'>","</a>")}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- {*ORDER*}
- {else}
- {include file="checkout.header.html" inline}
- <link rel="stylesheet" href="{$wa_theme_url}css/order.css?v={$wa_theme_version}">
- <div class="s-order-page" id="js-order-page">
- <div class="s-order-column">
- <section class="s-order-section" id="js-order-cart">
- <div class="s-section-header wa-flex-box full-line middle">
- <h2 class="s-header">{$config.cart.block_name|default:"[`Shopping cart`]"|escape}</h2>
- <a class="s-delete-button js-clear-cart" href="javascript:void(0);">
- {$_svg_icon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.9 9.9"><path d="M0,8.5l3.5-3.5L0,1.4L1.4,0l3.5,3.5L8.5,0l1.4,1.4L6.4,4.9l3.5,3.5L8.5,9.9L4.9,6.4L1.4,9.9L0,8.5z"/></svg>'}
- <span class="s-delete-icon">{$_svg_icon}</span>[`Delete all products`]
- </a>
- </div>
- <div class="s-section-body">
- {$wa->shop->checkout()->cart([
- "DEBUG" => true,
- "wrapper" => "#js-order-cart"
- ])}
- </div>
- <div class="s-section-footer">
- <div class="s-back-link">
- {$_url = $wa->getUrl('shop/frontend/')}
- {$_refer_url = waRequest::server('HTTP_REFERER')}
- {if !empty($_refer_url)}
- {$_refer_host = $_refer_url|parse_url:$smarty.const.PHP_URL_HOST}
- {$_current_url = $wa->currentUrl(true)}
- {$_current_host = $_current_url|parse_url:$smarty.const.PHP_URL_HOST}
- {if $_refer_host === $_current_host}
- {$_url = $_refer_url}
- {/if}
- {/if}
- <a href="{$_url|escape}">← [`Back to shopping`]</a>
- </div>
- </div>
- </section>
- {if method_exists($wa->shop->checkout(), 'crossSelling')}
- {capture assign="_cross_selling_html"}
- {$wa->shop->checkout()->crossSelling([
- "DEBUG" => true,
- "wrapper" => "#js-cross-selling-section"
- ])}
- {/capture}
- {if !empty($_cross_selling_html)}
- <section class="s-order-section s-cross-selling-section" id="js-cross-selling-section">
- <div class="s-section-header">
- <h2 class="s-header">{$config.recommendations.block_name|default:"[`Recommended`]"|escape}</h2>
- </div>
- <div class="s-section-body">
- {$_cross_selling_html}
- </div>
- </section>
- {/if}
- {/if}
- </div>
- <div class="s-order-column">
- <section class="s-order-section" id="js-order-form">
- <div class="s-section-header">
- <h2 class="s-header">{$config.order.block_name|default:"[`Checkout`]"|escape}</h2>
- </div>
- <div class="s-section-body">
- {$wa->shop->checkout()->form([
- "DEBUG" => true,
- "wrapper" => "#js-order-form"
- ])}
- </div>
- </section>
- </div>
- <script>
- ( function($) {
- ( typeof window.ShopOrderPage === "function" ? init() : load().then(init) );
- function load() {
- var deferred = $.Deferred();
- $.getScript("{$wa_theme_url}js/order.js?v={$wa->version()}", function() {
- deferred.resolve();
- });
- return deferred.promise();
- }
- function init() {
- new window.ShopOrderPage({
- $wrapper: $("#js-order-page"),
- urls: {
- "checkbox-icon": "{$wa_url}wa-apps/shop/img/frontend/order/svg/sprite.svg#checkbox-yes"
- }
- });
- }
- })(jQuery);
- </script>
- </div>
- {$wa->globals('useCompactHeader',true)}
- {$wa->globals('useCompactFooter',true)}
- {$wa->globals('hideUserPanel',true)}
- {$wa->globals('isOrderPage',true)}
- {/if}
- <!-- plugin hook: 'frontend_order' -->
- {* @event frontend_order.%plugin_id% *}
- {foreach $frontend_order as $_}{$_}{/foreach}
- {/strip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement