SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2012, 08:15:54 am

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 59
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 3
Guests: 60
Total: 63
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 3 Guests are viewing this topic. « previous next »
Pages: 1 [2] Go Down Print
Author Topic: Problem with the order log  (Read 7110 times)
drhamad
Newbie
*
Offline Offline

Posts: 49


View Profile
« Reply #15 on: April 27, 2009, 02:39:57 pm »

OK, here's store_debug.txt for a real order:

Quote
April 27, 2009, 3:31 pm
FOUND
April 27, 2009, 3:31 pm
Post Request1 REQ:cmd=_notify-validate&mc_gross=8.97&protection_eligibility=Eligible&address_status=unconfirmed&payer_id=SE8VZPCZBVSBJ&$
April 27, 2009, 3:31 pm
Verified
April 27, 2009, 3:31 pm
NM Value:0
April 27, 2009, 3:31 pm
Trans Type:web_accept
April 27, 2009, 3:31 pm
Begin query:SELECT
                                                        ID_ITEM, ID_CART, ID_MEMBER, date, quantity
                                                 FROM {db_prefix}store_CART
                                                 WHERE ID_CART = 34 LIMIT 1
April 27, 2009, 3:31 pm
Begin query:SELECT emailnote, price, ID_GROUPToMove, groupexpiredays, needsstock,qtyinstock,stocklow, productname
                                                 FROM {db_prefix}store_item
                                                 WHERE ID_ITEM = 111 LIMIT 1
April 27, 2009, 3:31 pm
Cart Item Number:111
April 27, 2009, 3:31 pm
MC Gross:8.97
April 27, 2009, 3:31 pm
Transaction Logged
April 27, 2009, 3:31 pm
Enter Complete Transaction for : 111
April 27, 2009, 3:31 pm
Member IP 72.29.250.1
April 27, 2009, 3:31 pm
Cart data
April 27, 2009, 3:31 pm
Checking Product Codes
April 27, 2009, 3:31 pm
Product Codes
April 27, 2009, 3:31 pm
End Code Check
April 27, 2009, 3:31 pm
Getting Email Template
April 27, 2009, 3:31 pm
Finished email template
April 27, 2009, 3:31 pm
Send email
April 27, 2009, 3:31 pm
Finshed mail
April 27, 2009, 3:31 pm
Mark Basetket completed


Other orders look the same, I believe.

Also, for the same order, in paypal_logs.txt
Quote
April 27, 2009, 3:31 pm
cmd=_notify-validate&mc_gross=8.97&protection_eligibility=Eligible&address_status=unconfirmed&payer_id=SE8VZPCZBVSBJ&tax=0.00&address_street=5102-62+street&payment_date=12%3A05%3A32+Apr+27%2C+2009+PDT&payment_status=Completed&charset=windows-1252&address_zip=T9V-2E4&first_name=kevin&mc_fee=0.65&address_country_code=CA&address_name=kevin+jurovich&notify_version=2.8&custom=16&payer_status=verified&business=billing%40fmvperformance.com&address_country=Canada&address_city=lloydminster&quantity=1&verify_sign=A2S1fniRGsoquzRDbs4f5rc383f8AcXITYkz2ZXYUPZK73GSDqKQTnIn&payer_email=kevinjurovich%40sasktel.net&contact_phone=&txn_id=54Y13048XE609391N&payment_type=instant&last_name=jurovich&address_state=Alberta&receiver_email=drhamad%40fmvperformance.com&payment_fee=0.65&receiver_id=BUR5MN6JC5UJ4&txn_type=web_accept&item_name=Checkout&mc_currency=USD&item_number=checkout&residence_country=CA&handling_amount=0.00&transaction_subject=16&payment_gross=8.97&shipping=0.00
« Last Edit: April 27, 2009, 02:45:34 pm by drhamad » Logged
drhamad
Newbie
*
Offline Offline

Posts: 49


View Profile
« Reply #16 on: April 27, 2009, 02:50:41 pm »

Also, I just checked the table smf_store_transactions in the database - the orders are there.

So the db IS storing the orders... so it's something wrong in the output...
« Last Edit: April 27, 2009, 04:30:52 pm by drhamad » Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #17 on: April 27, 2009, 07:47:30 pm »

That's part one. The next step is to check the ID_BASKET field for each of those transactions.

It should not be zero ID_BASKET then links to the store_basket table.
Inside the store_basket for that transaction there is a field called cart_items
cart_items is a list of ID_CART's separated by comma's for each cart entry in the cart.

The ID_CART can then be looked up store_cart table which contains the ID_ITEM and other item qty information and custom fields etc.

Logged
drhamad
Newbie
*
Offline Offline

Posts: 49


View Profile
« Reply #18 on: April 28, 2009, 01:02:41 pm »

That's part one. The next step is to check the ID_BASKET field for each of those transactions.

It should not be zero ID_BASKET then links to the store_basket table.
Inside the store_basket for that transaction there is a field called cart_items
cart_items is a list of ID_CART's separated by comma's for each cart entry in the cart.

The ID_CART can then be looked up store_cart table which contains the ID_ITEM and other item qty information and custom fields etc.



ID_BASKET is not empty.

Let's take an example, order ID_TRANS = 9, ID_BASKET = 18, an order for one item (111) for value $8.97.
cart_items = 36
ID_CART 36 in smf_store_cart does exist.

So in terms of the database, everything seems correct?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #19 on: April 28, 2009, 06:19:31 pm »

That seems correct that is good news. That means the basket id is passed and there is a cart item which we can find the item id.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #20 on: April 28, 2009, 06:30:26 pm »

Check out template_view_basket()  in the Store.template.php file

That is where the logic of the order detail page is.
Basically the basket id is passed. Gets a list of cart items. Cart items are separated by a comma. Then for each cart item it joins with store_item table to get product description and qty.

Next it checks if there are any custom fields if so they are then shown.
Logged
drhamad
Newbie
*
Offline Offline

Posts: 49


View Profile
« Reply #21 on: April 28, 2009, 06:41:53 pm »

Almost more of a pain because there's no apparent problem, eh?

Anyway, I haven't made any alterations to Store2.template.php.  It never calls anything in /store/, /store_pro/, or storeipn2.php, so there was no reason for me to touch anything.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #22 on: April 28, 2009, 06:45:35 pm »

And there is no errors in the error log or anything when you visit the order detail page?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #23 on: April 29, 2009, 06:59:19 pm »

If you are still having issues I can take a look but it would require an admin account that has access to the store and the error log. I can't recreate this issue on my test smf 2.0 forum with the store installed and from what it looks like it above all the data looks like it is there.
Logged
drhamad
Newbie
*
Offline Offline

Posts: 49


View Profile
« Reply #24 on: April 30, 2009, 08:52:08 pm »

OK I think we can close this now per our PM convo.

Thanks again.
Logged
Pages: 1 [2] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:02:50 am]

[Today at 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.232 seconds with 19 queries.