djmonkey1 Posted February 1, 2007 Share Posted February 1, 2007 I just installed the new version of this contribution (v2.8.4), and get the following error when I try to install a product (after clicking on its name or model): Fatal error: Call to undefined function: tep_html_no_oe_quote() in c:\program files\easyphp1-8\www\catalog\admin\edit_orders.php on line 2207 The 2.8.3 version was working just fine. Where should I add this function for the contribution to work? Add the following function to admin/includes/functions/oe_functions.php: // Function : tep_hml_no_oe_quote // Arguments : string any string // Return : strips apostrophes from strings //Used with Order Editor to workaround problem with apostrophes, double quotes, and line breaks function tep_html_no_oe_quote($string) { $string=str_replace(''', '', $string); $string=str_replace("'", "", $string); $string=str_replace('"', '', $string); $string=preg_replace("/\\r\\n|\\n|\\r/", "<BR>", $string); return $string; } ///end function tep_html_no_oe_quote I've uploaded a corrected package for v2.8.4 that includes the function. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Guest Posted February 1, 2007 Share Posted February 1, 2007 That's very strange, because ot_custom is used by Order Editor as the class value for additional fees added in by admin when using Order Editor. I've never heard of a shipping module using that class value. Shipping charges should be stored as ot_shipping. Are you sure this isn't one that you had to add back in using Order Editor after the original component disappeared? No- I actually created a new test order when you asked for the information so I know it hadn't been edited/messed with at all. Quote Link to comment Share on other sites More sharing options...
niviche Posted February 1, 2007 Share Posted February 1, 2007 Add the following function to admin/includes/functions/oe_functions.php: Thank you. I did this, but am getting a "parse error" in this code. :( Quote Quick stock update from the product listing page | Customers Drop Down In Orders List Link to comment Share on other sites More sharing options...
xavkick Posted February 1, 2007 Share Posted February 1, 2007 hi DJ, I have upload your new files but i have a trouble now with the search suggest. My eplorer did not respons anymore. xav Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 Thank you. I did this, but am getting a "parse error" in this code. :( Please post the actual error that you're getting. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 hi DJ, I have upload your new files but i have a trouble now with the search suggest. My eplorer did not respons anymore. xav Could you please be more specific about the trouble that you're having and also tell me what browser you're using. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 No- I actually created a new test order when you asked for the information so I know it hadn't been edited/messed with at all. That's bizarre- what shipping module are you using? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2007 Share Posted February 2, 2007 That's bizarre- what shipping module are you using? USPSMethods2.6 Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 USPSMethods2.6 Try this and see if it helps: find in admin/edit_orders.php if (!trim($ot_value) && ($ot_class != "ot_shipping") && ($ot_class != "ot_subtotal") && ($ot_class != "ot_total")) { // value = 0 => Delete Total Piece and change it to if (!trim($ot_value) && ($ot_class != "ot_shipping") && ($ot_class != "ot_custom") && ($ot_class != "ot_subtotal") && ($ot_class != "ot_total")) { // value = 0 => Delete Total Piece Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2007 Share Posted February 2, 2007 Try this and see if it helps: find in admin/edit_orders.php if (!trim($ot_value) && ($ot_class != "ot_shipping") && ($ot_class != "ot_subtotal") && ($ot_class != "ot_total")) { // value = 0 => Delete Total Piece and change it to if (!trim($ot_value) && ($ot_class != "ot_shipping") && ($ot_class != "ot_custom") && ($ot_class != "ot_subtotal") && ($ot_class != "ot_total")) { // value = 0 => Delete Total Piece Nope- no change, still drops the shipping. Quote Link to comment Share on other sites More sharing options...
niviche Posted February 2, 2007 Share Posted February 2, 2007 Please post the actual error that you're getting. As you told me a few posts above, I added the following code to \admin\includes\functions\oe_functions.php: // Function : tep_hml_no_oe_quote // Arguments : string any string // Return : strips apostrophes from strings //Used with Order Editor to workaround problem with apostrophes, double quotes, and line breaks function tep_html_no_oe_quote($string) { $string=str_replace(''', '', $string); $string=str_replace("'", "", $string); $string=str_replace('"', '', $string); $string=preg_replace("/\\r\\n|\\n|\\r/", "<BR>", $string); return $string; } ///end function tep_html_no_oe_quote And now, when I try to edit an order, I get: Parse error: parse error in c:\program files\easyphp1-8\www\catalog\admin\includes\functions\oe_functions.php on line 26 the line 26 is this one: $string=str_replace(''', '', $string); Quote Quick stock update from the product listing page | Customers Drop Down In Orders List Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 As you told me a few posts above, I added the following code to \admin\includes\functions\oe_functions.php: // Function : tep_hml_no_oe_quote // Arguments : string any string // Return : strips apostrophes from strings //Used with Order Editor to workaround problem with apostrophes, double quotes, and line breaks function tep_html_no_oe_quote($string) { $string=str_replace(''', '', $string); $string=str_replace("'", "", $string); $string=str_replace('"', '', $string); $string=preg_replace("/\\r\\n|\\n|\\r/", "<BR>", $string); return $string; } ///end function tep_html_no_oe_quote And now, when I try to edit an order, I get: Parse error: parse error in c:\program files\easyphp1-8\www\catalog\admin\includes\functions\oe_functions.php on line 26 the line 26 is this one: $string=str_replace(''', '', $string); The problem here is the way the osCommerce forum turns HTML code into the character it represents rather than leaving the code as is. Since I can't post the code, in order for yours to work you'll have to download the corrected package for v2.8.4 and copy the correct code directly from the file included with that package. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 2, 2007 Share Posted February 2, 2007 Nope- no change, still drops the shipping. There's got to be something else wrong that we're not seeing. Does the orders_id for the shipping component match the orders_id for the rest of the order? Is the sort_order value greater than the sort_order total for the ot_total component? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
niviche Posted February 2, 2007 Share Posted February 2, 2007 Since I can't post the code, in order for yours to work you'll have to download the corrected package for v2.8.4 and copy the correct code directly from the file included with that package. Thank you. For some reason, my browser had cached the Contribution page, and I couldn't see the corrected package. I have it now, and all works fine. Congratulations once again for this excellent contribution. Quote Quick stock update from the product listing page | Customers Drop Down In Orders List Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2007 Share Posted February 2, 2007 There's got to be something else wrong that we're not seeing. Does the orders_id for the shipping component match the orders_id for the rest of the order? Is the sort_order value greater than the sort_order total for the ot_total component? I've put through 4 test orders this morning (making sure to keep them under $25 so they won't qualify for free shipping) and all 4 of them show the right total WITH shipping but when I go to the database they only list the total (sort order 6) and sub-total (sort order 1) and no shipping (even as ot_custom) at all. When I go in to the edit_orders and click update they lose the shipping completely and nothing changes in the database. I thought maybe there was a conflict with something else so I searched for 'ot_custom' using Dreamweaver and edit_orders is the only file using it in the entire site. Quote Link to comment Share on other sites More sharing options...
Pilly Posted February 2, 2007 Share Posted February 2, 2007 Hi, I love this contrib, and update it always, but i have an idea, just wanted to throw it out there. I have the address line2 contrib added is there anyway to have this incorporated? i can add it manually but Im sure Im not the only person who uses both contribs. ie, if the DB field entry_street_address2 exists then add incorporate it into edit orders else leave it out? Quote Link to comment Share on other sites More sharing options...
appel268576 Posted February 2, 2007 Share Posted February 2, 2007 in this order editing tool, what would be quite handy is if you have the ability of adding on serial numbers, as well as been able to track stock, let say a person is running a online shop as well as a retail store, it will be quite handy if they can put note in the stock, like *product #1* - reserved, or backordered, or picked up. is there any way that it can be done. this is an amazing tool, i only started to use it yesterday, but it seems top notch. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 3, 2007 Share Posted February 3, 2007 I've put through 4 test orders this morning (making sure to keep them under $25 so they won't qualify for free shipping) and all 4 of them show the right total WITH shipping but when I go to the database they only list the total (sort order 6) and sub-total (sort order 1) and no shipping (even as ot_custom) at all. When I go in to the edit_orders and click update they lose the shipping completely and nothing changes in the database. I thought maybe there was a conflict with something else so I searched for 'ot_custom' using Dreamweaver and edit_orders is the only file using it in the entire site. That's what I was thinking. I've never heard of a shipping module using ot_custom; in fact, as far as I know, it's unique to Order Editor. From what you've described, the ot_shipping component of your orders isn't being saved by the shipping module at all. The best you can do with Order Editor is add it in after the fact (as an ot_custom item). You'll need to do some work on your shipping module to get it to pass the correct variables through the checkout process in order to save the data in the database properly. Just a thought- is register_globals turned off on your server? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 3, 2007 Share Posted February 3, 2007 Hi,I love this contrib, and update it always, but i have an idea, just wanted to throw it out there. I have the address line2 contrib added is there anyway to have this incorporated? i can add it manually but Im sure Im not the only person who uses both contribs. ie, if the DB field entry_street_address2 exists then add incorporate it into edit orders else leave it out? Yes, it's a pretty simple addition. You have to add street_address2 into the admin/includes/classes/oe_order.php in each of the customer, billing, and delivery arrays (this is so you pull the info from the database), then in edit_orders.php three times under // 1.1 UPDATE ORDER INFO ##### once again, once each for customer, billing, and delivery (this is so you post the info to the database), then finally starting at <!-- customer_info bof //--> you'd add in one section of code for each of the three entries customer, billing and delivery (this is so you can edit the information). Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2007 Share Posted February 3, 2007 That's what I was thinking. I've never heard of a shipping module using ot_custom; in fact, as far as I know, it's unique to Order Editor. From what you've described, the ot_shipping component of your orders isn't being saved by the shipping module at all. The best you can do with Order Editor is add it in after the fact (as an ot_custom item). You'll need to do some work on your shipping module to get it to pass the correct variables through the checkout process in order to save the data in the database properly. Just a thought- is register_globals turned off on your server? No- it's on, I had problems with that last year when I was running a cron job so if it goes off (for example, when they moved my site onto a new server without telling me) I always know right away because the cron doesn't work. I'm going to look into the free shipping/minimum amount mod- maybe there's something in there screwing things up with the edit. Thanks for trying though! Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 3, 2007 Share Posted February 3, 2007 in this order editing tool, what would be quite handy is if you have the ability of adding on serial numbers, as well as been able to track stock, let say a person is running a online shop as well as a retail store, it will be quite handy if they can put note in the stock, like *product #1* - reserved, or backordered, or picked up. is there any way that it can be done. this is an amazing tool, i only started to use it yesterday, but it seems top notch. This would also be a simple addition. You would have to add a column to the orders_products table, "products_status" for example, where the information can be stored. Then you'd modify admin/includes/classes/oe_order.php to pull the info from the database. This would only require two additional lines. If you did use "products_status" you would add the line op.products_status, after op.orders_products_id, and then you would add 'status' => $orders_products['products_status'], after 'qty' => $orders_products['products_quantity'], Next in admin/edit_orders.php at about line 246 you would change else { // if we don't delete, we update $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS . " SET products_model = '" . $products_details["model"] . "', products_name = '" . tep_html_quotes($products_details["name"]) . "', products_price = '" . $products_details["price"] . "', final_price = '" . $products_details["final_price"] . "', products_tax = '" . $products_details["tax"] . "', products_quantity = '" . $products_details["qty"] . "' WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '$orders_products_id';"; tep_db_query($Query); to else { // if we don't delete, we update $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS . " SET products_model = '" . $products_details["model"] . "', products_name = '" . tep_html_quotes($products_details["name"]) . "', products_status = '" . $products_details["status"] . "' products_price = '" . $products_details["price"] . "', final_price = '" . $products_details["final_price"] . "', products_tax = '" . $products_details["tax"] . "', products_quantity = '" . $products_details["qty"] . "' WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '$orders_products_id';"; tep_db_query($Query); Finally you would need to edit the code so you would be able to view and edit the information. The HTML for that section starts at about line 1723 with <table border="0" width="100%" cellspacing="0" cellpadding="2" style="border: 1px solid #C9C9C9;"> <tr class="dataTableHeadingRow"> If, for example, you wanted to add in the products status in between Quantity and Product name, you would change <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_QUANTITY; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> to <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_QUANTITY; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_STATUS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> Then you would change ' <td class="' . $RowStyle . '" valign="top">' . "<input name='update_products[$orders_products_id][name]' size='35' value='" . tep_html_quotes($order->products[$i]['name']) . "'>"; to ' <td class="' . $RowStyle . '" valign="top"><div align="center">' . "<input name='update_products[$orders_products_id][status]' size='10' value='" . $order->products[$i]['status'] . "' /></div></td>\n" . ' <td class="' . $RowStyle . '" valign="top">' . "<input name='update_products[$orders_products_id][name]' size='35' value='" . tep_html_quotes($order->products[$i]['name']) . "'>"; I'm pretty sure that would do the trick. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
demoalt Posted February 7, 2007 Share Posted February 7, 2007 (edited) have installed last version: v2.8.5 with minor bug fix there is a bug when adding product... it adds product with 0% tax. around line 566 in edit_orders.php, lines refer to countryid and zoneid that haven't been defined yet, just add: $countryid = $order->delivery['country_id']; $zoneid=$order->delivery['zone_id']; before if ($new_price) { $p_products_price = $new_price['specials_new_products_price']; } // 2.2 UPDATE ORDER #### $Query = "INSERT INTO " . TABLE_ORDERS_PRODUCTS . " SET orders_id = '" . (int)$oID . "', products_id = '" . $_POST['add_product_products_id'] . "', products_model = '" . $p_products_model . "', products_name = '" . tep_html_quotes($p_products_name) . "', products_price = '". $p_products_price . "', final_price = '" . ($p_products_price + $AddedOptionsPrice) . "', products_tax = '" . tep_get_tax_rate($p_products_tax_class_id, $countryid, $zoneid) . "', products_quantity = '" . $_POST['add_product_quantity'] . "'"; tep_db_query($Query); $new_product_id = tep_db_insert_id(); Edited February 7, 2007 by demoalt Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 7, 2007 Share Posted February 7, 2007 have installed last version: v2.8.5 with minor bug fixthere is a bug when adding product... it adds product with 0% tax. around line 566 in edit_orders.php, lines refer to countryid and zoneid that haven't been defined yet, just add: $countryid = $order->delivery['country_id']; $zoneid=$order->delivery['zone_id']; before if ($new_price) { $p_products_price = $new_price['specials_new_products_price']; } Order Editor determines the tax rate of each product based on the tax class that the product is in and the tax zone, if any, that the product is being delivered to. The code that defines $countryid and $zoneid are in includes/classes/oe_order.php: $countryid = tep_get_country_id($this->delivery["country"]); $zoneid = tep_get_zone_id($countryid, $this->delivery["state"]); It shouldn't be necessary to re-define those variables. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
demoalt Posted February 7, 2007 Share Posted February 7, 2007 Order Editor determines the tax rate of each product based on the tax class that the product is in and the tax zone, if any, that the product is being delivered to. The code that defines $countryid and $zoneid are in includes/classes/oe_order.php: $countryid = tep_get_country_id($this->delivery["country"]); $zoneid = tep_get_zone_id($countryid, $this->delivery["state"]); It shouldn't be necessary to re-define those variables. I had to modify this way since it was not working for me... it was getting 0% for each new added product. works for me :) strange behaviour :( Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 8, 2007 Share Posted February 8, 2007 I had to modify this way since it was not working for me... it was getting 0% for each new added product.works for me :) strange behaviour :( Interesting. What version of PHP are you running? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.