Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions _dev/front/js/components/Product/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@
<button
class="btn wishlist-product-addtocart"
:class="{
'btn-secondary': product.customizable === '1',
'btn-primary': product.customizable === '0'
'btn-secondary': product.customizable,
'btn-primary': !product.customizable
}"
:disabled="isDisabled || forceDisable"
@click="
product.add_to_cart_url || product.customizable === '1'
product.add_to_cart_url || product.customizable
? addToCartAction()
: null
"
>
<i
class="material-icons shopping-cart"
v-if="product.customizable === '0'"
v-if="!product.customizable"
>
shopping_cart
</i>
{{ product.customizable === '1' ? customizeText : addToCart }}
{{ product.customizable ? customizeText : addToCart }}
</button>

<button
Expand Down Expand Up @@ -235,7 +235,7 @@
return false;
}

if (this.product.customizable === '1') {
if (this.product.customizable) {
return false;
}

Expand Down Expand Up @@ -271,7 +271,7 @@
});
},
async addToCartAction() {
if (this.product.add_to_cart_url && this.product.customizable !== '1') {
if (this.product.add_to_cart_url && !this.product.customizable) {
try {
this.forceDisable = true;
const datas = new FormData();
Expand Down Expand Up @@ -474,20 +474,6 @@
&-addtocart {
width: 100%;
text-transform: inherit;
padding-left: 0.625rem;

&.btn-secondary {
background-color: #dddddd;

&:hover {
background-color: #dddddd;
opacity: 0.7;
}
}

i {
margin-top: -0.1875rem;
}
}
}

Expand Down