Skip to content

Commit

Permalink
CC-21131 Fixed Configure button visibility in the Shopping list (#2…
Browse files Browse the repository at this point in the history
…268)

CC-21131 Fixed `Configure` button visibility in the Shopping list
  • Loading branch information
danilmoro3 authored Sep 20, 2022
1 parent d63ad1a commit 35749f4
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
border-top: 1px solid $setting-color-light;

&--disable {
opacity: 0.4;
position: relative;

&::after {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
background: $setting-color-white;
opacity: 0.4;
cursor: not-allowed;
}
}

&:first-child,
Expand All @@ -24,6 +36,11 @@
}
}

&__configuration-button {
position: relative;
z-index: $setting-zi-element;
}

@content;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,51 +97,90 @@
<td class="{{ config.name }}__cell">
{% block productColInner %}
<ul class="list spacing-y">
<li class="list__item">
<a itemprop="url" href="{{ item.url }}"><span itemprop="name">{{ item.name }}</span></a>
</li>
<li class="list__item">
<small itemprop="sku" class="text-secondary">{{ item.sku }}</small>
<input class="input" type="hidden"
name="shoppingListItems[{{ item.idShoppingListItem }}]"
value="{{ item.shoppingListItem.toArray | json_encode() }}">
</li>

<li class="list__item">
{% set listOfAttributes = {} %}
{% for attribute in item.superAttributesDefinition %}
{% if item.attributes[attribute] is defined %}
{% set listOfAttributes = listOfAttributes | merge({ ('product.attribute.' ~ attribute) | trans: item.attributes[attribute] }) %}
{% endif %}
{% endfor %}

{% include molecule('product-item-attributes') with {
{% block productName %}
<li class="list__item">
<a itemprop="url" href="{{ item.url }}"><span itemprop="name">{{ item.name }}</span></a>
</li>
{% endblock %}

{% block productSku %}
<li class="list__item">
<small itemprop="sku" class="text-secondary">{{ item.sku }}</small>
<input class="input" type="hidden"
name="shoppingListItems[{{ item.idShoppingListItem }}]"
value="{{ item.shoppingListItem.toArray | json_encode() }}">
</li>
{% endblock %}

{% block productAttributes %}
<li class="list__item">
{% set listOfAttributes = {} %}
{% for attribute in item.superAttributesDefinition %}
{% if item.attributes[attribute] is defined %}
{% set listOfAttributes = listOfAttributes | merge({ ('product.attribute.' ~ attribute) | trans: item.attributes[attribute] }) %}
{% endif %}
{% endfor %}

{% include molecule('product-item-attributes') with {
data: {
list: listOfAttributes,
},
} only %}
</li>
{% endblock %}

{% block productNote %}
{% widget 'ShoppingListItemNoteWidget' args [item.shoppingListItem] only %}
{% block body %}
<li class="list__item">{{ parent() }}</li>
{% endblock %}
{% endwidget %}
{% endblock %}

{% block productOptions %}
{% embed molecule('shopping-list-item-product-option-display', 'ProductOptionWidget') ignore missing with {
class: 'list list--expand',
data: {
list: listOfAttributes,
options: item.shoppingListItem.productOptions,
},
} only %}
</li>
{% block component %}
<li class="list__item">{{ parent() }}</li>
{% endblock %}
{% endembed %}
{% endblock %}

{% widget 'ShoppingListItemNoteWidget' args [item.shoppingListItem] only %}
{% endwidget %}
{% block productSoldBy %}
{% widget 'SoldByMerchantWidget' args [item] only %}
{% block body %}
<li class="list__item">{{ parent() }}</li>
{% endblock %}
{% endwidget %}
{% endblock %}

{% include molecule('shopping-list-item-product-option-display', 'ProductOptionWidget') ignore missing with {
class: 'list list--expand',
data: {
options: item.shoppingListItem.productOptions,
},
} only %}

{% widget 'SoldByMerchantWidget' args [item] only %}
{% block template %}
<li class="list__item">
{{ parent() }}
</li>
{% endblock %}
{% endwidget %}
{% block productConfigurationInfo %}
{% widget 'ProductConfigurationShoppingListItemDisplayWidget' args [item.shoppingListItem] only %}
{% block body %}
<li class="list__item">{{ parent() }}</li>
{% endblock %}
{% endwidget %}
{% endblock %}

{% widget 'ProductConfigurationShoppingListItemDisplayWidget' args [item.shoppingListItem] only %}{% endwidget %}
{% widget 'ProductConfigurationShoppingListPageButtonWidget' args [item.shoppingListItem] only %}{% endwidget %}
{% block productConfigurationButton %}
{% widget 'ProductConfigurationShoppingListPageButtonWidget' args [item.shoppingListItem] with {
embed: {
configName: config.name,
},
} only %}
{% block body %}
<li class="list__item">
{% set buttonClass = embed.configName ~ '__configuration-button ' ~ buttonClass %}

{{ parent() }}
</li>
{% endblock %}
{% endwidget %}
{% endblock %}
</ul>
{% endblock %}
</td>
Expand Down

0 comments on commit 35749f4

Please sign in to comment.