Duplicate Products are added in Opencart – submitting the same form twice

We are seeing issues in the Chrome browser for Opencart that it is adding duplicate products while adding the products, it looks like it is submitting the same form twice. We just commented on the form submission for the IE browser and it is not submitting duplicate products.

Duplicate products issues on Opencart

Go to admin/view/javascript/common.js and find the following lines of code:

$(document).ready(function() {
	//Form Submit for IE Browser
	$('button[type=\'submit\']').on('click', function() {
		$("form[id*='form-']").submit();
	});

Then comment out like below:

$(document).ready(function() {
	//Form Submit for IE Browser
	// $('button[type=\'submit\']').on('click', function() {
	// 	$("form[id*='form-']").submit();
	// });

After commenting on those lines of code it is not submitting the product twice, so there are no duplicate products inserted. We tested with test 3 products as in the above image.

Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our twitter account @rupaknpl and subscribe to our YouTube channel for opencart tutorials.

Previous articleOpencart user, permissions, user group management, and API users
Next articleAdd a new language in Opencart 3 and ways to set a default language

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here