-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable add to until page load #20964
disable add to until page load #20964
Conversation
…om/sunilit42/magento2 into disable-addto-cart-while-page-load
Sunil Patel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
Hi @sunilit42. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
app/code/Magento/Catalog/view/frontend/web/js/validate-product.js
Outdated
Show resolved
Hide resolved
@orlangur i did changes, please check it again |
Hi @sunilit42 , looks like you made some commits with email different than in your GitHub profile, please, add email from commits to your profile! |
@@ -13,7 +13,8 @@ define([ | |||
$.widget('mage.productValidate', { | |||
options: { | |||
bindSubmit: false, | |||
radioCheckboxClosest: '.nested' | |||
radioCheckboxClosest: '.nested', | |||
addToCartButtonSelector: '.action.tocart' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, CSS classes cannot be used as a JavaScript logic selectors. Please check examples in link I posted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orlangur magento itself using that same class into add to cart js so i am using that
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js#L23
let me know if still you want to change it
@sidolov |
Hi @sunilit42. You have two options. |
i created new pull request |
Hi @sunilit42, thank you for your contribution! |
Description (*)
Open a configurable product having DropDown options
When the page is being loaded, you will notice that the dropdowns has no values
Click Add To Cart button during this time. The page will be reloaded and a notice message "Open a configurable product having DropDown options" will be shown
Contribution checklist (*)