Page 1 of 1
double product entry
Posted: Wed Jun 26, 2019 5:13 am
by garrie007
Hi All,
I am getting double entry in the admin area every time I add a new product, any help very much appreciated.
Version 3.0.3.1
Regards
Re: double product entry
Posted: Wed Jun 26, 2019 5:56 pm
by paulfeakins
What extensions do you have installed?
Re: double product entry
Posted: Wed Jun 26, 2019 9:48 pm
by garrie007
paulfeakins wrote: ↑Wed Jun 26, 2019 5:56 pm
What extensions do you have installed?
Hi,
Its a clean install, only extension that is installed is the square payment extension.
Regards
Re: double product entry
Posted: Wed Jun 26, 2019 10:18 pm
by thekrotek
What do you mean under "getting double entry"? This is not a clear description.
Re: double product entry
Posted: Thu Jun 27, 2019 3:30 pm
by garrie007
thekrotek wrote: ↑Wed Jun 26, 2019 10:18 pm
What do you mean under "getting double entry"? This is not a clear description.
Hi,
When I add a new product in the admin area it duplicates the product so I have two I then have to delete one of the products.
Regards
Re: double product entry
Posted: Thu Jun 27, 2019 4:28 pm
by paulfeakins
garrie007 wrote: ↑Wed Jun 26, 2019 9:48 pm
Its a clean install, only extension that is installed is the square payment extension.
Any error messages in any of the logs?
Re: double product entry
Posted: Thu Jun 27, 2019 6:13 pm
by Dreamvention
Hi,
It's a common problem. You should edit one table in your database. This table is oc_product_advertise_google
You should edit it's ID field with AI. This problem was fixed in Opencart 3.0.3.2, so you can just reinstall it with the newer version.
___________________________________________________
Re: double product entry
Posted: Thu Jun 27, 2019 6:14 pm
by paulfeakins
garrie007 wrote: ↑Wed Jun 26, 2019 5:13 am
I am getting double entry in the admin area every time I add a new product, any help very much appreciated.
Version 3.0.3.1
Dreamvention wrote: ↑Thu Jun 27, 2019 6:13 pm
Do you use Opencart 3.0.3.1?
Re: double product entry
Posted: Thu Jun 27, 2019 6:17 pm
by JNeuhoff
I am unable to reproduce this error on a clean OC 3.0.3.1. As is often the case, I have the feeling that the OP isn't telling the whole story. More details on how exactly to reproduce this error would be useful. Also, any error.log entries would help.
Re: double product entry
Posted: Thu Jun 27, 2019 6:20 pm
by Dreamvention
If I understood him correctly, he is getting the "DUPLICATE ENTRY FOR KEY" mysql error. In opencart 3.0.3.1 due to Google Shopping extension, every time you add new product the new row appears in oc_product_advertise_google_table. It's id field is set without AI, so after you create second product the error appears.
Re: double product entry
Posted: Thu Jun 27, 2019 6:26 pm
by paulfeakins
Dreamvention wrote: ↑Thu Jun 27, 2019 6:20 pm
If I understood him correctly, he is getting the "DUPLICATE ENTRY FOR KEY" mysql error.
They're saying the product appears twice, they didn't mention an error message.
Re: double product entry
Posted: Tue Jul 09, 2019 6:07 pm
by dangchung
paulfeakins wrote: ↑Thu Jun 27, 2019 6:26 pm
Dreamvention wrote: ↑Thu Jun 27, 2019 6:20 pm
If I understood him correctly, he is getting the "DUPLICATE ENTRY FOR KEY" mysql error.
They're saying the product appears twice, they didn't mention an error message.
Hi,
That's exactly what i am facing to now but in OC3.0.2. When I add a new product/blog post, a duplication of the original product/blog post is automatically created with the same content inside but different product/post id (as the image below). There is no any error message.

Please help us how to fix this problem.
Thanks
Re: double product entry
Posted: Tue Jul 09, 2019 6:09 pm
by straightlight
That's exactly what i am facing to now. When I add a new product/blog post, a duplication of the original product/blog post is automatically created with the same content inside but different product/post id (as the image below).
Extension. What about the core from admin - > catalog - > products page
without the blog extension installed?
Re: double product entry
Posted: Fri Jul 12, 2019 6:06 pm
by wrick0
I have the same problem (it didnt excist before)
When i create a new product , it is added twice or sometimes even 3 times. The same for categories.
Opencart 3.0.3.1
Did anybody manage to find a fix ? there is no clear error in my error log
Re: double product entry
Posted: Fri Jul 12, 2019 6:58 pm
by JNeuhoff
Unable to reproduce your error.
What are the exact steps to reproduce your error on a freshly installed OC 3.0.3.2 ? (don't use 3.0.3.1)
Re: double product entry
Posted: Fri Jul 12, 2019 7:01 pm
by straightlight
The last known cause reported on the forum about the same issue with OC v3.0.3.2, so far, is when someone restored is backup due to installed extensions, the issue got resolved. With OC v3.0.3.1, this issue may still persists until either patching or, even more easier, to upgrade.
Source:
viewtopic.php?f=201&t=212731&p=759676#p759676
Re: double product entry
Posted: Fri Jul 12, 2019 11:18 pm
by straightlight
Re: double product entry
Posted: Sat Oct 26, 2019 1:23 am
by harmonybrew
I was doing some custom work in the back-end in Opencart 3.0.3.2, using the products tab as a template and came across the same problem. This fixed it for me.
in admin/view/template/catalog/product_list.twig (starting on line 236) change:
Code: Select all
$('button[form=\'form-product\']').on('click', function(e) {
$('#form-product').attr('action', $(this).attr('formaction'));
});
to:
Code: Select all
$('button[form=\'form-product\']').on('click', function(e) {
e.preventDefault();
$('#form-product').attr('action', $(this).attr('formaction'));
});
There was some evidence from my research that a timeout could also help, but I did not need this.
https://stackoverflow.com/questions/367 ... mit-button
The products tab was working fine, my problem was only with my custom code, but this might still be a good answer for you.
I hope this helps.
Re: double product entry
Posted: Fri Nov 15, 2019 12:42 pm
by doggan
Hello,
I had the exact same issue told on the link below... Fresh Opencart 3.0.3.2 install, Windows and Chrome to work on Opencart Admin. Whenever I click save button, products and other stuff got saved twice.
This link worked for me...
https://github.com/opencart/opencart/issues/7495