Guest User

Untitled

a guest
May 27th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.15 KB | None | 0 0
  1. {% comment %}
  2. ** Product - default view **
  3. - Product template
  4. {% endcomment %}
  5.  
  6. {% comment %}
  7. Find intersection between product tags and allowed tags generate contextual links for soup types.
  8. {% endcomment %}
  9. {% assign allowed_tags = 'Vegan,Vegetarian,Paleo,Nut Free,Gluten Free,Dairy Free' | split: ',' %}
  10. {% assign found_tags = '' %}
  11. {% if product.type == 'Bundle' %}
  12. {% assign isBundleType = true %}
  13. {% assign bundleSettings = product.metafields.variant.bundle_settings.value %}
  14. {% endif %}
  15. {% for altag in allowed_tags %}
  16. {% for tag in product.tags %}
  17. {% if tag == altag %}
  18. {% assign found_tags = found_tags | append: tag | append: '|' %}
  19. {% endif %}
  20. {% endfor %}
  21. {% endfor %}
  22.  
  23. {% assign found_tags = found_tags | split: '|' %}
  24.  
  25. <a name="pagecontent" id="pagecontent" style='padding: 0;'></a>
  26. <div class="container main content product-name--{{ product.handle }}">{% render 'preorder-now-collection-item', product: product %}
  27. <div class="sixteen columns" style="display: none">
  28. {% if collection.previous_product or collection.next_product or section.settings.product_breadcrumb %}
  29. <div class="clearfix breadcrumb-collection">
  30. {% if collection.previous_product or collection.next_product %}
  31. <div class="nav_arrows breadcrumb_text">
  32. {% if collection.previous_product %}
  33. <a href="{{ collection.previous_product }}" title="{{ 'products.general.previous_product_html' | t }}" class="breadcrumb_link"><span class="icon-left-arrow"> {{ 'products.general.previous_product_html' | t }}</span></a>
  34. {% endif %}
  35. {% if collection.previous_product and collection.next_product %}<span class="breadcrumb-divider"> | </span>{% endif %}
  36.  
  37. {% if collection.next_product %}
  38. <a href="{{collection.next_product}}" title="{{ 'products.general.next_product_html' | t }}" class="breadcrumb_link">{{ 'products.general.next_product_html' | t }} <span class="icon-right-arrow"></span></a>
  39. {% endif %}
  40. </div>
  41. {% endif %}
  42.  
  43. {% if section.settings.product_breadcrumb %}
  44. <div class="breadcrumb_text" itemscope itemtype="http://schema.org/BreadcrumbList">
  45. <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
  46. <a href="{{ shop.url }}" title="{{ shop.name | escape }}" itemprop="item" class="breadcrumb_link">
  47. <span itemprop="name">{{ 'general.breadcrumbs.home' | t }}</span>
  48. </a>
  49. <meta itemprop="position" content="1" />
  50. </span>
  51. <span class="breadcrumb-divider">/</span>
  52. <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
  53. {% if collection %}
  54. <a href="{{ collection.url }}" title="{{ collection.title | escape }}" itemprop="item" class="breadcrumb_link">
  55. <span itemprop="name">{{ collection.title }}</span>
  56. <meta itemprop="position" content="2" />
  57. </a>
  58. {% else %}
  59. <a href="/collections/all" title="{{ collections.all.title }}" itemprop="item" class="breadcrumb_link">
  60. <span itemprop="name">{{ collections.all.title }}</span>
  61. <meta itemprop="position" content="2" />
  62. </a>
  63. {% endif %}
  64. </span>
  65. <span class="breadcrumb-divider">/</span>
  66. <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
  67. <a href="{{ product.url }}" itemprop="item" class="breadcrumb_link">
  68. <span itemprop="name">{{ product.title }}</span>
  69. <meta itemprop="position" content="3" />
  70. </a>
  71. </span>
  72. </div>
  73. {% endif %}
  74. </div>
  75. {% endif %}
  76. </div>
  77.  
  78. {% comment %}Check to see if sidebar should be enabled{% endcomment %}
  79. {% if section.blocks.size > 0 %}
  80. {% assign sidebar = true %}
  81. {% else %}
  82. {% assign sidebar = false %}
  83. {% endif %}
  84.  
  85. <div class="product clearfix">
  86. {% if sidebar %}
  87. {% include 'sidebar' %}
  88. <div class="twelve columns medium-down--one-whole sidebar--{{ sidebar }}">
  89. {% else %}
  90. <div class="sixteen columns">
  91. {% endif %}
  92.  
  93. <div class="product-{{ product.id }}"
  94. data-free-text="{{ settings.free_price_text }}"
  95. >
  96. <div id="product-details" class="section product_section clearfix js-product_section {% if section.settings.product_images_position == 'right' %}align_right--images{% endif %}" itemscope itemtype="http://schema.org/Product" data-rv-handle="{{ product.handle }}">
  97.  
  98. <div class="nine columns medium-down--one-whole {% if section.settings.product_images_position == 'left' %}alpha{% else %}omega{% endif %}">
  99. {% include 'product-images' %}
  100. </div>
  101.  
  102. <div class="seven columns medium-down--one-whole {% if section.settings.product_images_position == 'left' %}omega{% else %}alpha{% endif %}">
  103.  
  104. {% assign collection_handles = product.collections | map: 'handle' %}
  105. {% assign variant = product.selected_or_first_available_variant %}
  106.  
  107. {% if product.available %}
  108. {% if settings.sale_banner_enabled and product.compare_at_price_max > product.price %}
  109. <div class="sale_banner_product">{{ 'collections.general.sale' | t }}</div>
  110. {% endif %}
  111. {% endif %}
  112. {% if collection_handles contains 'new' %}
  113. <div class="new_banner_product">{{ 'collections.general.new' | t }}</div>
  114. {% endif %}
  115. {% if collection_handles contains 'pre-order' %}
  116. <div class="preorder_banner_product">{{ 'collections.general.pre_order' | t }}</div>
  117. {% endif %}
  118.  
  119. {% if section.settings.display_vendor %}
  120. <p class="vendor">
  121. <span itemprop="brand" class="vendor">{{ product.vendor | link_to_vendor }}</span>
  122. </p>
  123. {% endif %}
  124.  
  125. {% if variant.sku != blank and section.settings.display_sku %}
  126. <p class="sku">
  127. <span itemprop="sku">{{ variant.sku }}</span>
  128. </p>
  129. {% endif %}
  130. <div class="product-head">
  131. <h1 class="product_name" itemprop="name">{{ product.title }}</h1>
  132. {% if isBundleType %}
  133. {% if bundleSettings.count == 6 and bundleSettings.isLimited %}
  134. <div class="product-head__limited">Limited edition</div>
  135. {% elsif bundleSettings.count == 12 %}
  136. <div class="product-head__limited">Big bundle discount</div>
  137. {% endif %}
  138. {% endif %}
  139. </div>
  140.  
  141. {% if bundleSettings.count %}
  142. <div class='product-head__soups'>
  143. <svg width="18" height="19" viewBox="0 0 18 19" fill='#003DA5' xmlns="http://www.w3.org/2000/svg">
  144. <g clip-path="url(#clip0_178_254)">
  145. <path d="M9.32153 3.15119C9.18111 2.92015 9.0169 2.73944 8.86657 2.58553C8.63887 2.35582 8.44607 2.17782 8.32794 2.00257C8.26786 1.91461 8.22332 1.8289 8.19094 1.72804C8.15856 1.62724 8.13761 1.50936 8.13736 1.35362V0.837494H7.01237V1.35387C7.00966 1.81916 7.13903 2.22057 7.32803 2.52724C7.46845 2.75829 7.63266 2.93878 7.78274 3.0929C8.0107 3.32261 8.20349 3.5004 8.32162 3.67586C8.3817 3.76382 8.42624 3.84953 8.45862 3.95036C8.491 4.0514 8.51195 4.16928 8.5122 4.32499C8.50949 4.60198 8.45145 4.75811 8.3592 4.91537C8.28878 5.03236 8.18911 5.14778 8.06266 5.27674C7.87503 5.4709 7.62303 5.68827 7.4 6.0109C7.28929 6.17178 7.18896 6.36053 7.11987 6.57656C7.05012 6.79278 7.01208 7.03398 7.01208 7.2959V7.81252H8.13708V7.29568C8.13979 7.01851 8.19783 6.86231 8.29008 6.70506C8.3605 6.58806 8.46017 6.47264 8.58662 6.34351C8.77404 6.14935 9.02604 5.93222 9.24928 5.60956C9.35978 5.44868 9.46011 5.25993 9.52941 5.0439C9.59916 4.8279 9.6372 4.58669 9.6372 4.32481C9.6399 3.85931 9.51053 3.45811 9.32153 3.15119Z"/>
  146. <path d="M12.1716 3.15119C12.0309 2.92015 11.8669 2.73944 11.7169 2.58553C11.4887 2.35582 11.2959 2.17782 11.178 2.00257C11.1179 1.91461 11.0734 1.8289 11.041 1.72804C11.0086 1.62724 10.9876 1.50936 10.9874 1.35362V0.837494H9.86244V1.35387C9.85973 1.81916 9.9891 2.22057 10.1781 2.52724C10.3185 2.75829 10.4827 2.93878 10.6328 3.0929C10.8608 3.32261 11.0536 3.5004 11.1717 3.67586C11.2318 3.76382 11.2761 3.84953 11.3087 3.95036C11.3411 4.0514 11.362 4.16928 11.3622 4.32499C11.3595 4.60198 11.3013 4.75811 11.2092 4.91537C11.1388 5.03236 11.0391 5.14778 10.9124 5.27674C10.7252 5.4709 10.473 5.68827 10.2498 6.0109C10.1393 6.17178 10.0392 6.36053 9.96991 6.57656C9.90016 6.79278 9.86212 7.03398 9.86212 7.2959V7.81252H10.9871V7.29568C10.9898 7.01851 11.0479 6.86231 11.1401 6.70506C11.2105 6.58806 11.3102 6.47264 11.4367 6.34351C11.6241 6.14935 11.8761 5.93222 12.0993 5.60956C12.21 5.44868 12.3102 5.25993 12.3794 5.0439C12.4492 4.8279 12.4872 4.58669 12.4872 4.32481C12.4899 3.85931 12.3606 3.45811 12.1716 3.15119Z"/>
  147. <path d="M0 8.9375C0 14.0322 4.02862 18.1625 9.00002 18.1625C13.9714 18.1625 18 14.0322 18 8.9375H0ZM2.05425 11.6375C1.92083 11.2745 1.81216 10.8992 1.73316 10.5125H16.2668C16.1878 10.8992 16.0792 11.2745 15.9457 11.6375H2.05425Z"/>
  148. </g>
  149. <defs>
  150. <clipPath id="clip0_178_254">
  151. <rect width="18" height="18" transform="translate(0 0.5)"/>
  152. </clipPath>
  153. </defs>
  154. </svg>
  155.  
  156. <span>{{ bundleSettings.count }}</span> soups
  157. </div>
  158. {% endif %}
  159.  
  160. {% if bundleSettings.soups and bundleSettings.soups.size %}
  161. <div class='product__soups-include'>
  162. <strong>Soups Included:</strong>
  163. {% for productHandle in bundleSettings.soups %}
  164. {% assign innerProduct = all_products[productHandle] %}
  165. {{ innerProduct.title }}{% if forloop.last != true %},{% endif %}
  166. {% endfor %}
  167. </div>
  168. {% endif %}
  169.  
  170. {% if section.settings.enable_shopify_product_badges and settings.enable_shopify_review_comments %}
  171. <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
  172. {% endif %}
  173.  
  174. {% assign product_tags = product.tags | join: ' ' %}
  175. {% if product_tags contains 'meta-size-chart-' %}
  176. {% for tag in product.tags %}
  177. {% if tag contains 'meta-size-chart-' %}
  178. <a href="#size-chart{{product.id}}" class="size_chart" data-remodal-target="size-chart{{product.id}}" data-no-instant>{{ 'products.product.size_chart' | t }} <span class="icon-right-arrow"></span></a>
  179. {% include 'popup-size-chart', product_id: product.id %}
  180. {% endif %}
  181. {% endfor %}
  182. {% elsif settings.size_chart != blank %}
  183. <a href="#size-chart" class="size_chart" data-remodal-target="size-chart" data-no-instant>{{ 'products.product.size_chart' | t }} <span class="icon-right-arrow"></span></a>
  184. {% endif %}
  185.  
  186.  
  187. {% if collection_handles contains 'coming-soon' %}
  188. <p class="modal_price">{{ 'collections.general.coming_soon' | t }}</p>
  189. {% else %}
  190. <p class="modal_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  191. <meta itemprop="priceCurrency" content="{{ shop.currency }}" />
  192. <meta itemprop="seller" content="{{ shop.name | escape }}" />
  193. <link itemprop="availability" href="http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}">
  194. <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition"/>
  195.  
  196. <span class="sold_out">{% if variant.available == false %}{{ 'products.product.sold_out' | t }}{% endif %}</span>
  197. <span itemprop="price" content="{{ variant.price | money_without_currency | remove: "," }}" class="{% if variant.compare_at_price > variant.price %}sale{% endif %}">
  198. <span class="current_price {% if product.available == false %}hidden{% endif %}">
  199. {% if variant.price > 0 %}
  200. <span class="money">{{ variant.price | money }}</span>
  201. {% else %}
  202. {{ settings.free_price_text }}
  203. {% endif %}
  204. </span>
  205. </span>
  206. <span class="was_price">
  207. {% if variant.price < variant.compare_at_price and variant.available %}
  208. <span class="money">{{ variant.compare_at_price | money }}</span>
  209. {% endif %}
  210. </span>
  211.  
  212. {% if section.settings.display_savings %}
  213. <span class="sale savings">
  214. {% if variant.price < variant.compare_at_price and variant.available %}
  215. {{ 'products.product.savings' | t }} {{ variant.compare_at_price | minus: variant.price | times: 100 | divided_by: variant.compare_at_price }}% (<span class="money">{{ variant.compare_at_price | minus: variant.price | money }}</span>)
  216. {% endif %}
  217. </span>
  218. {% endif %}
  219. </p>
  220.  
  221. {% include 'product-notify-me' %}
  222. {% endif %}
  223.  
  224. {% if found_tags != empty %}
  225. <ul class="product-tags">
  226. {% for tag in found_tags %}
  227. {% capture url %}/collections/all/{{ tag | handle }}{% endcapture %}
  228. <li>
  229. <a href="{{ url }}" alt="{{ tag }}" title="Browse all soups that are {{ tag }}">
  230. {{ tag }}{% if forloop.last != true %},{% endif %}
  231. </a>
  232. </li>
  233. {% endfor %}
  234. </ul>
  235. {% endif %}
  236.  
  237. {% if section.settings.product_description_position == "top" %}
  238. {% if product.description != blank %}
  239. <div class="description" itemprop="description">
  240. {{ product.description | split: '<!-- split -->' | first }}
  241. </div>
  242. {% endif %}
  243. {% endif %}
  244.  
  245. <div class="intro-text">
  246. <h2>{{ product.metafields.product_info.intro_text }}</h2>
  247. </div>
  248.  
  249. <div class="product-info-metas">
  250. {% if product.metafields.product_info.tastes_like != blank %}
  251. <div class="meta-child">
  252. <h3>Tastes Like</h3>
  253. {{ product.metafields.product_info.tastes_like }}
  254. </div>
  255. {% endif %}
  256. {% if product.metafields.product_info.make_me_your_own != blank %}
  257. <div class="meta-child">
  258. <h3>Make Me Your Own</h3>
  259. {{ product.metafields.product_info.make_me_your_own }}
  260. </div>
  261. {% endif %}
  262. {% if product.metafields.product_info.eat_me_with != blank %}
  263. <div class="meta-child">
  264. <h3>Eat Me With</h3>
  265. {{ product.metafields.product_info.eat_me_with }}
  266. </div>
  267. {% endif %}
  268. </div>
  269.  
  270.  
  271. {% comment %}
  272. {% if product.tags contains 'Soup' %}
  273. <a style="color: #fff;" href="/collections/build-a-box" class="action_button first_button highlight-true">SHOP NOW</a>
  274. {% endif %}
  275. {% endcomment %}
  276.  
  277.  
  278. {% unless collection_handles contains 'coming-soon' %}
  279. {% include 'product-form' with 'product' %}
  280. {% endunless %}
  281.  
  282. {% if section.settings.product_description_position == "bottom" and isBundleType != true %}
  283. {% if product.description != blank %}
  284. <div class="description bottom descriptionProduct" itemprop="description">
  285. {{ product.description | split: '<!-- split -->' | first }}
  286. </div>
  287. {% endif %}
  288. {% endif %}
  289.  
  290. {% if section.settings.review_position == "next_to_gallery" %}
  291. <div class="shopify-reviews reviewsVisibility--{{settings.enable_shopify_review_comments}}">
  292. <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
  293. </div>
  294. {% endif %}
  295.  
  296. {% if isBundleType and bundleSettings.bigBundle and bundleSettings.count == 6 %}
  297. {% assign bigBundleProduct = all_products[bundleSettings.bigBundle] %}
  298. {% assign bigBundleProductSettings = bigBundleProduct.metafields.variant.bundle_settings.value %}
  299.  
  300. <div class='soups-variants'>
  301. <a href='{{ bigBundleProduct.url }}' class='soups-variants__item'>
  302. <div class='soups-variants__title'>
  303. <img src='{{ 'icon-soup.svg' | asset_url }}'>
  304. <div class='soups-variants__title-caption'><span class='soups-variants__title-value'>{{bigBundleProductSettings.count}}</span>&nbsp;soups</div>
  305. </div>
  306. <div class='soups-variants__prices'>
  307. <div class='soups-variants__price-old'>{{ product.price | times: 2 | money_without_trailing_zeros }}</div>
  308. <div class='soups-variants__price-new'>{{ bigBundleProduct.price | money_without_trailing_zeros }}</div>
  309. </div>
  310. <div class='soups-variants__save'>save {{product.price | times: 2 | minus: bigBundleProduct.price | money_without_trailing_zeros}}</div>
  311. </a>
  312. </div>
  313. {% endif %}
  314.  
  315. {% if section.settings.display_collections or section.settings.display_tags or section.settings.display_type %}
  316. <div class="product_links">
  317. {% if section.settings.display_collections %}
  318. <p>
  319. <span class="label">{{ 'products.product.collections' | t }}:</span>
  320. <span>
  321. {% for col in product.collections %}
  322. <a href="{{ col.url }}" title="{{ col.title }}">{{ col.title }}</a>{% unless forloop.last %},{% endunless %}
  323. {% endfor %}
  324. </span>
  325. </p>
  326. {% endif %}
  327.  
  328. {% if section.settings.display_type %}
  329. <p>
  330. <span class="label">{{ 'products.product.product_types' | t }}:</span>
  331. <span>{{ product.type | link_to_type }}</span>
  332. </p>
  333. {% endif %}
  334.  
  335. {% if section.settings.display_tags %}
  336. <p>
  337. {% for tag in product.tags %}
  338. {% if forloop.first %}
  339. <span class="label">{{ 'products.product.tags' | t }}:</span>
  340. {% endif %}
  341.  
  342. {% unless tag contains 'meta-' %}
  343. <span>
  344. <a href="/collections/{% if collection %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handle }}" title="{{ 'products.product.products_tagged' | t: tag: tag }}">{{ tag }}</a>{% unless forloop.last %},{% endunless %}
  345. </span>
  346. {% endunless %}
  347. {% endfor %}
  348. </p>
  349. {% endif %}
  350. </div>
  351. {% endif %}
  352.  
  353. <div class="meta">
  354. {% if section.settings.display_social_buttons %}
  355. {% include "social-buttons" with "product" %}
  356. {% endif %}
  357. </div>
  358. </div>
  359. </div>
  360.  
  361. {% if product.description contains "<!-- split -->" %}
  362. <br class="clear" />
  363. <div class="section clearfix">
  364. <div class="description">
  365. {{ product.description | split: '<!-- split -->' | last }}
  366. </div>
  367. </div>
  368. {% endif %}
  369.  
  370. {% if section.settings.review_position == "below_gallery" %}
  371. <div class="shopify-reviews reviewsVisibility--{{settings.enable_shopify_review_comments}}">
  372. <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
  373. </div>
  374. {% endif %}
  375.  
  376. {% if isBundleType %}
  377. {% comment %} {% include 'include-cta-bundle' %} {% endcomment %}
  378.  
  379. <div class="product-tabs">
  380. <div class="tabs-head">
  381. {% if product.description != blank %}
  382. <div class="item active" data-target='tab1'>Bundle details</div>
  383. {% endif %}
  384. {% if bundleSettings.soups and bundleSettings.soups.size %}
  385. <div class="item" data-target='tab2'>Soups included</div>
  386. {% endif %}
  387. </div>
  388. <div class="tabs-body">
  389. {% if product.description != blank %}
  390. <div class="tab active" style='display: block;' data-tab='tab1' >
  391. <div class="title">About {{ product.title }}</div>
  392. <div class="tab-descr">
  393. {{ product.description | split: '<!-- split -->' | first }}
  394. </div>
  395. </div>
  396. {% endif %}
  397.  
  398. {% if bundleSettings.soups and bundleSettings.soups.size %}
  399. <div class="tab" data-tab='tab2'>
  400. <div class="title">Soups included</div>
  401. <div class="product-list">
  402. {% for productHandle in bundleSettings.soups %}
  403. {% assign innerProduct = all_products[productHandle] %}
  404. <div class="product">
  405. <a href='{{ innerProduct.url }}' class="image">
  406. <img src="{{ innerProduct.featured_image | image_url: width: 250 }}"/>
  407. </a>
  408. <div class="info">
  409. <div class="product-head">
  410. <a href='{{ innerProduct.url }}' class="product-title">{{ innerProduct.title }}</a>
  411. <div class="product-price">{{ innerProduct.price | money_without_trailing_zeros }}</div>
  412. </div>
  413. {% if innerProduct.metafields.product_info.tastes_like != blank %}
  414. <div class="product-meta">
  415. <h3>Tastes Like</h3>
  416. <div class='product-meta__descr'>
  417. {{ innerProduct.metafields.product_info.tastes_like }}
  418. </div>
  419. </div>
  420. {% elsif innerProduct.metafields.product_info.make_me_your_own != blank %}
  421. <div class="product-meta">
  422. <h3>Make Me Your Own</h3>
  423. <div class='product-meta__descr'>
  424. {{ innerProduct.metafields.product_info.make_me_your_own }}
  425. </div>
  426. </div>
  427. {% elsif innerProduct.metafields.product_info.eat_me_with != blank %}
  428. <div class="product-meta">
  429. <h3>Eat Me With</h3>
  430. <div class='product-meta__descr'>
  431. {{ innerProduct.metafields.product_info.eat_me_with }}
  432. </div>
  433. </div>
  434. {% endif %}
  435.  
  436. {% if innerProduct.description != blank %}
  437. <div class="product-descr" itemprop="description">
  438. {{ innerProduct.description | split: '<!-- split -->' | first }}
  439. </div>
  440. {% endif %}
  441. </div>
  442. {% if innerProduct.description != blank %}
  443. <div class="product-descr product-descr_mob" itemprop="description">
  444. {{ innerProduct.description | split: '<!-- split -->' | first }}
  445. </div>
  446. {% endif %}
  447. </div>
  448. {% endfor %}
  449. </div>
  450. </div>
  451. {% endif %}
  452. </div>
  453. </div>
  454. {% endif %}
  455. </div>
  456.  
  457. {% if sidebar %}
  458.  
  459. {% if section.settings.display_related_products %}
  460. {% include 'include-related-products' %}
  461. {% endif %}
  462. {% if section.settings.display_recently_viewed %}
  463. {% include 'include-recently-viewed' %}
  464. {% endif %}
  465.  
  466. </div>
  467. </div>
  468. </div>
  469.  
  470. {% else %}
  471. </div>
  472. </div>
  473. </div>
  474.  
  475.  
  476. <div class="yotpo yotpo-main-widget" data-product-id="{{ product.id }}" data-name="{{ product.title | escape }}" data-url="{{ shop.url }}{{ product.url }}" data-image-url="{{ product.featured_image | product_img_url: 'large' |replace: '?', '%3F' | replace: '&amp;','%26'}}" data-description="{{ product.description | escape }}" data-price="{{ variant.price | money_without_currency }}" data-currency="{{ shop.currency }}"></div>
  477.  
  478. {% if section.settings.display_related_products %}
  479. {% include 'include-related-products' %}
  480. {% endif %}
  481. {% if section.settings.display_recently_viewed %}
  482. {% include 'include-recently-viewed' %}
  483. {% endif %}
  484.  
  485. {% endif %}
  486.  
  487. <script>
  488. (function() {
  489. if ($(window).width() < 480) {
  490. document.getElementsByClassName("product_gallery")[0].removeAttribute("data-zoom");
  491. }
  492.  
  493. $(".descriptionProduct p span a").addClass("descriptionProductLink");
  494.  
  495. initTabs();
  496. function initTabs() {
  497. $('.tabs-head .item').on('click', function(e){
  498. e.preventDefault();
  499. $(this).addClass('active').siblings('.active').removeClass('active');
  500. $('.tab[data-tab="'+$(this).data('target') +'"]').slideDown().addClass('active').siblings('.active').slideUp().removeClass('active')
  501. })
  502. }
  503. })()
  504. </script>
  505.  
  506. {% comment %}
  507. Construct an instance of accordions, specifying the tag
  508. that contains the title of each accordion, and the container for
  509. all said accordions.
  510. Default settings are all <h5> headers in the body element.
  511.  
  512. This code will find the content between the titles and make that content the
  513. content of the accordion.
  514.  
  515. Paste this snippet at the bottom of whatever template you want accordions in.
  516. {% endcomment %}
  517. <script>
  518. /** Accordions Module, leave defaults alone! **/
  519. function generateAccordions(container='body', title='h5') {
  520. var accordions = Array.prototype.slice.call(
  521. document.querySelectorAll(container + ' ' + title)
  522. );
  523.  
  524. var container = document.querySelector(container);
  525.  
  526. function wrapAccordions() {
  527. accordions.forEach(function(accord) {
  528. var wrapper = document.createElement('div');
  529. var wrapperInner = document.createElement('div');
  530. var wrapperContent = document.createElement('div');
  531.  
  532. wrapper.classList.add('accordion-wrapper');
  533. wrapperInner.classList.add('accordion-inner');
  534. wrapperContent.classList.add('accordion-content');
  535. accord.classList.add('accordion-title');
  536.  
  537. accord.parentNode.insertBefore(wrapper, accord);
  538. wrapper.appendChild(accord);
  539.  
  540. while (wrapper.nextSibling &&
  541. wrapper.nextSibling.nodeName !== title.toUpperCase()) {
  542. wrapperContent.appendChild(wrapper.nextSibling);
  543. }
  544.  
  545. wrapperInner.appendChild(wrapperContent);
  546. wrapper.appendChild(wrapperInner);
  547. });
  548.  
  549. accordions = Array.prototype.slice.call(
  550. container.querySelectorAll('.accordion-wrapper')
  551. );
  552. }
  553.  
  554. function disableAccordions() {
  555. accordions.forEach(function(accord) {
  556. accord.classList.remove('open');
  557. })
  558. }
  559.  
  560. function setListeners() {
  561. accordions.forEach(function(accord) {
  562. accord.addEventListener('click', function(e) {
  563. if (accord.classList.contains('open')) {
  564. accord.classList.remove('open');
  565. } else {
  566. disableAccordions();
  567. accord.classList.add('open');
  568. }
  569. });
  570. });
  571. }
  572.  
  573. function main() {
  574. wrapAccordions();
  575. setListeners();
  576. }
  577.  
  578. main();
  579. }
  580.  
  581. /** Customize selectors here
  582. * I.E: for all the h6 tags in a wrapper with a class of
  583. * "container", you could go:
  584. * generateAccordions('.container', 'h6');
  585. */
  586. if (document.querySelector('.descriptionProduct h5')) {
  587. generateAccordions('.descriptionProduct', 'h5');
  588. }
  589. generateAccordions('.product-tabs .product-list', 'h5');
  590.  
  591. </script>
  592.  
  593. <style>
  594. .accordion-wrapper {
  595. cursor: pointer;
  596. border-bottom: 1px solid #000;
  597. }
  598.  
  599. .accordion-wrapper:first-child {
  600. border-top: 1px solid #000;
  601. }
  602.  
  603. .accordion-wrapper .accordion-inner {
  604. -webkit-box-sizing: border-box;
  605. box-sizing: border-box;
  606. max-height: 0;
  607. overflow: hidden;
  608. -webkit-transition: max-height .1s;
  609. -o-transition: max-height .1s;
  610. transition: max-height .1s;
  611. }
  612.  
  613. .accordion-wrapper .accordion-inner .accordion-content {
  614. padding-bottom: 10px;
  615. }
  616.  
  617. .accordion-wrapper.open .accordion-inner {
  618. max-height: 500px;
  619. }
  620.  
  621. .accordion-wrapper > .accordion-title {
  622. font-size: 1.2em;
  623. letter-spacing: 1px;
  624. }
  625.  
  626. .accordion-title {
  627. display: block;
  628. margin: 0;
  629. padding: 5px 0;
  630. position: relative;
  631. text-transform: uppercase;
  632. }
  633.  
  634. .accordion-title::after {
  635. -webkit-box-align: center;
  636. -ms-flex-align: center;
  637. align-items: center;
  638. content: "\002b";
  639. display: -webkit-box;
  640. display: -ms-flexbox;
  641. display: flex;
  642. font-family: monospace;
  643. height: 100%;
  644. -webkit-box-pack: center;
  645. -ms-flex-pack: center;
  646. justify-content: center;
  647. position: absolute;
  648. right: 0;
  649. top: 50%;
  650. -webkit-transform: translateY(-50%);
  651. -ms-transform: translateY(-50%);
  652. transform: translateY(-50%);
  653. }
  654.  
  655. .accordion-wrapper.open > .accordion-title::after {
  656. content: "\2212";
  657. }
  658. </style>
  659.  
  660. {% schema %}
  661.  
  662. {
  663. "name": "Product",
  664. "class": "product-template",
  665. "settings": [
  666. {
  667. "type": "header",
  668. "content": "Product gallery"
  669. },
  670. {
  671. "type": "checkbox",
  672. "id": "gallery_arrows",
  673. "label": "Show arrows on product gallery",
  674. "default": true
  675. },
  676. {
  677. "type": "checkbox",
  678. "id": "activate_zoom",
  679. "label": "Magnify product images on hover"
  680. },
  681. {
  682. "type": "checkbox",
  683. "id": "enable_product_lightbox",
  684. "label": "Enable product gallery popup",
  685. "default": true
  686. },
  687. {
  688. "type": "checkbox",
  689. "id": "activate_autoplay",
  690. "label": "Enable product gallery slideshow"
  691. },
  692. {
  693. "type": "select",
  694. "id": "slideshow_animation",
  695. "label": "Gallery transition",
  696. "options": [
  697. {
  698. "value": "slide",
  699. "label": "Slide"
  700. },
  701. {
  702. "value": "fade",
  703. "label": "Fade"
  704. }
  705. ],
  706. "default": "slide"
  707. },
  708. {
  709. "type": "radio",
  710. "id": "product_images_position",
  711. "label": "Gallery position",
  712. "options": [
  713. {
  714. "value": "left",
  715. "label": "Left"
  716. },
  717. {
  718. "value": "right",
  719. "label": "Right"
  720. }
  721. ]
  722. },
  723. {
  724. "type": "checkbox",
  725. "id": "product_thumbs",
  726. "label": "Show product gallery thumbnails",
  727. "default": true
  728. },
  729. {
  730. "type": "select",
  731. "id": "thumbnail_position",
  732. "label": "Thumbnail position",
  733. "default": "bottom-slider",
  734. "options": [
  735. {
  736. "value": "bottom-thumbnails",
  737. "label": "Bottom (grid)"
  738. },
  739. {
  740. "value": "bottom-slider",
  741. "label": "Bottom (slider)"
  742. },
  743. {
  744. "value": "left-thumbnails",
  745. "label": "Left"
  746. },
  747. {
  748. "value": "right-thumbnails",
  749. "label": "Right"
  750. }
  751. ]
  752. },
  753. {
  754. "type": "header",
  755. "content": "Product info"
  756. },
  757. {
  758. "type": "checkbox",
  759. "id": "product_breadcrumb",
  760. "label": "Show breadcrumb links"
  761. },
  762. {
  763. "type": "checkbox",
  764. "id": "display_vendor",
  765. "label": "Show vendor"
  766. },
  767. {
  768. "type": "checkbox",
  769. "id": "display_sku",
  770. "label": "Show SKU"
  771. },
  772. {
  773. "type": "checkbox",
  774. "id": "display_savings",
  775. "label": "Show price savings",
  776. "default": true
  777. },
  778. {
  779. "type": "checkbox",
  780. "id": "show_payment_button",
  781. "label": "Show dynamic checkout button",
  782. "default": false,
  783. "info": "Lets customers check out directly using a familiar payment method. [Learn more](https://help.shopify.com/manual/using-themes/change-the-layout/dynamic-checkout)"
  784. },
  785. {
  786. "type": "checkbox",
  787. "id": "display_collections",
  788. "label": "Show collections"
  789. },
  790. {
  791. "type": "checkbox",
  792. "id": "display_type",
  793. "label": "Show type"
  794. },
  795. {
  796. "type": "checkbox",
  797. "id": "display_tags",
  798. "label": "Show tags"
  799. },
  800. {
  801. "type": "checkbox",
  802. "id": "display_social_buttons",
  803. "label": "Show social media share icons",
  804. "default": true
  805. },
  806. {
  807. "type": "radio",
  808. "id": "product_description_position",
  809. "label": "Description position",
  810. "options": [
  811. {
  812. "value": "top",
  813. "label": "Above product form"
  814. },
  815. {
  816. "value": "bottom",
  817. "label": "Below product form"
  818. }
  819. ]
  820. },
  821. {
  822. "type": "header",
  823. "content": "Product reviews"
  824. },
  825. {
  826. "type": "paragraph",
  827. "content": "Reviews app must be enabled [(?)](https://help.outofthesandbox.com/hc/en-us/articles/360008549274#section2)"
  828. },
  829. {
  830. "type": "checkbox",
  831. "id": "enable_shopify_product_badges",
  832. "label": "Display star rating on product",
  833. "default": false
  834. },
  835. {
  836. "type": "radio",
  837. "id": "review_position",
  838. "label": "Reviews position",
  839. "default": "next_to_gallery",
  840. "options": [
  841. {
  842. "value": "next_to_gallery",
  843. "label": "In product description area"
  844. },
  845. {
  846. "value": "below_gallery",
  847. "label": "Below image\/description"
  848. }
  849. ]
  850. },
  851. {
  852. "type": "header",
  853. "content": "Related products"
  854. },
  855. {
  856. "type": "checkbox",
  857. "id": "display_related_products",
  858. "label": "Show related products ([?](https:\/\/help.outofthesandbox.com\/hc\/en-us\/articles\/115006909487-Related-Products))",
  859. "default": true
  860. },
  861. {
  862. "type": "radio",
  863. "id": "related_products_style",
  864. "label": "Layout",
  865. "default": "grid",
  866. "options": [
  867. {
  868. "value": "slider",
  869. "label": "Slider"
  870. },
  871. {
  872. "value": "grid",
  873. "label": "Grid"
  874. }
  875. ]
  876. },
  877. {
  878. "type": "range",
  879. "id": "related_products_limit",
  880. "label": "Limit products",
  881. "min": 3,
  882. "max": 50,
  883. "step": 1,
  884. "default": 12
  885. },
  886. {
  887. "type": "range",
  888. "id": "products_per",
  889. "label": "Products per row",
  890. "min": 3,
  891. "max": 5,
  892. "step": 1,
  893. "default": 3
  894. },
  895. {
  896. "type": "header",
  897. "content": "Recently viewed products"
  898. },
  899. {
  900. "type": "paragraph",
  901. "content": "To test the recently viewed products, view your online store outside of the Editor and visit multiple product pages ([?](https:\/\/help.outofthesandbox.com\/hc\/en-us\/articles\/115008765228))"
  902. },
  903. {
  904. "type": "checkbox",
  905. "id": "display_recently_viewed",
  906. "label": "Show recently viewed products",
  907. "default": false
  908. },
  909. {
  910. "type": "text",
  911. "id": "rv_title",
  912. "label": "Title",
  913. "default": "Recently Viewed Items"
  914. },
  915. {
  916. "type": "radio",
  917. "id": "rv_products_style",
  918. "label": "Layout",
  919. "default": "grid",
  920. "options": [
  921. {
  922. "value": "slider",
  923. "label": "Slider"
  924. },
  925. {
  926. "value": "grid",
  927. "label": "Grid"
  928. }
  929. ]
  930. },
  931. {
  932. "type": "range",
  933. "id": "rv_max_display",
  934. "label": "Products limit",
  935. "min": 3,
  936. "max": 12,
  937. "step": 1,
  938. "default": 4
  939. },
  940. {
  941. "type": "range",
  942. "id": "rv_per",
  943. "label": "Products per row",
  944. "min": 3,
  945. "max": 5,
  946. "step": 1,
  947. "default": 4
  948. },
  949. {
  950. "type": "header",
  951. "content": "Sidebar"
  952. },
  953. {
  954. "type": "paragraph",
  955. "content": "Create a sidebar by adding content blocks."
  956. },
  957. {
  958. "type": "checkbox",
  959. "id": "toggle",
  960. "label": "Toggle sidebar content",
  961. "default": false
  962. }
  963. ],
  964. "blocks": [
  965. {
  966. "type": "filter_by_collection",
  967. "name": "Collection list",
  968. "limit": 1
  969. },
  970. {
  971. "type": "menu",
  972. "name": "Menu",
  973. "settings": [
  974. {
  975. "type": "link_list",
  976. "id": "custom_menu_linklist",
  977. "label": "Menu"
  978. }
  979. ]
  980. },
  981. {
  982. "type": "page",
  983. "name": "Page",
  984. "settings": [
  985. {
  986. "type": "page",
  987. "id": "content_page",
  988. "label": "Page"
  989. }
  990. ]
  991. },
  992. {
  993. "type": "recently_viewed",
  994. "name": "Recently viewed products",
  995. "limit": 1,
  996. "settings": [
  997. {
  998. "type": "paragraph",
  999. "content": "To test the recently viewed products, view your online store outside of the Editor and visit multiple product pages ([?](https:\/\/help.outofthesandbox.com\/hc\/en-us\/articles\/115008765228))"
  1000. },
  1001. {
  1002. "type": "text",
  1003. "id": "sidebar_rv_title",
  1004. "label": "Title",
  1005. "default": "Recently Viewed"
  1006. },
  1007. {
  1008. "type": "range",
  1009. "id": "sidebar_rv_per",
  1010. "label": "Products limit",
  1011. "min": 1,
  1012. "max": 4,
  1013. "step": 1,
  1014. "default": 3
  1015. }
  1016. ]
  1017. },
  1018. {
  1019. "type": "filter_by_tag",
  1020. "name": "Tag list",
  1021. "limit": 1
  1022. },
  1023. {
  1024. "type": "text",
  1025. "name": "Text",
  1026. "settings": [
  1027. {
  1028. "type": "text",
  1029. "id": "title",
  1030. "label": "Heading",
  1031. "default": "Heading"
  1032. },
  1033. {
  1034. "type": "richtext",
  1035. "id": "text",
  1036. "label": "Text",
  1037. "default": "<p>Text area can be used for special announcements or general information.</p>"
  1038. }
  1039. ]
  1040. },
  1041. {
  1042. "type": "filter_by_type",
  1043. "name": "Type list",
  1044. "limit": 1
  1045. },
  1046. {
  1047. "type": "filter_by_vendor",
  1048. "name": "Vendor list",
  1049. "limit": 1
  1050. }
  1051. ],
  1052. "default": {
  1053. "settings": {
  1054.  
  1055. }
  1056. }
  1057. }
  1058.  
  1059. {% endschema %}
  1060.  
  1061. <div class="zrx-product-bottom"></div>
  1062.  
Advertisement
Add Comment
Please, Sign In to add comment