Skip to main contentSkip to footer

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

Rupak Nepali
Share:
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.

Comments

Join the conversation and share your thoughts

Leave a Comment

Your comment will be reviewed before publishing.

Be the first to comment on this post!

Innovation

Let's Make Something Amazing Together

We always provide our best creative ideas at the highest level. Tell us about your project and we will make it work.

InnovateBringing innovative solutions to complex problems
AutomateStreamlining processes through automation
DominateLeading the market with exceptional results
Build Smarter and Launch FasterEfficient development for rapid deployment