Closed (fixed)
Project:
e-Commerce
Version:
4.7.x-1.x-dev
Component:
store
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2006 at 19:53 UTC
Updated:
19 Oct 2007 at 00:48 UTC
When a renewal and new subscription are in a single transaction the new subscription is treated as a renewal. I think it is caused by the extraction in store_transaction_load (store.module:1299) which has a database query:
$result = db_query('SELECT stp.*, r.rtxnid as rtxnid, r.rnid as rnid, p.ptype
FROM {ec_transaction_product} stp
LEFT JOIN {ec_renewal} r ON stp.txnid = r.txnid
LEFT JOIN {ec_product} p ON stp.vid = p.vid
WHERE stp.txnid = %d', $t->txnid);which I believe should try to match the product id in stp.nid = r.rnid in the LEFT JOIN with ec_renewal as follows:
$result = db_query('SELECT stp.*, r.rtxnid as rtxnid, r.rnid as rnid, p.ptype
FROM {ec_transaction_product} stp
LEFT JOIN {ec_renewal} r ON stp.txnid = r.txnid AND stp.nid = r.rnid
LEFT JOIN {ec_product} p ON stp.vid = p.vid
WHERE stp.txnid = %d', $t->txnid);Hope this helps.
Comments
Comment #1
brmassa commentedthis bug is just too old. in case it persists on eC4, please, reponen it.