Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Recover missing order info from DB

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
This SQL statement will find products in the shopping cart with or without product attributes. You can specify one or as many Customer IDs as you want. Just change the '000', '111', etc. to the Customer IDs you have.

SELECT cb.customers_id, cb.customers_basket_quantity, p.products_model, pd.products_name, pov.products_options_values_name
FROM customers_basket cb
JOIN products p ON p.products_id=cb.products_id
JOIN products_description pd ON pd.products_id=cb.products_id
LEFT JOIN customers_basket_attributes cba ON cba.products_id=cb.products_id
LEFT JOIN products_options_values pov ON cba.products_options_value_id=pov.products_options_values_id
WHERE cb.customers_id IN('000','111','222')
AND pd.language_id = '1'
ORDER BY cb.customers_id
Try this instead of the previous post. I should have used LEFT JOIN instead of JOIN. This way, both orders with products that have attributes and those that don't have attributes are found.

Some people may need products attributes information. Here is the MySQL code to do that. Substitute the actual customer's id for <PUT CUSTOMERS_ID HERE>. This SQL statement will find orders whether there are product attributes or not.

SELECT cb.customers_basket_quantity, pd.products_name, pov.products_options_values_name
FROM customers_basket cb
LEFT JOIN products_description pd ON pd.products_id=cb.products_id
LEFT JOIN customers_basket_attributes cba ON cba.customers_id=cb.customers_id
LEFT JOIN products_options_values pov ON cba.products_options_value_id=pov.products_options_values_id
WHERE cb.customers_id ='<PUT CUSTOMERS_ID HERE>'
AND pd.language_id = '1'
   Posted on: 10/22/2008     See contribution details Request Installation with Paid service