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.

Minor fix AskQuestion on product

support34c68b58b058
diff --git a/src/Web/Grand.Web/Views/Product/Partials/AskQuestionOnProduct.cshtml b/src/Web/Grand.Web/Views/Product/Partials/AskQuestionOnProduct.cshtml
index 6b8ba176e..46394f683 100644
--- a/src/Web/Grand.Web/Views/Product/Partials/AskQuestionOnProduct.cshtml
+++ b/src/Web/Grand.Web/Views/Product/Partials/AskQuestionOnProduct.cshtml
@@ -42,7 +42,6 @@
}),
methods: {
sendContactUsForm(urladd) {
-
var bodyFormData = new FormData();
bodyFormData.append('AskQuestionEmail', vm.$refs.AskQuestionEmail.value);
bodyFormData.append('AskQuestionFullName', vm.$refs.AskQuestionFullName.value);
@@ -50,8 +49,8 @@
bodyFormData.append('AskQuestionMessage', vm.$refs.AskQuestionMessage.value);
bodyFormData.append('Id', vm.$refs.AskQuestionProductId.value);
bodyFormData.append('__RequestVerificationToken', document.querySelector('.product-details-page input[name=__RequestVerificationToken]').value);
- if (document.querySelector("#contact-us-product textarea[id^='g-recaptcha-response']")) {
- bodyFormData.append('g-recaptcha-response-value', document.querySelector(".product-details-page textarea[id^='g-recaptcha-response']").value);
+ if (document.querySelector("[id^='g-recaptcha-response']")) {
+ bodyFormData.append('g-recaptcha-response-value', document.querySelector("[id^='g-recaptcha-response']").value);
}
axios({
@@ -92,7 +91,7 @@
<div class="buttons generalMarginSupporter pt-1 pb-1">
<input type="submit" name="send-email" class="btn btn-info send-ask-question-button"
- value="@Loc["Products.AskQuestion.Button"]" data-form="askquestion.sendContactUsForm('@Url.RouteUrl("AskQuestionOnProduct")')" />
+ value="@Loc["Products.AskQuestion.Button"]" @@click="askquestion.sendContactUsForm('@Url.RouteUrl("AskQuestionOnProduct")')" />
<span class="sr-only">@Loc["Products.AskQuestion.Button"]</span>
</div>