custom/apps/DmitsShippingCountdown/Resources/views/storefront/shippingholiday.html.twig line 1

Open in your IDE?
  1. {% set holidayfrom=config('DmitsShippingCountdown.config.holidayfrom')|date('00:00:01 d.m.Y',"UTC") %}
  2. {% set holidaytill=config('DmitsShippingCountdown.config.holidaytill')|date('23:59:59 d.m.Y',"UTC") %}
  3. {% if config('DmitsShippingCountdown.config.holidayfrom') and
  4.     config('DmitsShippingCountdown.config.holidaytill')and 
  5.     holidayfrom|date('U')-now|date('U')<0 and holidaytill|date('U')-now|date('U')>0%}
  6.     <div class="dmits_holiday"
  7.     style="
  8.         {% if config('DmitsShippingCountdown.config.holidaytextcolor') %} color:{{config('DmitsShippingCountdown.config.holidaytextcolor')}}; {% endif %}
  9.         {% if config('DmitsShippingCountdown.config.holidaybackgroundcolor') %} background-color:{{config('DmitsShippingCountdown.config.holidaybackgroundcolor')}}; {% endif %}
  10.         {% if config('DmitsShippingCountdown.config.holidaybordercolor') %} border: 1px solid {{config('DmitsShippingCountdown.config.holidaybordercolor')}}; {% endif %}
  11.         {% if config('DmitsShippingCountdown.config.holidaypadding') %} padding:{{config('DmitsShippingCountdown.config.holidaypadding')}}px; {% endif %} 
  12.         {% if config('DmitsShippingCountdown.config.holidaymargin') %} margin:{{config('DmitsShippingCountdown.config.holidaymargin')}}px; {% endif %} 
  13.         {% if config('DmitsShippingCountdown.config.holidayborderradius') %} border-radius:{{config('DmitsShippingCountdown.config.holidayborderradius')}}px; {% endif %} 
  14.         {% if config('DmitsShippingCountdown.config.holidaytextfamily') %} font-family:{{config('DmitsShippingCountdown.config.holidaytextfamily')}}; {% endif %} 
  15.         {% if config('DmitsShippingCountdown.config.holidaytextsize') %} font-size:{{config('DmitsShippingCountdown.config.holidaytextsize')}}px; {% endif %} 
  16.         {% if config('DmitsShippingCountdown.config.holidaycss') %} {{config('DmitsShippingCountdown.config.holidaycss')}}; {% endif %} 
  17.     ">{{"dmits.shippingcountdown.custom.holidaytext"|trans|raw}}</div>
  18. {% else %}
  19.     {% if DmitsShippingCountdownBlock=="header" or (DmitsShippingCountdownBlock=="buy-widget" and
  20.     DmitsShippingCountdownItem.availableStock >= DmitsShippingCountdownItem.minPurchase and DmitsShippingCountdownItem.deliveryTime
  21.     and (config('DmitsShippingCountdown.config.delivertime')=="" or (config('DmitsShippingCountdown.config.delivertime')==DmitsShippingCountdownItem.deliveryTime.id))
  22.      and  DmitsShippingCountdownItem.customFields.dmits_shippingcountdown_deactive!=true
  23.     )
  24.     or (DmitsShippingCountdownBlock=="cart" and
  25.     DmitsShippingCountdownItem.deliveryInformation.stock >= DmitsShippingCountdownItem.quantityInformation.minPurchase and DmitsShippingCountdownItem.deliveryInformation.deliveryTime
  26.     and  DmitsShippingCountdownItem.payload.customFields.dmits_shippingcountdown_deactive!=true)
  27.     %}
  28.         <span class="dmits_time"
  29.         style="display: none;
  30.         {% if config('DmitsShippingCountdown.config.shippingtextcolor') %} color:{{config('DmitsShippingCountdown.config.shippingtextcolor')}}; {% endif %}
  31.         {% if config('DmitsShippingCountdown.config.shippingbackgroundcolor') %} background-color:{{config('DmitsShippingCountdown.config.shippingbackgroundcolor')}}; {% endif %}
  32.         {% if config('DmitsShippingCountdown.config.shippingbordercolor') %} border: 1px solid {{config('DmitsShippingCountdown.config.shippingbordercolor')}}; {% endif %}
  33.         {% if config('DmitsShippingCountdown.config.shippingpadding') %} padding:{{config('DmitsShippingCountdown.config.shippingpadding')}}px; {% endif %} 
  34.         {% if config('DmitsShippingCountdown.config.shippingmargin') %} margin:{{config('DmitsShippingCountdown.config.shippingmargin')}}px; {% endif %} 
  35.         {% if config('DmitsShippingCountdown.config.shippingborderradius') %} border-radius:{{config('DmitsShippingCountdown.config.shippingborderradius')}}px; {% endif %} 
  36.         {% if config('DmitsShippingCountdown.config.shippingtextfamily') %} font-family:{{config('DmitsShippingCountdown.config.shippingtextfamily')}}; {% endif %} 
  37.         {% if config('DmitsShippingCountdown.config.shippingtextsize') %} font-size:{{config('DmitsShippingCountdown.config.shippingtextsize')}}px; {% endif %} 
  38.         
  39.         
  40.         
  41.         
  42.         {% if config('DmitsShippingCountdown.config.shippingcss') %} {{config('DmitsShippingCountdown.config.shippingcss')}}; {% endif %} 
  43.     
  44.     "></span>
  45.     {% endif %}
  46. {% endif %}