Guest User

Untitled

a guest
Sep 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. {% assign heading = 'You may also like' %}
  2. <div class="related-div ">
  3. <div class="cart-related shopify-section index-section " id="shopify-section-featured-collections">
  4. <div class="page-width">
  5. <div class="section-header text-center"><h2>{{ heading }}</h2></div>
  6. <ul class="grid grid--uniform grid--view-items">
  7.  
  8. {% assign prod_handle = '' %}
  9. {% assign item_handle = '' %}
  10. {% for item in cart.items %}
  11. {%assign item_handle = item_handle | append: item.product.handle | append: ';' %}
  12. {% endfor %}
  13. {% for item in cart.items %}
  14. {% for col_item in item.product.collections %}
  15. {% for prod in col_item.products %}
  16. {% if prod_handle contains prod.handle or item_handle contains prod.handle %}
  17. {% else %}
  18. <div class="cre_item {{ prod.handle }}">
  19. <div class="related-item grid__item grid__item--featured-collections small--one-half medium-up--one-fif2th {{ prod.handle }}" style="">
  20. <div class="grid-view-item product-card">
  21. <div class="image">
  22. <a href="{{ prod.url | within: collection }}" title="{{ product.title | escape }}">
  23. {{ prod.featured_image | product_img_url: "medium" | img_tag}}
  24. </a>
  25. </div>
  26. <div class="name h5 grid-view-item__title">
  27. <a href="{{ prod.url }}" title="{{ prod.title | escape }}">{{ prod.title }}</a>
  28. </div>
  29. <div class="price">
  30. <span class="price-item price-item--regular" data-regular-price="">
  31. {{ prod.price | money }}
  32. </span>
  33. </div>
  34. <div class="quick-view-button" style="display: none;">
  35. <a class="sca-qv-button button-quick-view" href="#sca-qv-showqv" title="Quick Add" handle="{{ prod.handle }}" style="font-family: tahoma; font-size: 14px; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">QUICK VIEW</a>
  36. </div>
  37. </div>
  38. {%assign prod_handle = prod_handle | append: prod.handle | append: ';' %}
  39. <div class="clear"></div>
  40. </div>
  41. </div>
  42. {% endif %}
  43.  
  44. {% endfor %}
  45. {% endfor %}
  46.  
  47. {% endfor %}
  48. </ul>
  49. </div>
  50. </div>
  51. </div>
  52. <script type="text/javascript">
  53. $(".related-div").hide();
  54.  
  55. if($(".cre_item").text()){
  56. $(".related-div").show();
  57. }
  58.  
  59. </script>
Add Comment
Please, Sign In to add comment