Post by garrie007 » Wed Jun 26, 2019 5:13 am

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

New member

Posts

Joined
Mon Apr 08, 2019 5:39 am

Post by paulfeakins » Wed Jun 26, 2019 5:56 pm

What extensions do you have installed?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by garrie007 » Wed Jun 26, 2019 9:48 pm

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

New member

Posts

Joined
Mon Apr 08, 2019 5:39 am

Post by thekrotek » Wed Jun 26, 2019 10:18 pm

What do you mean under "getting double entry"? This is not a clear description.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by garrie007 » Thu Jun 27, 2019 3:30 pm

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

New member

Posts

Joined
Mon Apr 08, 2019 5:39 am

Post by paulfeakins » Thu Jun 27, 2019 4:28 pm

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?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Dreamvention » Thu Jun 27, 2019 6:13 pm

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.
___________________________________________________
Last edited by Dreamvention on Thu Jun 27, 2019 6:14 pm, edited 1 time in total.

Many OpenCart users struggle to find quality extensions. We know how frustrating the need to fix the shop is just because of one poorly coded extension. We created quality OpenCart Extensions, tested by real developers and provide professional support.

AJAX QUICK CHECKOUT - #1 one-page checkout solution
VISUAL DESIGNER - Page builder for Opencart
View more extensions here

Tested by Shopunity.net


User avatar
Administrator

Posts

Joined
Sun Jun 17, 2012 7:04 pm
Location - Europe

Post by paulfeakins » Thu Jun 27, 2019 6:14 pm

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?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Thu Jun 27, 2019 6:17 pm

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.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Dreamvention » Thu Jun 27, 2019 6:20 pm

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.

Many OpenCart users struggle to find quality extensions. We know how frustrating the need to fix the shop is just because of one poorly coded extension. We created quality OpenCart Extensions, tested by real developers and provide professional support.

AJAX QUICK CHECKOUT - #1 one-page checkout solution
VISUAL DESIGNER - Page builder for Opencart
View more extensions here

Tested by Shopunity.net


User avatar
Administrator

Posts

Joined
Sun Jun 17, 2012 7:04 pm
Location - Europe

Post by paulfeakins » 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.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by dangchung » Tue Jul 09, 2019 6:07 pm

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.
Image
Please help us how to fix this problem.
Thanks

Newbie

Posts

Joined
Wed Jul 04, 2018 11:31 am

Post by straightlight » Tue Jul 09, 2019 6:09 pm

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?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by wrick0 » Fri Jul 12, 2019 6:06 pm

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

Active Member

Posts

Joined
Fri Jan 18, 2019 10:00 pm
Location - 127.0.0.1 @ The Netherlands

Post by JNeuhoff » Fri Jul 12, 2019 6:58 pm

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)

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Fri Jul 12, 2019 7:01 pm

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

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Fri Jul 12, 2019 11:18 pm


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by harmonybrew » Sat Oct 26, 2019 1:23 am

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.

Newbie

Posts

Joined
Wed Sep 14, 2016 1:08 am

Post by doggan » Fri Nov 15, 2019 12:42 pm

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

Newbie

Posts

Joined
Tue Oct 31, 2017 7:28 am
Who is online

Users browsing this forum: Majestic-12 [Bot], Semrush [Bot] and 121 guests