Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
MySQL ec_transaction table holds two entries for this one transaction. Please see attached.
Further, COD was set up to "Mark transaction as paid? = yes" and "Mark transaction workflow as completed? = yes", however the transaction status is Transaction received (under user's myfiles directory)", and why admin changed it to completed i got the following warning message:
user warning: Duplicate entry '' for key 2 query: INSERT INTO ec_customer (ecid, type, exid, token) VALUES (3, '', '', '21f7f2d42d14ec4d5867f9ebce0ae4c7') in C:\www\webroot\ec4\includes\database.mysql.inc on line 172.
The "foreach() ... line 120" issue is solved. However, ec_transaction still holds two entries per transaction (please see attached in the 2nd post), is it by-design? in addition, although COD is set up to "Mark transaction as paid? = yes" and "Mark transaction workflow as completed? = yes", the transaction is Payments pending.
Comments
Comment #1
esadot commentedMySQL ec_transaction table holds two entries for this one transaction. Please see attached.
Further, COD was set up to "Mark transaction as paid? = yes" and "Mark transaction workflow as completed? = yes", however the transaction status is Transaction received (under user's myfiles directory)", and why admin changed it to completed i got the following warning message:
user warning: Duplicate entry '' for key 2 query: INSERT INTO ec_customer (ecid, type, exid, token) VALUES (3, '', '', '21f7f2d42d14ec4d5867f9ebce0ae4c7') in C:\www\webroot\ec4\includes\database.mysql.inc on line 172.
Comment #2
brmassa commentedEmek,
fixed on the lastest eC4 CVS
regards,
massa
Comment #3
esadot commentedHave test it with the latest dev (Oct 16) that supposedly have the fixed incorporated, and I'm afraid the issue persist.
Comment #4
dingo001 commentedThe same error happens for me too.. here is the text
warning: Invalid argument supplied for foreach() in /home/x/public_html/y/modules/ecommerce/contrib/cod/cod.module on line 120.
Comment #5
esadot commentedGordon, any idea where this stands? can you please point out where the issue might lie?
Comment #6
gordon commentedI have fixed this in dev
Comment #7
esadot commentedHave just downloaded the dev and the issue is current.
Comment #8
esadot commentedThe "foreach() ... line 120" issue is solved. However, ec_transaction still holds two entries per transaction (please see attached in the 2nd post), is it by-design? in addition, although COD is set up to "Mark transaction as paid? = yes" and "Mark transaction workflow as completed? = yes", the transaction is Payments pending.
Comment #9
esadot commentedI believe the attached patch resolve the issue.
Comment #10
brmassa commentedEmek,
your right. fixed on eC4 CVS.
regards,
massa
Comment #11
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.