Go Back   Internet Business Forums > Money & accounts

Reply
 
Thread Tools Display Modes
Old 22-05-2007, 08:33 PM   #1 (permalink)
Business Guru
 
Brian Turner's Avatar
 
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,883
Default OSCommerce: How to find an order in the database

A test OSCommerce install I have set up shows a major flaw with the software - when paying by Paypal, the order is only inserted into the database if the customer clicks out of Paypal via the Return to Merchant link.

So in a default OSCommerce install, it's easy to have orders paid for which never show in your admin database.

There is apparently a fix for this via the Paypal IPN mod, but in the meantime, if anyone else here has the same problem, do the following to find an order directly in the OSCommerce database:

1. The first thing you will need to know is the customer's ID. You can find this by logging into your osCommerce admin section, then click the "customers" button on the left side and find the customer that made the purchase. When you find the customer, click on their name, then look at the URL that you are currently on. Find the cID= in the URL and the number after the equals sign is the customer ID.

2. Now login to phpmyadmin - such as via Cpanel - click the SQL tab at the top of the when when you've selected a database, then run the following query:

Code:
 SELECT products_description.products_name,
customers_basket.customers_basket_quantity
FROM customers_basket, products_description
WHERE customers_basket.customers_id = '<PUT CUSTOMERS_ID HERE>'
AND customers_basket.products_id = products_description.products_id
AND products_description.language_id = '1'
That should do it.
__________________
SEO specialist
Brian Turner is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.