writetravis Posted February 5, 2011 Share Posted February 5, 2011 Is there a fix for the problem of clients needing to create an account to make a purchase.( 2.3) My other site uses the older os commerce and runs perfect and the client does not need to create an account. When my designer created the latest site i had one criteria and that was the client should not have to create an account to make a purchase and of course the new site does require that. I am open to any suggestion? Link to comment Share on other sites More sharing options...
pdcelec Posted February 5, 2011 Share Posted February 5, 2011 Is there a fix for the problem of clients needing to create an account to make a purchase.( 2.3) My other site uses the older os commerce and runs perfect and the client does not need to create an account. When my designer created the latest site i had one criteria and that was the client should not have to create an account to make a purchase and of course the new site does require that. I am open to any suggestion? http://addons.oscommerce.com/info/355 Link to comment Share on other sites More sharing options...
PLUGGER Posted February 7, 2011 Share Posted February 7, 2011 pdcelec that addon is for v2.2 not 2.3, in which the question was asked for.. i too am awaiting a working version of Purchase Without Account, as i use this on all my stores, my stored cannot function without it... in fact heres something for the clever people out there, i am even will to pay a reasonable price for this to be achieved, so any of the people who feel confident to update this hack, then please contact me, and i will pay for it and allow it to be added to the contributions... If it don't fit - Get a bigger hammer Link to comment Share on other sites More sharing options...
chrischris Posted February 10, 2011 Share Posted February 10, 2011 hey hi togehter! i'm actually looking for the this feature on 2.3.1 too. need it for a friends site. i have some php knowledge, but i'm kinda new to osc and its structure etc. so since yesterday i'm trying to convert this addon to 2.3.1! i guess i have to stick with it some days so it will (hopefully) work out soon:-) but it would be really helpful, if someone could explain me how and where in the core the /modules/../* stuff is handled. for pwa i need for example bm_order_history.php but till now i don't understand the way it is called. is there somewhere a developer-documentation with class-structures etc online? that would be nice! and of course i'll let you know when it's working:-) cheers from berlin, chris Link to comment Share on other sites More sharing options...
♥kymation Posted February 10, 2011 Share Posted February 10, 2011 All of the modules are handled by the oscTemplate class (includes/classes/osc_template.php). The modules are instantiated as classes by the first line in includes/template_top.php. This means that the Order History box will exist as a class named bm_order_history. You should be able to count on any installed module existing as a class, but it would be best to check to see that the class exists before using it. Unfortunately there is no real developer documentation. There is a database chart in the distribution and that's about it. I've been figuring out the modules by writing and testing them. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
chrischris Posted February 14, 2011 Share Posted February 14, 2011 hey thanks jim! i guess i understood the structure and procedures now. but in this case it is not so easy to build a 2.3.1 version out of the mentioned contribution (or at least not for me). maybe there is someone out there who could help me setting this up? not having a developer documentation makes it even harder for me. and hey, wouldn't it make sense to get startet with documenting code properly to run something like phpdoc? (but probably i'm not the first one suggesting this..) Link to comment Share on other sites More sharing options...
♥kymation Posted February 14, 2011 Share Posted February 14, 2011 Developer documentation would be wonderful. Having properly documented code would be nice too. Unfortunately I'm not that good at documenting my own code. I do try to produce good user documentation for the modules that I write, but that's about it. Purchase Without Account is overkill anyway. Here's a better approach: 1. Combine the Login and Create Account pages. This allows returning customers to log in and new customers to just enter an address. 2. Add the boxes for a password to the Create Account area, and assign a random password if they don't fill one in. 3. Profit! Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
chrischris Posted February 15, 2011 Share Posted February 15, 2011 yeah you're right. it is actually a kind of overkill. i guess i'll give your suggestion a try. sounds way more easy. thank you:) Link to comment Share on other sites More sharing options...
chrischris Posted February 17, 2011 Share Posted February 17, 2011 jim, i tried your suggestion but still having some problems. i replied with more details to this thread in the payment-forum to get more attention to others then here in the chit-chat. but it would be nice if you could look through it:) Link to comment Share on other sites More sharing options...
PatrickHuber Posted February 25, 2011 Share Posted February 25, 2011 I was able to get the Purchase Without Account (http://addons.oscommerce.com/info/355/) working on a 2.3.1 site that I'm doing some testing on. There a still a few bugs to be worked out with formatting, but surprisingly there weren't many things to fix in order for it to work. How to make PWA it work with 2.3 Upload pwa_autoinstaller folder to your store root :www.yoursite.com/catalog/pwa_autoinstaller Upload a blank php page to: www.yoursite.com/catalog/includes/column_right.php(This can be blank since we will delete the file after finishing the install) Now open a new browser window and navigate to:www.yoursite.com/catalog/pwa_autoinstaller Begin the install process. You will need to manually edit quite a few of the pages to add the PWA code. This should be relatively easy to do (but time consuming). On the last change to the header.php file you will need to replace the following code: echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); with this code: echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); if (tep_session_is_registered('customer_id') && (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) && !$order->customer['is_dummy_account']) { echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } This should give you a working (minus some formatting changes) Purchase Without Account mod. Link to comment Share on other sites More sharing options...
PLUGGER Posted February 25, 2011 Share Posted February 25, 2011 Well give that man a cigar....................... well done patrick, i for one thank you so much for sorting this one out, been waiting for this to work for a long time, and i tested it on a standard osc2.3.1 and just like you say a few minor manual edits for the core code, and then just cosmetic layout alterations and hey presto............. perfect thanks again If it don't fit - Get a bigger hammer Link to comment Share on other sites More sharing options...
surrfman Posted May 16, 2011 Share Posted May 16, 2011 Developer documentation would be wonderful. Having properly documented code would be nice too. Unfortunately I'm not that good at documenting my own code. I do try to produce good user documentation for the modules that I write, but that's about it. Purchase Without Account is overkill anyway. Here's a better approach: 1. Combine the Login and Create Account pages. This allows returning customers to log in and new customers to just enter an address. 2. Add the boxes for a password to the Create Account area, and assign a random password if they don't fill one in. 3. Profit! Regards Jim Jim.. How would one go about combining the Login & Create Account pages? then add the boxes for a password to the Create Account that assigns a random password? Timmy C Link to comment Share on other sites More sharing options...
mylittlereddress Posted December 11, 2011 Share Posted December 11, 2011 Just in case anyone like me was searching for an answer to this thread http://addons.oscommerce.com/info/8018 Link to comment Share on other sites More sharing options...
dvale Posted December 13, 2011 Share Posted December 13, 2011 I was able to get the Purchase Without Account (http://addons.oscommerce.com/info/355/) working on a 2.3.1 site that I'm doing some testing on. There a still a few bugs to be worked out with formatting, but surprisingly there weren't many things to fix in order for it to work. How to make PWA it work with 2.3 Upload pwa_autoinstaller folder to your store root : www.yoursite.com/catalog/pwa_autoinstaller Upload a blank php page to: www.yoursite.com/catalog/includes/column_right.php (This can be blank since we will delete the file after finishing the install) Now open a new browser window and navigate to: www.yoursite.com/catalog/pwa_autoinstaller Begin the install process. You will need to manually edit quite a few of the pages to add the PWA code. This should be relatively easy to do (but time consuming). On the last change to the header.php file you will need to replace the following code: echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); with this code: echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); if (tep_session_is_registered('customer_id') && (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) && !$order->customer['is_dummy_account']) { echo tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } This should give you a working (minus some formatting changes) Purchase Without Account mod. where is this pwa_autoinstaller located at? Link to comment Share on other sites More sharing options...
PatrickHuber Posted December 14, 2011 Share Posted December 14, 2011 where is this pwa_autoinstaller located at? Download the PWA mod here: http://addons.oscommerce.com/info/355/ There will be a folder called "pwa_autoinstaller" Grab that and follow the directions Link to comment Share on other sites More sharing options...
railroadguy Posted February 16, 2012 Share Posted February 16, 2012 I have installed PWA. Works great. The problem is I also want to use Export_orders_csv. It works but does not show customers name. Customer names only works on non-PWA stores. So there is something in the query for customer names that changed and I am stumped. It's a simple one page (below) with no changes to the database. If anyone can look at this and see where the customer names are called and what PWA may have changed them to I'll be happy to compensate. I know it's got to be simple but I thought I had tried everything. ========================================================================= <?php /* $Id: exportorders.php,v 1.1 April 21, 2006 Harris Ahmed (Original Contribution) $ Edited and enhanced by Nico Maurer 12-12-2006 /************************************************************************ /* Changed By Gil Dvir 04-01-2008 admin at hebnuker dot org * /* Addind some featurs to the original code * /* Improved selection of orders Display Type: * /* 1. Create CSV file * /* 2. Print to screen in table format * /* 3. Adding heading to the CSV / Html output * /* 4. Sorting & group orders by customers id (name) * /* 5. Link on the order number, from the Html output page * /* direct to the customer order Details. * /* ******************** Instructions ********************** * /* Please change to your site URL at line 170 * /* I choose for my site the Data to be showed as follows * /* a. Order number * /* b. Date Purchased * /* c. Country * /* d. Customer name * /* e. Model number * /* f. Quantity ordered * /* g. Product name * /* h. Comments * /* You can change it to your preferring * /************************************************************************ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2004 Oscommerce Installation and Use: Put the file in the Admin Folder and Call the script: www.yourstore.com/catalog/admin/export_orders_csv.php In the Start field put the first oder no. to export, in the end field the last order no. (or choose a big number for export of all orders up to the current date). In the status field put the number of the order status to export (the status numbers may vary from shop to shop). For my store status 1 means "processing", which is the status orders need to be exported for my store. Still very hard coded but it works for my ressource planning software. In order to make a link in your reports section of admin do the following, after uploading the file 1. Insert this line in admin/includes/filenames.php: Under Definitions // Export orders to CSV define('FILENAME_EXPORT_ORDERS_CSV', 'export_orders_csv.php'); // End Export orders to csv 2. Insert this line in admin/includes/languages/english.php: under definitions // EXPORT_ORDERS_CSV define('BOX_EXPORT_ORDERS_CSV', 'Export my orders to CSV'); // End EXPORT_ORDERS_CSV 3. In admin/includes/boxes/reports.php, change this (or whichever line is NOT last in the menu): // add export orders to csv '<a href="' . tep_href_link(FILENAME_EXPORT_ORDERS_CSV, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_EXPORT_ORDERS_CSV . '</a><br>' . // end export orders to csv */ require('includes/application_top.php'); // Check if the form is submitted if (!$submitted || ($submitted != 1 && $submitted != 2)) { ?> <!-- header_eof //--> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"> <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table> </td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo "Export Order" ?></td> <td class="pageHeading" align="right"></td> </tr> </table> </td> </tr> <!-- first ends // --> <tr> <td> <table border="0" style="font-family:tahoma;font-size:11px;" width="100%" cellspacing="2" cellpadding="2"> <tr> <td> <form method="GET" action="<?php echo $PHP_SELF; ?>"> <table border="0" style="font-family:tahoma;font-size:11px;" cellpadding="3"> <tr> <td><?php echo "Start Order #:"; ?></td> <td><input name="start" size="5" value="<?php echo $start; ?>"> </tr> <tr> <td><?php echo "End Order #:" ; ?></td> <td><input name="end" size="5" value="<?php echo $end; ?>"> </tr> <tr> <td><?php echo "Order Status:"; ?></td> <?php $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } ?> <td><?php echo tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => 'All Orders')), $orders_statuses), $status); ?> </tr> <tr> <td><?php echo "Display Type:"; ?></td> <td> <select name="submitted"> <option value="1">Create CSV File</option> <option value="2">Print to Screen</option> </select> </td></tr> <tr> <td> </td> <td><input type="submit" value="<?php echo "Generate"; ?>"></td> </tr> </table></form> </td></tr></table> </td></tr></table> </td></tr> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> <?php } // submitted so generate csv if the form is submitted else { generatecsv($start, $end, $status, $submitted); } // generates csv file from $start order to $end order, inclusive function generatecsv($start, $end, $status, $submitted) { $order_edit = "&action=edit"; $order_url = "http://www.yoursite.com/admin/orders.php?oID=$order_num"; $space = " "; $open_table = $submitted == 1 ? '' : '<table width=100% border=1 cellspacing=0 cellpadding=0>'; $close_table = $submitted == 1 ? '' : '</table>'; $open_header = $submitted == 1 ? '' : '<tr bgcolor=999999>'; $close_header = $submitted == 1 ? '' : '</font></tr>'; $open_row = $submitted == 1 ? '' : '<tr>'; $close_row = $submitted == 1 ? '' : '</tr>'; $open_column = $submitted == 1 ? '' : '<td><font face=Arial size=2>'; $delim = $submitted == 1 ? ',' : '</font></td>'; if($submitted == 1){ // Heading CSV output file $csv_output .= "Num".$delim; $csv_output .= "Date".$delim; $csv_output .= "Country".$delim; $csv_output .= "Customer".$delim; $csv_output .= "Model".$delim; $csv_output .= "Qty".$delim; $csv_output .= "Product".$delim; $csv_output .= "Comments".$delim; $csv_output .= "\n"; } $orders = tep_db_query("select customers_id, orders_id, date_purchased, customers_name , cc_owner, customers_company, customers_email_address, billing_street_address, billing_city, billing_state, billing_postcode, billing_country, customers_telephone, delivery_name, delivery_company, delivery_street_address, delivery_city, delivery_state, delivery_postcode, delivery_country, cc_type, cc_number, cc_expires, payment_method, orders_status from " . TABLE_ORDERS . " where 1 " . ($start ? "and orders_id >= $start " : "") . ($end ? "and orders_id <= $end " : "") . ($status ? "and orders_status = $status " : "") . "order by customers_id"); while ($row_orders = mysql_fetch_array($orders)) { //start one loop $Orders_id = $row_orders["orders_id"]; $orders_status = $row_orders["orders_status"]; $customers_id = $row_orders["customers_id"]; $customers_gender = $row_orders["customers_gender"]; $Date1 = $row_orders["date_purchased"]; //list($Date, $Time) = explode (' ',$Date1); $Date = date('d.m.Y', strtotime($Date1)); $Time= date('H:i:s', strtotime($Date1)); $Name_On_Card1 = $row_orders["customers_name"]; $Name_On_Card = filter_text($Name_On_Card1);// order changed list($First_Name,$Last_Name) = explode(', ',$Name_On_Card1); // order changed $Company = filter_text($row_orders["customers_company"]); $email = filter_text($row_orders["customers_email_address"]); $payment = filter_text($row_orders["payment_method"]); $Billing_Address_1 = filter_text($row_orders["billing_street_address"]); $Billing_Address_2 = ""; $Billing_City = filter_text($row_orders["billing_city"]); $Billing_State = filter_text($row_orders["billing_state"]); $Billing_Zip = filter_text($row_orders["billing_postcode"]); $Billing_Country = str_replace("(48 Contiguous Sta", "", $row_orders["billing_country"]); $Billing_Phone = filter_text($row_orders["customers_telephone"]); $ShipTo_Name1 = $row_orders["delivery_name"]; $ShipTo_Name = filter_text($ShipTo_Name1); // order changed list($ShipTo_First_Name,$ShipTo_Last_Name) = explode(', ',$ShipTo_Name1); // order changed $ShipTo_Company = filter_text($row_orders["delivery_company"]); $ShipTo_Address_1 = filter_text($row_orders["delivery_street_address"]); $ShipTo_Address_2 = ""; $ShipTo_City = filter_text($row_orders["delivery_city"]); $ShipTo_State = filter_text($row_orders["delivery_state"]); $ShipTo_Zip = filter_text($row_orders["delivery_postcode"]); $ShipTo_Country = str_replace("(48 Contiguous Sta", "", $row_orders["delivery_country"]); $ShipTo_Phone = ""; $Card_Type = $row_orders["cc_type"]; $Card_Number = $row_orders["cc_number"]; $Exp_Date = $row_orders["cc_expires"]; $Bank_Name = ""; $Gateway = ""; $AVS_Code = ""; $Transaction_ID = ""; $Order_Special_Notes = ""; // -------------------- QUERIES 1 ------------------------------------// //Orders_status_history for comments $orders_status_history = tep_db_query("select comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = " . $Orders_id); //$row_orders_status_history = tep_db_fetch_array($comments); while($row_orders_status_history = mysql_fetch_array($orders_status_history)) { // end // $Comments = filter_text($row_orders_status_history["comments"]); } // -------------------- QUERIES 2 ------------------------------------// //Orders_subtotal $orders_subtotal = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_subtotal' and orders_id = " . $Orders_id); //$row_orders_subtotal = tep_db_fetch_array($orders_subtotal); while($row_orders_subtotal = mysql_fetch_array($orders_subtotal)) { // end // $Order_Subtotal = filter_text($row_orders_subtotal["value"]); } // -------------------- QUERIES 3 ------------------------------------// //Orders_tax $Order_Tax = '0'; $orders_tax = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_tax' and orders_id = " . $Orders_id); //$row_orders_tax = tep_db_fetch_array($orders_tax); while($row_orders_tax = mysql_fetch_array($orders_tax)) { // end // $Order_Tax = filter_text($row_orders_tax["value"]); } // -------------------- QUERIES 4 ------------------------------------// //Orders_Insurance $orders_insurance = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_insurance' and orders_id = " . $Orders_id); //$row_orders_insurance = tep_db_fetch_array($orders_insurance); while($row_orders_insurance = mysql_fetch_array($orders_insurance)) { // end // $Order_Insurance = filter_text($row_orders_insurance["value"]); } $Tax_Exempt_Message = ""; // -------------------- QUERIES 5a ------------------------------------// //Orders_Shipping Versandkosten $orders_shipping = tep_db_query("select title, value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_shipping' and orders_id = " . $Orders_id); //$row_orders_shipping = tep_db_fetch_array($orders_shipping); while($row_orders_shipping = mysql_fetch_array($orders_shipping)) { // end // $Order_Shipping_Total = $row_orders_shipping["value"]; $Shipping_Method = filter_text($row_orders_shipping["title"]); // Shipping method from query 5 } // -------------------- QUERIES 5b ------------------------------------// //Orders_Shipping_Nachnahme unset($nn_gebuehr); $orders_shipping_nn = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_cod_fee' and orders_id = " . $Orders_id); //$row_orders_shipping_nn = tep_db_fetch_array($orders_shipping_nn); while($row_orders_shipping_nn = mysql_fetch_array($orders_shipping_nn)) { // end // $nn_gebuehr = $row_orders_shipping_nn["value"]; } // -------------------- QUERIES 5c ------------------------------------// //Orders_Shipping_Minderwert bei Auslandsaufträgen unset($minderwert); $orders_shipping_minderwert = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_loworderfee' and orders_id = " . $Orders_id); //$row_orders_shipping_minderwert = tep_db_fetch_array($orders_shipping_minderwert); while($row_orders_shipping_minderwert = mysql_fetch_array($orders_shipping_minderwert)) { // end // $minderwert = $row_orders_shipping_minderwert["value"]; } // -------------------- QUERIES 5d ------------------------------------// //Orders_Coupon Rabatt bei Couponeinsatz unset($coupon); $orders_coupon = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_discount_coupon' and orders_id = " . $Orders_id); //$row_orders_coupon = tep_db_fetch_array($orders_coupon); while($row_orders_coupon = mysql_fetch_array($orders_coupon)) { // end // $coupon = $row_orders_coupon["value"]; } // -------------------- QUERIES 6 ------------------------------------// //Orders_Residential Del Fee (Giftwrap) $orders_residential_fee = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_giftwrap' and orders_id = " . $Orders_id); //$row_orders_residential_fee = tep_db_fetch_array($orders_residential_fee); while($row_orders_residential_fee = mysql_fetch_array($orders_residential_fee)) { // end // $Small_Order_Fee = $row_orders_residential_fee["value"]; } //////////////////////////////////// $Discount_Rate = ""; $Discount_Message = ""; $CODAmount = ""; // -------------------- QUERIES 7 ------------------------------------// //Orders_Total Gesamtbetrag der Bestellung wird noch nicht gebraucht $orders_total = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where class = 'ot_total' and orders_id = " . $Orders_id); //$row_orders_total = tep_db_fetch_array($orders_total); while($row_orders_total = mysql_fetch_array($orders_total)) { // end // $Order_Grand_Total = $row_orders_total["value"]; } // -------------------- QUERIES 8 ------------------------------------// //Kundendaten wie Name, Faxnummer und Refferer $customers = tep_db_query("select customers_gender, customers_firstname, customers_lastname, customers_fax from " . TABLE_CUSTOMERS . " where customers_id = " . $customers_id); //$row_customers = tep_db_fetch_array($customers); while($row_customers = mysql_fetch_array($customers)) { // end // $fax = $row_customers["customers_fax"]; $gender = $row_customers["customers_gender"]; $kvorname = $row_customers["customers_firstname"]; $knachname = $row_customers["customers_lastname"]; } // -------------------- QUERIES 10 ------------------------------------// //Products COunt $orders_count = tep_db_query("select count(products_quantity) as o_count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = " . $Orders_id); //$row_orders_total = tep_db_fetch_array($orders_total); while($row_orders_count = mysql_fetch_array($orders_count)) { // end // $Number_of_Items = $row_orders_count[0]; // used array to show the number of items ordered } // $Shipping_Weight = ""; $Coupon_Code = ""; $Order_security_msg = ""; $Order_Surcharge_Amount = ""; $Order_Surcharge_Something = ""; $Affiliate_code = ""; $Sentiment_message = ""; $Checkout_form_type = ""; $future1 = " "; $future2 = ""; $future3 = ""; $future4 = ""; $future5 = ""; $future6 = ""; $future7 = ""; $future8 = ""; $future9 = ""; // csv settings //$CSV_SEPARATOR = ";"; //$CSV_NEWLINE = "\r\n"; //$csv_output .= $Orders_id . $delim ; //$csv_output .= $Date . $delim ; //$csv_output .= $Time . $delim ; //$csv_output .= $customers_id . $delim ; //$csv_output .= $gender . $delim ; //$csv_output .= $kvorname . $delim ; //$csv_output .= $knachname . $delim ; //$csv_output .= $Company . $delim ; //$csv_output .= $email . $delim ; //$csv_output .= $Billing_Address_1 . $delim ; //$csv_output .= $Billing_Address_2 . $delim ; //$csv_output .= $Billing_City . $delim ; //$csv_output .= $Billing_State . $delim ; //$csv_output .= $Billing_Zip . $delim ; //$csv_output .= $Billing_Country . $delim ; //$csv_output .= $Billing_Phone . $delim ; //$csv_output .= $fax . $delim ; //$csv_output .= $ShipTo_First_Name . $delim ; //$csv_output .= $ShipTo_Last_Name . $delim ; //$csv_output .= $ShipTo_Name . $delim ; //$csv_output .= $ShipTo_Company . $delim ; //$csv_output .= $ShipTo_Address_1 . $delim ; //$csv_output .= $ShipTo_Address_2 . $delim ; //$csv_output .= $ShipTo_City . $delim ; //$csv_output .= $ShipTo_State . $delim ; //$csv_output .= $ShipTo_Zip . $delim ; //$csv_output .= $ShipTo_Country . $delim ; //$csv_output .= $ShipTo_Phone . $delim ; //$csv_output .= $Card_Type . $delim ; //$csv_output .= $Card_Number . $delim ; //$csv_output .= $Exp_Date . $delim ; //$csv_output .= $Bank_Name . $delim ; //$csv_output .= $Gateway . $delim ; //$csv_output .= $AVS_Code . $delim ; //$csv_output .= $Transaction_ID . $delim ; //$csv_output .= $payment . $delim ; //$csv_output .= $Order_Special_Notes . $delim ; //$csv_output .= $Comments . $delim ; //$csv_output .= $Order_Subtotal . $delim ; //$csv_output .= $Order_Tax . $delim ; //$csv_output .= $Order_Insurance . $delim ; //$csv_output .= $Tax_Exempt_Message . $delim ; //$csv_output .= $Order_Shipping_Total . $delim ; //$csv_output .= $nn_gebuehr . $delim ; //$csv_output .= $minderwert . $delim ; //$csv_output .= $coupon . $delim ; //$csv_output .= $Small_Order_Fee . $delim ; //$csv_output .= $Discount_Rate . $delim ; //$csv_output .= $Discount_Message . $delim ; //$csv_output .= $CODAmount . $delim ; //$csv_output .= $Order_Grand_Total . $delim ; //$csv_output .= $Number_of_Items . $delim ; //$csv_output .= $Shipping_Method . $delim ; //$csv_output .= $Shipping_Weight . $delim ; //$csv_output .= $Coupon_Code . $delim ; //$csv_output .= $Order_security_msg . $delim ; //$csv_output .= $Order_Surcharge_Amount . $delim ; //$csv_output .= $Order_Surcharge_Something . $delim ; //$csv_output .= $Affiliate_code . $delim ; //$csv_output .= $Sentiment_message . $delim ; //$csv_output .= $Checkout_form_type . $delim ; //$csv_output .= $productname . $delim ; // -------------------- QUERIES 9 ------------------------------------// //Get list of products ordered $orders_products = tep_db_query("select products_model, products_price, products_quantity, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = " . $Orders_id); $productname = $row_customers["products_name"]; $order_num = $Orders_id; // While loop to list the item $csv_output .= $open_table; $csv_output .= $open_header; if($submitted == 2){ // Html output to screen $csv_output .= "<td width=20>Num".$delim; $csv_output .= "<td width=70>Date".$delim; $csv_output .= "<td width=70>Country".$delim; $csv_output .= "<td width=100>Customer".$delim; $csv_output .= "<td width=100>Model".$delim; $csv_output .= "<td width=25>Qty".$delim; $csv_output .= "<td>Product".$delim; $csv_output .= "<td>Comments".$delim; } $csv_output .= $close_header; while($row_orders_products = mysql_fetch_array($orders_products)) { $csv_output .= $open_row; //$csv_output .= $open_column.$order_url.$order_num.$order_edit . $delim ; $csv_output .= $submitted == 1 ? $open_column.$order_url.$order_num.$order_edit.$delim : $open_column."<a href=".$order_url.$order_num.$order_edit.">".$order_num."</a>".$delim; $csv_output .= $open_column.$Date . $delim ; $csv_output .= $open_column.$ShipTo_Country . $delim ; $csv_output .= $open_column.$kvorname .$space . $knachname . $delim ; $csv_output .= $open_column.filter_text($row_orders_products[0]) . $delim ; //$csv_output .= $open_column.$row_orders_products[1] . $delim ; //product price $csv_output .= $open_column.$row_orders_products[2] . $delim ; $csv_output .= $open_column.filter_text($row_orders_products[3]) . $delim ; $csv_output .= $open_column.$Comments . $delim ; $csv_output .= $submitted == 1 ? "\n" : ""; $csv_output .= $close_row; } // end while loop for products $csv_output .= $close_table; $csv_output .= $submitted == 1 ? "" : "<br>"; // --------------------------------------------------------------------------// //$csv_output .= "\n"; } // while loop main first //BOF OUTPUT if($submitted == 1){ header("Content-Type: application/force-download\n"); header("Cache-Control: cache, must-revalidate"); header("Pragma: public"); header("Content-Disposition: attachment; filename=orders_" . date("dmY") . ".csv"); print $csv_output; } elseif($submitted == 2){ $csv_output = str_replace("\n", "<br>", $csv_output); echo "<p dir=rtl>".$csv_output."</p>"; } exit; //EOF OUTPUT }//function main function filter_text($text) { $filter_array = array(",","\r","\n","\t"); return str_replace($filter_array,"",$text); } // function for the filter ?> Link to comment Share on other sites More sharing options...
vampirehunter Posted August 15, 2012 Share Posted August 15, 2012 has anyone got a simple tutorial for making this work on 2.3.2? is there a reason why the original contribution has an installer file? it seems there is no documentation with it at all. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.