Advertisement
Guest User

order.html

a guest
Dec 20th, 2019
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.22 KB | None | 0 0
  1. {strip}
  2.     {$_show_cart = true}
  3.     {$_cart_count = $wa->shop->cart->count()}
  4.     {*EMPTY*}
  5.     {if empty($_cart_count)}
  6.         <div class="cart-pg" id="cart-content">
  7.             <div class="b-c-row b-c-row_cart">
  8.                 <div class="col-main">
  9.                     <div class="cart-pg__empty-cart">
  10.                         <div class="acc-info-box">
  11.                             <div class="acc-info-box__title">[`Your shopping cart is empty`]!</div>
  12.                             <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>
  13.                         </div>
  14.                     </div>
  15.                 </div>
  16.             </div>
  17.         </div>
  18.     {*ORDER*}
  19.     {else}
  20.         {include file="checkout.header.html" inline}
  21.         <link rel="stylesheet" href="{$wa_theme_url}css/order.css?v={$wa_theme_version}">
  22.         <div class="s-order-page" id="js-order-page">
  23.             <div class="s-order-column">
  24.  
  25.                 <section class="s-order-section" id="js-order-cart">
  26.                     <div class="s-section-header wa-flex-box full-line middle">
  27.                         <h2 class="s-header">{$config.cart.block_name|default:"[`Shopping cart`]"|escape}</h2>
  28.                         <a class="s-delete-button js-clear-cart" href="javascript:void(0);">
  29.                             {$_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>'}
  30.                             <span class="s-delete-icon">{$_svg_icon}</span>[`Delete all products`]
  31.                         </a>
  32.                     </div>
  33.                     <div class="s-section-body">
  34.                         {$wa->shop->checkout()->cart([
  35.                             "DEBUG" => true,
  36.                             "wrapper" => "#js-order-cart"
  37.                         ])}
  38.                     </div>
  39.                     <div class="s-section-footer">
  40.                         <div class="s-back-link">
  41.                             {$_url = $wa->getUrl('shop/frontend/')}
  42.                             {$_refer_url = waRequest::server('HTTP_REFERER')}
  43.                             {if !empty($_refer_url)}
  44.                                 {$_refer_host = $_refer_url|parse_url:$smarty.const.PHP_URL_HOST}
  45.                                 {$_current_url = $wa->currentUrl(true)}
  46.                                 {$_current_host = $_current_url|parse_url:$smarty.const.PHP_URL_HOST}
  47.  
  48.                                 {if $_refer_host === $_current_host}
  49.                                     {$_url = $_refer_url}
  50.                                 {/if}
  51.                             {/if}
  52.                             <a href="{$_url|escape}">&larr; [`Back to shopping`]</a>
  53.                         </div>
  54.                     </div>
  55.                 </section>
  56.  
  57.                 {if method_exists($wa->shop->checkout(), 'crossSelling')}
  58.                     {capture assign="_cross_selling_html"}
  59.                         {$wa->shop->checkout()->crossSelling([
  60.                             "DEBUG" => true,
  61.                             "wrapper" => "#js-cross-selling-section"
  62.                         ])}
  63.                     {/capture}
  64.                     {if !empty($_cross_selling_html)}
  65.                         <section class="s-order-section s-cross-selling-section" id="js-cross-selling-section">
  66.                             <div class="s-section-header">
  67.                                 <h2 class="s-header">{$config.recommendations.block_name|default:"[`Recommended`]"|escape}</h2>
  68.                             </div>
  69.                             <div class="s-section-body">
  70.                                 {$_cross_selling_html}
  71.                             </div>
  72.                         </section>
  73.                     {/if}
  74.                 {/if}
  75.  
  76.             </div>
  77.             <div class="s-order-column">
  78.  
  79.                 <section class="s-order-section" id="js-order-form">
  80.                     <div class="s-section-header">
  81.                         <h2 class="s-header">{$config.order.block_name|default:"[`Checkout`]"|escape}</h2>
  82.                     </div>
  83.                     <div class="s-section-body">
  84.                         {$wa->shop->checkout()->form([
  85.                             "DEBUG" => true,
  86.                             "wrapper" => "#js-order-form"
  87.                         ])}
  88.                     </div>
  89.                 </section>
  90.  
  91.             </div>
  92.  
  93.             <script>
  94.                 ( function($) {
  95.  
  96.                     ( typeof window.ShopOrderPage === "function" ? init() : load().then(init) );
  97.  
  98.                     function load() {
  99.                         var deferred = $.Deferred();
  100.  
  101.                         $.getScript("{$wa_theme_url}js/order.js?v={$wa->version()}", function() {
  102.                             deferred.resolve();
  103.                         });
  104.  
  105.                         return deferred.promise();
  106.                     }
  107.  
  108.                     function init() {
  109.                         new window.ShopOrderPage({
  110.                             $wrapper: $("#js-order-page"),
  111.                             urls: {
  112.                                 "checkbox-icon": "{$wa_url}wa-apps/shop/img/frontend/order/svg/sprite.svg#checkbox-yes"
  113.                             }
  114.                         });
  115.                     }
  116.  
  117.                 })(jQuery);
  118.             </script>
  119.         </div>
  120.         {$wa->globals('useCompactHeader',true)}
  121.         {$wa->globals('useCompactFooter',true)}
  122.         {$wa->globals('hideUserPanel',true)}
  123.         {$wa->globals('isOrderPage',true)}
  124.     {/if}
  125. <!-- plugin hook: 'frontend_order' -->
  126. {* @event frontend_order.%plugin_id% *}
  127. {foreach $frontend_order as $_}{$_}{/foreach}
  128. {/strip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement