avatar
Untitled

Guest 44 28th Nov, 2024

MARKUP 17.81 KB
                                           
                         {**
 * 2007-2020 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{assign var="isAdditionaService" value=false}
{assign var="fixedCartTotals" value=0}
{foreach from=$cart.products item=product}

  {if in_array($product->id_product,[52846,52845,52847])}
    {$cart.products_count = $cart.products_count - 1}
    {$isAdditionaService = true}
  {else}
    {$fixedCartTotals =  $fixedCartTotals + $product.total_wt}
  {/if}
{/foreach}

<div class="header-top__block header-top__block--cart col flex-grow-0">
  <div class="js-blockcart blockcart cart-preview dropdown" data-refresh-url="{$refresh_url}">
    <a href="#" role="button" id="cartDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
      class="header-top__link">
      <div class="header-top__icon-container ">
        <div class="header-top__icon"><svg width="21" height="23" viewBox="0 0 21 23" fill="none"
            xmlns="http://www.w3.org/2000/svg">
            <path fill-rule="evenodd" clip-rule="evenodd"
              d="M20.8304 20.7544L19.7728 8.57105C19.6854 7.50047 18.7882 6.67781 17.7141 6.68339H15.9328V5.51322C15.9328 2.46808 13.4642 -0.000488281 10.4191 -0.000488281C7.37393 -0.000488281 4.90536 2.46808 4.90536 5.51322V6.68339H3.12403C2.04989 6.67784 1.15271 7.50051 1.06535 8.5711L0.00775228 20.7544C-0.0423413 21.3313 0.151966 21.9028 0.54335 22.3296C0.934733 22.7565 1.48727 22.9995 2.06639 22.9995H18.7718C19.3509 22.9995 19.9034 22.7565 20.2948 22.3296C20.6862 21.9028 20.8805 21.3313 20.8304 20.7544ZM6.34286 5.51322C6.34286 3.26199 8.16784 1.43701 10.4191 1.43701C12.6703 1.43701 14.4953 3.26199 14.4953 5.51322V6.68339H6.34286V5.51322ZM18.7718 21.562C18.9493 21.5682 19.12 21.4931 19.2354 21.3582H19.2353C19.3597 21.2315 19.4197 21.055 19.3983 20.8787L18.3407 8.6954C18.3141 8.36958 18.041 8.11922 17.7141 8.12089H15.9328V11.5534C15.9328 11.9504 15.611 12.2722 15.214 12.2722C14.8171 12.2722 14.4953 11.9504 14.4953 11.5534V8.12089H6.34286V11.5534C6.34286 11.9504 6.02106 12.2722 5.62411 12.2722C5.22715 12.2722 4.90536 11.9504 4.90536 11.5534V8.12089H3.12403C2.79711 8.11922 2.52406 8.36961 2.49746 8.69544L1.43986 20.8787C1.42462 21.0543 1.48375 21.2282 1.60286 21.3581C1.72198 21.488 1.89014 21.562 2.06639 21.562H18.7718Z"
              fill="#58585A" />
          </svg>

        </div>
        <span class="header-top__badge {if $cart.products_count > 9}header-top__badge--smaller{/if}">
          {hook h="litespeedEsiBegin" m="is_shoppingcart" field="products_count"}{$cart.products_count}{hook h="litespeedEsiEnd"}
        </span>
      </div>
      <span class="account-icon-title">{l s='Cart' d='Shop.Theme.Global'}</span>
    </a>
    {* <a href="{$cart_url}" class="d-flex d-lg-none header-top__link">
      <div class="header-top__icon-container">
        <span class="header-top__icon"><svg width="21" height="23" viewBox="0 0 21 23" fill="none"
            xmlns="http://www.w3.org/2000/svg">
            <path fill-rule="evenodd" clip-rule="evenodd"
              d="M20.8304 20.7544L19.7728 8.57105C19.6854 7.50047 18.7882 6.67781 17.7141 6.68339H15.9328V5.51322C15.9328 2.46808 13.4642 -0.000488281 10.4191 -0.000488281C7.37393 -0.000488281 4.90536 2.46808 4.90536 5.51322V6.68339H3.12403C2.04989 6.67784 1.15271 7.50051 1.06535 8.5711L0.00775228 20.7544C-0.0423413 21.3313 0.151966 21.9028 0.54335 22.3296C0.934733 22.7565 1.48727 22.9995 2.06639 22.9995H18.7718C19.3509 22.9995 19.9034 22.7565 20.2948 22.3296C20.6862 21.9028 20.8805 21.3313 20.8304 20.7544ZM6.34286 5.51322C6.34286 3.26199 8.16784 1.43701 10.4191 1.43701C12.6703 1.43701 14.4953 3.26199 14.4953 5.51322V6.68339H6.34286V5.51322ZM18.7718 21.562C18.9493 21.5682 19.12 21.4931 19.2354 21.3582H19.2353C19.3597 21.2315 19.4197 21.055 19.3983 20.8787L18.3407 8.6954C18.3141 8.36958 18.041 8.11922 17.7141 8.12089H15.9328V11.5534C15.9328 11.9504 15.611 12.2722 15.214 12.2722C14.8171 12.2722 14.4953 11.9504 14.4953 11.5534V8.12089H6.34286V11.5534C6.34286 11.9504 6.02106 12.2722 5.62411 12.2722C5.22715 12.2722 4.90536 11.9504 4.90536 11.5534V8.12089H3.12403C2.79711 8.11922 2.52406 8.36961 2.49746 8.69544L1.43986 20.8787C1.42462 21.0543 1.48375 21.2282 1.60286 21.3581C1.72198 21.488 1.89014 21.562 2.06639 21.562H18.7718Z"
              fill="#58585A" />
          </svg>
        </span>
        <span class="header-top__badge {if $cart.products_count > 9}header-top__badge--smaller{/if}">
          {hook h="litespeedEsiBegin" m="is_shoppingcart" field="products_count"}{$cart.products_count}{hook h="litespeedEsiEnd"}
        </span>
      </div>
    </a> *}
    <div class="dropdown-menu blockcart__dropdown cart-dropdown dropdown-menu-right" aria-labelledby="cartDropdown">
      <div class="cart-dropdown__content keep-open js-cart__card-body cart__card-body">
        <div class="cart-loader">
          <div class="spinner-border text-primary" role="status"><span
              class="sr-only">{l s='Loading...' d='Shop.Theme.Global'}</span></div>
        </div>
        <div class="cart-dropdown__title d-flex align-items-center mb-3">
          <p class="h5 mb-0 mr-2">
            {l s='Your cart' d='Modules.Isshoppingcart.Isshoppingcart'}
          </p>
          <a data-toggle="dropdown" href="#"
            class="cart-dropdown__close dropdown-close ml-auto cursor-pointer text-decoration-none">
            <i class="material-icons d-block">close</i>
          </a>
        </div>
        {hook h="litespeedEsiBegin" m="is_shoppingcart" key="is_shoppingcart_content" field="cart"}
        {if $cart.products_count > 0}
          <div class="remaining-amount-to-free-shipping-wrapper">
            {assign var='ps_freeshipping_price' value=Configuration::get('PS_SHIPPING_FREE_PRICE')}
            {assign var="additionalServices" value=Context::getContext()->cookie->additional_services|json_decode:true}
            {if isset($additionalServices['total_price']) && $additionalServices['total_price'] > 0 }
              {math equation='a+b' a=$ps_freeshipping_price b=$additionalServices['total_price'] assign='ps_freeshipping_price'}
            {/if}

            {if $ps_freeshipping_price}
              {assign var=currency value=Context::getContext()->currency}
              {assign var=ps_freeshipping_price value=$currency->getConversionRate()*$ps_freeshipping_price}
              {assign var='total_without_shipping' value=Context::getContext()->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS)}
              {math equation='a-b' a=$ps_freeshipping_price b=$total_without_shipping assign='remaining_to_spend'}

              {if isset($additionalServices['total_price']) && $additionalServices['total_price'] > 0 }
                {math equation='(100*(a-c))/b' a=$total_without_shipping b=$ps_freeshipping_price c=$additionalServices['total_price'] assign='completed_percentage'}
              {else}
                {math equation='(100*a)/b' a=$total_without_shipping b=$ps_freeshipping_price assign='completed_percentage'}
              {/if}
              {if $remaining_to_spend > 0}
                <div
                  class="remaining-amount-to-free-shipping-container{if isset($cart.subtotals) && isset($cart.subtotals.shipping) && isset($cart.subtotals.shipping.amount) && $cart.subtotals.shipping.amount == 0} free{/if}">
                  <div class="remaining-amount-msg">
                    <span class="delivery-ico">
                      <svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path
                          d="M16.6243 15.3125C16.6287 15.2601 16.6287 15.2074 16.6243 15.155C16.6243 14.6909 16.44 14.2458 16.1118 13.9176C15.7836 13.5894 15.3385 13.405 14.8744 13.405C14.4102 13.405 13.9651 13.5894 13.6369 13.9176C13.3087 14.2458 13.1244 14.6909 13.1244 15.155C13.12 15.2074 13.12 15.2601 13.1244 15.3125C13.1244 15.7767 13.3087 16.2218 13.6369 16.55C13.9651 16.8782 14.4102 17.0625 14.8744 17.0625C15.3385 17.0625 15.7836 16.8782 16.1118 16.55C16.44 16.2218 16.6243 15.7767 16.6243 15.3125Z"
                          fill="url(#paint0_linear_219_1081)" />
                        <path
                          d="M9.62435 15.3125C9.62869 15.2601 9.62869 15.2074 9.62435 15.155C9.62435 14.6909 9.43998 14.2458 9.11179 13.9176C8.7836 13.5894 8.33848 13.405 7.87435 13.405C7.41022 13.405 6.9651 13.5894 6.63691 13.9176C6.30872 14.2458 6.12435 14.6909 6.12435 15.155C6.12001 15.2074 6.12001 15.2601 6.12435 15.3125C6.12435 15.7767 6.30872 16.2218 6.63691 16.55C6.9651 16.8782 7.41022 17.0625 7.87435 17.0625C8.33848 17.0625 8.7836 16.8782 9.11179 16.55C9.43998 16.2218 9.62435 15.7767 9.62435 15.3125Z"
                          fill="url(#paint1_linear_219_1081)" />
                        <path
                          d="M3.0625 11.1564H1.75C1.62951 11.1561 1.51133 11.1894 1.40875 11.2526C1.31961 11.3076 1.24492 11.3831 1.19091 11.4728C1.1369 11.5625 1.10514 11.6638 1.09829 11.7683C1.09144 11.8728 1.10969 11.9774 1.15152 12.0734C1.19335 12.1694 1.25755 12.254 1.33875 12.3201C1.45327 12.4179 1.59942 12.4708 1.75 12.4689H3.9375C4.11155 12.4689 4.27847 12.538 4.40154 12.6611C4.52461 12.7842 4.59375 12.9511 4.59375 13.1251C4.59375 13.2992 4.52461 13.4661 4.40154 13.5892C4.27847 13.7122 4.11155 13.7814 3.9375 13.7814H3.0625C2.88845 13.7814 2.72153 13.8505 2.59846 13.9736C2.47539 14.0967 2.40625 14.2636 2.40625 14.4376C2.40625 14.6117 2.47539 14.7786 2.59846 14.9017C2.72153 15.0247 2.88845 15.0939 3.0625 15.0939H5.4775C5.51514 14.6489 5.67907 14.2239 5.95 13.8689C6.17644 13.5725 6.46755 13.3317 6.80115 13.1649C7.13476 12.9981 7.50204 12.9097 7.875 12.9064C8.47609 12.9041 9.05612 13.1276 9.50016 13.5328C9.9442 13.9379 10.2199 14.4951 10.2725 15.0939H12.4775C12.5289 14.4934 12.8037 13.934 13.2476 13.5264C13.6916 13.1188 14.2723 12.8926 14.875 12.8926C15.4777 12.8926 16.0584 13.1188 16.5024 13.5264C16.9463 13.934 17.2211 14.4934 17.2725 15.0939H18.4625C18.6672 15.098 18.8669 15.0302 19.0268 14.9023C19.1866 14.7744 19.2966 14.5945 19.3375 14.3939L19.915 11.5064C19.9105 11.4862 19.9105 11.4653 19.915 11.4451C19.9274 11.3698 19.9274 11.2929 19.915 11.2176L18.27 6.37012C18.1804 6.11268 18.0123 5.88982 17.7894 5.73287C17.5665 5.57591 17.3001 5.49277 17.0275 5.49512H15.4525L15.5487 4.79512C15.5723 4.60965 15.5562 4.42129 15.5015 4.24251C15.4468 4.06372 15.3548 3.89857 15.2316 3.75797C15.1084 3.61737 14.9567 3.50453 14.7866 3.4269C14.6166 3.34926 14.432 3.30861 14.245 3.30762H4.375C4.20095 3.30762 4.03403 3.37676 3.91096 3.49983C3.78789 3.6229 3.71875 3.78982 3.71875 3.96387C3.71875 4.13792 3.78789 4.30484 3.91096 4.42791C4.03403 4.55098 4.20095 4.62012 4.375 4.62012H5.46875C5.6428 4.62012 5.80972 4.68926 5.93279 4.81233C6.05586 4.9354 6.125 5.10232 6.125 5.27637C6.125 5.45042 6.05586 5.61734 5.93279 5.74041C5.80972 5.86348 5.6428 5.93262 5.46875 5.93262H1.75C1.57666 5.93488 1.41105 6.00475 1.28847 6.12733C1.16588 6.24992 1.09602 6.41552 1.09375 6.58887C1.09351 6.7547 1.1569 6.9143 1.27086 7.03478C1.38482 7.15525 1.54066 7.2274 1.70625 7.23637H3.9375C4.11155 7.23637 4.27847 7.30551 4.40154 7.42858C4.52461 7.55165 4.59375 7.71857 4.59375 7.89262C4.59375 8.06667 4.52461 8.23359 4.40154 8.35666C4.27847 8.47973 4.11155 8.54887 3.9375 8.54887H2.625H2.485C2.33912 8.58072 2.20846 8.66137 2.1146 8.7775C2.02074 8.89363 1.9693 9.0383 1.96875 9.18762C1.96875 9.36167 2.03789 9.52859 2.16096 9.65166C2.28403 9.77473 2.45095 9.84387 2.625 9.84387H3.0625C3.23655 9.84387 3.40347 9.91301 3.52654 10.0361C3.64961 10.1592 3.71875 10.3261 3.71875 10.5001C3.71875 10.6742 3.64961 10.8411 3.52654 10.9642C3.40347 11.0872 3.23655 11.1564 3.0625 11.1564ZM15.3125 6.78137H16.905C16.9509 6.78206 16.9956 6.79665 17.0331 6.8232C17.0705 6.84975 17.0991 6.88702 17.115 6.93012L18.375 10.7189H14.7875L15.3125 6.78137Z"
                          fill="url(#paint2_linear_219_1081)" />
                        <defs>
                          <linearGradient id="paint0_linear_219_1081" x1="13.1211" y1="15.4471" x2="16.6276" y2="15.4471"
                            gradientUnits="userSpaceOnUse">
                            <stop stop-color="#418DC0" />
                            <stop offset="1" stop-color="#5BACE2" />
                          </linearGradient>
                          <linearGradient id="paint1_linear_219_1081" x1="6.12109" y1="15.4471" x2="9.62761" y2="15.4471"
                            gradientUnits="userSpaceOnUse">
                            <stop stop-color="#418DC0" />
                            <stop offset="1" stop-color="#5BACE2" />
                          </linearGradient>
                          <linearGradient id="paint2_linear_219_1081" x1="1.09375" y1="9.88837" x2="19.9243" y2="9.88837"
                            gradientUnits="userSpaceOnUse">
                            <stop stop-color="#418DC0" />
                            <stop offset="1" stop-color="#5BACE2" />
                          </linearGradient>
                        </defs>
                      </svg>
                    </span>
                    <span class="remaining-amount-text">{l s='Remaining amount to get free shipping:' d='Shop.Theme.Checkout'}
                    </span>
                    <span class="remaining-amount">{Tools::displayPrice($remaining_to_spend,$currency)}</span>
                  </div>
                  <div class="remaining-amount-progress">
                    <div class="inside-bar" style="width: {$completed_percentage|escape:'javascript':'UTF-8'}%"></div>
                  </div>
                </div>
              {/if}
            {/if}
          </div>
          <div class="cart-dropdown__products pt-3 mb-3">
            {foreach from=$cart.products item=product}
              {if !in_array($product->id_product,[52846,52845,52847])}
                {include 'module:is_shoppingcart/views/templates/front/is_shoppingcart-product-line.tpl' product=$product}
              {/if}
            {/foreach}
          </div>

          <div class="cart-summary-line cart-total cart-dropdown__summary">
            <span class="label">{l s='Cart value' d='Modules.Isshoppingcart.Isshoppingcart'}</span>

            <span class="value">{if $isAdditionaService}{$fixedCartTotals|replace:'.':','}
              {$currency->sign}{else}{$cart.totals.total.value}
              {/if}</span>
          </div>

          <div class="cart-dropdown__gotocart mt-3 ">
            <a href="{$cart_url}" class="mexen-button--gradient btn-block dropdown-close text">
              {l s='Go to cart' d='Modules.Isshoppingcart.Isshoppingcart'}
            </a>
          </div>

        {else}
          <div class="alert alert-warning">
            {l s='Unfortunately your basket is empty' d='Modules.Isshoppingcart.Isshoppingcart'}

            <a href="{$context->link->getPageLink('module-ph_simpleblog-inspirations', true)}"></a>
          </div>
        {/if}
        {hook h="litespeedEsiEnd" m="is_shoppingcart" key="is_shoppingcart_content"}
      </div>
    </div>
  </div>
</div>
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
Ta strona używa plików cookie w celu usprawnienia i ułatwienia dostępu do serwisu oraz prowadzenia danych statystycznych. Dalsze korzystanie z tej witryny oznacza akceptację tego stanu rzeczy.
Wykorzystywanie plików Cookie
Jak wyłączyć cookies?
ROZUMIEM