I have included + and - to increment and decrement the quantity of a product in the cart page. Now i need to update it automatically without clicking the update shopping cart button. How can i do that? Kindly help me to fix this problem
You can follow below URL for your reference:
Let me know if you still face any issue.
Kudos and accept it as a solution if it works. Cheers coding
Thanks @Manish Mittal for your response.
I had tried using the first link (stackexchange.com). It increments and decrements the quantity. But i need to update the cart automatically once i clicks the +/- button. If i clicks the +/- button, the page has to be load and the cart value needs to be changed. I am stuck on that updation. Kindly help if you know the solution for that.
Refused to execute script from 'http://127.0.0.1/magento/pub/static/frontend/Samplestore/theme/en_US/custom.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
require.js:141 Uncaught Error: Script error for: custom
at makeError (require.js:166)
at HTMLScriptElement.onScriptError (require.js:1681)
I have got these errors in the console.
Can you please share the details of Network tab (Chrome debug toolbar) as well?
It seems request should return content in some format (like JSON) & its returning in another format (Might be due to 404 status OR something else).
It seems that you have placed your js file on the wrong location.
Currently, your js file location is
But it must be as given below
Hi @Mayur Bhuva
No i have placed in the correct location.
i.e., in the
Please update your code here so It will be very useful for everyone to answer.