-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from Voog/feature/122_autogenerated_product_l…
…ayout Add auto-generated product layout (#123)
- Loading branch information
Showing
25 changed files
with
1,004 additions
and
6,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{%- capture _button_attributes %} | ||
data-product-id="{{ product.id }}" | ||
data-product="{{ product | json | escape }}" | ||
data-settings="{"title":"{{ "add_to_cart" | lc | escape_once }}"}" | ||
{% endcapture -%} | ||
|
||
{% if editmode != true and product.available? == false %} | ||
<div class="edy-buy-button-container edy-buy-button-view"> | ||
<div class="form_field"> | ||
<div class="edy-buy-button custom-btn custom-btn-disabled edy-buy-button-disabled"> | ||
<span class="edy-buy-button-title">{{ 'ecommerce.buy_button.currently_unavailable' | lc }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
{% elsif product.uses_variants %} | ||
<div class="edy-buy-button-container edy-buy-button-view" {{ _button_attributes }}> | ||
<div class="edy-buy-button-variants"> | ||
{% for variant_type in product.variant_types %} | ||
<div class="form_field" data-variation-id="{{ variant_type.id }}"> | ||
<label class="form_field_label">{{ variant_type.name | escape_once }}</label> | ||
<select class="form_field_select" data-variation-attribute-id="{{ variant_type.id }}"> | ||
<option value="">---</option> | ||
{%- for variant_value in variant_type.variant_values %} | ||
<option value="{{ variant_value.id }}">{{ variant_value.name | escape_once }}</option> | ||
{%- endfor %} | ||
</select> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
<div class="form_field"> | ||
<div class="edy-buy-button custom-btn custom-btn-disabled edy-buy-button-disabled"> | ||
{%- if product.out_of_stock? %} | ||
<span class="edy-buy-button-title">{{ 'out_of_stock' | lc | escape_once }}</span> | ||
{% else %} | ||
<span class="edy-buy-button-title">{{ 'add_to_cart' | lc | escape_once }}</span> | ||
{% endif -%} | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
{% if editmode or product.out_of_stock? %} | ||
{% assign buy_button_classes = "custom-btn-disabled edy-buy-button-disabled" %} | ||
{% endif %} | ||
<div class="edy-buy-button-container edy-buy-button-view"> | ||
<div class="form_field"> | ||
<div class="edy-buy-button custom-btn {{ buy_button_classes }}" {{ _button_attributes }}> | ||
{% if product.out_of_stock? %} | ||
<span class="edy-buy-button-title">{{ 'out_of_stock' | lc | escape_once }}</span> | ||
{% else %} | ||
<span class="edy-buy-button-title">{{ 'add_to_cart' | lc | escape_once }}</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{%- assign breadcrumbsString = breadcrumbsScript | replace: '<script type="application/ld+json">', '' | replace: "</script>", '' | replace: site.url, '' | replace: '@', '' -%} | ||
{%- assign breadcrumbsObj = breadcrumbsString | json_parse -%} | ||
|
||
<ul class="menu menu-horizontal menu-public menu-breadcrumbs" data-search-indexing-allowed="false"> | ||
{%- for listItem in breadcrumbsObj.itemListElement %} | ||
{%- assign pageUrl = page.url | remove_first: "/" -%} | ||
|
||
<li class="menu-item"> | ||
<a class="{% if forloop.index > 1 %}with_arrow{% endif %} menu-link" href="/{{ listItem.item.id }}"> | ||
{{ listItem.item.name }} | ||
</a> | ||
</li> | ||
{% endfor -%} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.