Skip to content

Commit

Permalink
Merge pull request PrestaShop#251 from SharakPL/fix-buttons
Browse files Browse the repository at this point in the history
Fix buttons on wishlist products
  • Loading branch information
SharakPL authored Mar 5, 2024
2 parents d2653e7 + a91972b commit 46273b6
Showing 1 changed file with 7 additions and 21 deletions.
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

0 comments on commit 46273b6

Please sign in to comment.