custom/plugins/theme/src/Resources/views/storefront/component/doncarne-beef-club.html.twig line 1

Open in your IDE?
  1. {% if isCartPage and device == "desktop" %}
  2.     {% set beefClubCategory = doncarneConfig.beefClubCategory  %}
  3.     {% if context.customer and context.customer.groupId == doncarneConfig.beefClubCustomerGroup %}
  4.         {% set beefClubCategory = doncarneConfig.beefClubPortalCategory  %}
  5.     {% endif %}
  6.     <div class="row dc-mb-12">
  7.         <div class="col-8">
  8.             <div class="background-beige px-4 py-5 text-center cart-page-beef-club__wrapper h-100">
  9.                 <div>
  10.                     <p class="font-cormorant cart-page-beef-club__cta-long">{{"beefClub.callToActionLong"|trans|sw_sanitize}}</p>
  11.                     {% if beefClubCategory %}
  12.                         <a class="link-arrow cart-page-beef-club__cta-short" href="{{ seoUrl('frontend.navigation.page', { navigationId: beefClubCategory }) }}">
  13.                             {{ "beefClub.callToActionShort"|trans|sw_sanitize }}
  14.                         </a>
  15.                     {% endif %}
  16.                 </div>
  17.             </div>
  18.         </div>
  19.         <div class="col-4">
  20.             <a class="header-beef-club-link d-block" href="{{ seoUrl('frontend.navigation.page', { navigationId: beefClubCategory }) }}" title="Don Carne Beef Club">
  21.                 <img class="img-fluid cart-page-beef-club__img" src="/bundles/doncarnetheme/media/doncarne_beefclub.png" alt="Don Carne Beef Club">
  22.             </a>
  23.         </div>
  24.     </div>
  25. {% else %}
  26.     {% set beefClubCategory = doncarneConfig.beefClubCategory  %}
  27.     {% if context.customer and context.customer.groupId == doncarneConfig.beefClubCustomerGroup %}
  28.         {% set beefClubCategory = doncarneConfig.beefClubPortalCategory  %}
  29.     {% endif %}
  30.     <div class="beef-club-box background-black text-white mb-4 lg-mb-0">
  31.         {% if beefClubCategory and doncarneConfig.beefClubImage %}
  32.             {% set link = seoUrl('frontend.navigation.page', { navigationId: beefClubCategory }) %}
  33.             {% set imageId = doncarneConfig.beefClubImage %}
  34.             {% set mediaCollection = searchMedia([imageId], context.context) %}
  35.             {% set media = mediaCollection.get(imageId) %}
  36.             <a class="header-beef-club-link" href="{{link}}" title="Don Carne Beef Club">
  37.                 <img class="img-fluid" src="{{media.url}}" alt="Don Carne Beef Club">
  38.             </a>
  39.             <p class="text-center mb-0">{{"beefClub.callToAction"|trans({'%link%': link})|raw}}</p>
  40.         {% endif %}
  41.     </div>
  42. {% endif %}