ALCA2012 Posted July 21, 2012 Share Posted July 21, 2012 Hi, I dont have access to back office so, I need to check new incoming orders in my database. Where exactly I can find the new orders and customer names and details? (and I get your answer, where I put this message as solved?) Thanks Alca. Link to comment Share on other sites More sharing options...
phrasespot Posted July 22, 2012 Share Posted July 22, 2012 I dont have access to back office so, I need to check new incoming orders in my database Most peculiar. This would be pretty tedious to do with every order. An order and related details are scattered across several tables PREFIX_order (note id_order, id_carrier, id_customer, id_address_delivery) PREFIX_order_detail (use id_order to locate all items in order, note product_id) PREFIX_product (... so on so forth Link to comment Share on other sites More sharing options...
ALCA2012 Posted July 22, 2012 Author Share Posted July 22, 2012 Most peculiar. This would be pretty tedious to do with every order. An order and related details are scattered across several tables PREFIX_order (note id_order, id_carrier, id_customer, id_address_delivery) PREFIX_order_detail (use id_order to locate all items in order, note product_id) PREFIX_product (... so on so forth Ok, if you mean PS_order, PS_product etc, yes but where is client name? Link to comment Share on other sites More sharing options...
ALCA2012 Posted July 22, 2012 Author Share Posted July 22, 2012 (edited) Phrasespot is right. If you don't have access to your backoffice anymore you should try to fix this instead of finding alternative solution. I assume you have an access to Internet, then at least new orders come through your email address. here is a query to fetch orders and related data: $sql="SELECT o.id_order AS 'Num commande', p.name AS 'Produit', r.quantity AS 'Quantite', a1.company AS 'Raison sociale', c1.id_gender AS 'Civilite', a1.lastname AS 'Nom', a1.firstname AS 'Prenom', a1.address1 AS 'Addresse de facturation', a1.address2 AS 'Addresse de facturation 2', a1.postcode AS 'Code postal', a1.city AS 'Ville', y1.name AS 'Pays de facturation', a1.phone AS 'Telephone fixe facturation', a1.phone_mobile AS 'Telephone mobile facturation', c1.email AS 'Email', c1.newsletter AS 'Newsletter', c1.optin AS 'Newsletter groupe', c2.id_gender AS 'Civilite livraison', CONCAT_WS(' ',a2.lastname, a2.firstname) AS 'Destinataire', a2.address1 AS 'Addresse 1', a2.address2 AS 'Addresse 2', a2.postcode AS 'CP', a2.city AS 'Commune', n.iso_code AS 'Pays', a2.phone AS 'Telephone', a2.other AS 'Instructions' FROM "._DB_PREFIX_."customer c1, "._DB_PREFIX_."customer c2, "._DB_PREFIX_."address a1, "._DB_PREFIX_."address a2, "._DB_PREFIX_."country_lang y1, "._DB_PREFIX_."country_lang y2, "._DB_PREFIX_."country n, "._DB_PREFIX_."product_lang p, "._DB_PREFIX_."cart_product r, "._DB_PREFIX_."orders o WHERE o.valid=1 AND o.id_address_invoice=a1.id_address AND o.id_address_delivery=a2.id_address AND o.id_cart = r.id_cart AND r.id_product = p.id_product AND p.id_lang=1 AND a1.id_country = y1.id_country AND a2.id_country = y2.id_country AND y1.id_lang=1 AND y2.id_lang=1 AND a1.id_customer=c1.id_customer AND a2.id_customer=c2.id_customer AND a2.id_country=n.id_country ORDER BY o.id_order ASC"; You can leverage on that. Please make a copy of your database. I won't be responsible of any damage. Ok, the problem begun when my host provider deactivated and after 3 days activate my hosting account. Then I give password to get in and it shows: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. So I spoke with the host but he is not willing to help. That's it. Also my Prestashop doesn't send me new order messages...And i dont understand what i have to do with this code you send me. Thanks. Edited July 22, 2012 by ALCA2012 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now