Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Plugin Theme.Modern - update add-to-cart-button onclick event in ProductBoxListVue.cshtml and ProductBoxVue.cshtml

supportc5df244a0c51
diff --git a/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxListVue.cshtml b/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxListVue.cshtml
index 55aef0c92..2a5f983a1 100644
--- a/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxListVue.cshtml
+++ b/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxListVue.cshtml
@@ -145,7 +145,7 @@
</a>
</template>
<template v-else>
- <a class="add-to-cart-button btn btn-outline-secondary" :onclick="'AxiosCart.addproducttocart_catalog(`@Url.RouteUrl("AddProductCatalog")/' + Model.Id +'/2`, `' + Model.ShowQty +'`,`' + Model.Id + '`);return false;'">
+ <a class="add-to-cart-button btn btn-outline-secondary" :onclick="'AxiosCart.addproducttocart_catalog(`@Url.RouteUrl("AddProductCatalog")/' + Model.Id +'/1`, `' + Model.ShowQty +'`,`' + Model.Id + '`);return false;'">
<template v-if="Model.ProductType == 20">
@Loc["ShoppingCart.Reservation"]
</template>
diff --git a/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxVue.cshtml b/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxVue.cshtml
index dfd551c5e..68214d499 100644
--- a/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxVue.cshtml
+++ b/src/Plugins/Theme.Modern/Views/Modern/Shared/Partials/ProductBoxVue.cshtml
@@ -209,7 +209,7 @@
</a>
</template>
<template v-else>
- <a class="add-to-cart-button btn btn-outline-secondary" :onclick="'AxiosCart.addproducttocart_catalog(`@Url.RouteUrl("AddProductCatalog")/' + Model.Id +'/2`, `' + Model.ShowQty +'`,`' + Model.Id + '`);return false;'">
+ <a class="add-to-cart-button btn btn-outline-secondary" :onclick="'AxiosCart.addproducttocart_catalog(`@Url.RouteUrl("AddProductCatalog")/' + Model.Id +'/1`, `' + Model.ShowQty +'`,`' + Model.Id + '`);return false;'">
<template v-if="Model.ProductType == 20">
@Loc["ShoppingCart.Reservation"]
</template>