gottaloveit Posted December 23, 2003 Share Posted December 23, 2003 Hello all, please use this topic for bug feedback, additions, etc. for this contribution. See: Cancelled Orders Contribution in the osCommerce Contribution Announcement Forum and also Cancelled Orders Contribution download from www.osCommerce.com contributions. Thank you. Quote GottaLoveIT PHP5 Fixes Cancelled Orders Faster Page Loads, Less DB Queries Enhanced Vendors Category Images / Folders Tree Link to comment Share on other sites More sharing options...
gottaloveit Posted December 25, 2003 Author Share Posted December 25, 2003 Hello, I have posted an update to this contrib as Version 1.1. Version 1.1 has these additional features: Added customer view from "my account" page Added database tables to admin/backup script Download from osCommerce at: http://www.oscommerce.com/community/contributions,1744 Quote GottaLoveIT PHP5 Fixes Cancelled Orders Faster Page Loads, Less DB Queries Enhanced Vendors Category Images / Folders Tree Link to comment Share on other sites More sharing options...
applelinks Posted January 17, 2004 Share Posted January 17, 2004 HI I have it almost working when i'm on the cancelled_account_history.php page and i click the view link it takes me to the account_history.php page not the cancelled_account_history_info.php page is there a fix for this, am i missing something? Thanks Joe Quote ---------------------------- Long Island, New York Link to comment Share on other sites More sharing options...
applelinks Posted January 17, 2004 Share Posted January 17, 2004 One more problem. I'm using manual order entry to create an order. Once the order was created i went to cancel the order and i got this error 1062 - Duplicate entry '0' for key 1 insert into cancelled_orders_status_history (orders_id, orders_status_id, date_added, customer_notified) values ('8646', '2099', now(), '0') [TEP STOP] Joe Quote ---------------------------- Long Island, New York Link to comment Share on other sites More sharing options...
♥Stephan Gebbers Posted February 8, 2004 Share Posted February 8, 2004 HI I have it almost working when i'm on the cancelled_account_history.php page and i click the view link it takes me to the account_history.php page not the cancelled_account_history_info.php page is there a fix for this, am i missing something? Thanks Joe at line 65 in cancelled_account_history.php $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TCANCELLED_TABLE_ORDERS . " o, " . CANCELLED_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC"; replace TCANCELLED_TABLE_ORDERS with CANCELLED_TABLE_ORDERS. at line 20 in cancelled_account_history_info.php if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO); replace the FILENAME_ACCOUNT_HISTORY_INFO with FILENAME_CANCELLED_ACCOUNT_HISTORY_INFO and TABLE_ORDERS with TABLE_CANCELLED_ORDERS Thx for this great contribution. :) Regards, Stephan Quote Link to comment Share on other sites More sharing options...
♥Stephan Gebbers Posted February 8, 2004 Share Posted February 8, 2004 I would like to see the following feature. When a product goes back into stock on cancelling an order and the product has a quantity of 0 and and is deactivated it should automaticly become activated again on the stock update. Could someone add this functionality to the contribution? Regards, Stephan Quote Link to comment Share on other sites More sharing options...
applelinks Posted February 9, 2004 Share Posted February 9, 2004 HI I have it almost working when i'm on the cancelled_account_history.php page and i click the view link it takes me to the account_history.php page not the cancelled_account_history_info.php page is there a fix for this, am i missing something? Thanks Joe at line 65 in cancelled_account_history.php $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TCANCELLED_TABLE_ORDERS . " o, " . CANCELLED_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC"; replace TCANCELLED_TABLE_ORDERS with CANCELLED_TABLE_ORDERS. at line 20 in cancelled_account_history_info.php if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO); replace the FILENAME_ACCOUNT_HISTORY_INFO with FILENAME_CANCELLED_ACCOUNT_HISTORY_INFO and TABLE_ORDERS with TABLE_CANCELLED_ORDERS Thx for this great contribution. :) Regards, Stephan Thanks for all the help I think CANCELLED_TABLE_ORDERS needs to be TABLE_CANCELLED_ORDERS Joe Quote ---------------------------- Long Island, New York Link to comment Share on other sites More sharing options...
♥Stephan Gebbers Posted February 9, 2004 Share Posted February 9, 2004 whoops :blink: absolutly right.. thx for fixing the fix L8er, Stephan Quote Link to comment Share on other sites More sharing options...
Sanguinarius Posted February 29, 2004 Share Posted February 29, 2004 I installed the Cancelled Orders v. 2.2 ms2 and I'm getting the error message: 1146 - Table 'sanguinarius_org_-_oscommerce.TABLE_CANCELLED_ORDERS' doesn't exist select count(*) as total from TABLE_CANCELLED_ORDERS o left join TABLE_CANCELLED_ORDERS_TOTAL ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' [TEP STOP] The only thing I can think of is that before I knew of this mod, I had gone into the Admin area and created a canelened orders status, but I deleted that before I began the installtion of this mod. Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
Sanguinarius Posted February 29, 2004 Share Posted February 29, 2004 btw, I went into phpmyAdmin and checked and the table DOES exist. *confused* Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
Sanguinarius Posted March 5, 2004 Share Posted March 5, 2004 *bump* Can someone please help me out on this? Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
JesperDK Posted March 27, 2004 Share Posted March 27, 2004 Hi guys, I just intalled the Cancelled Orders contrib and everything works perfectly! However, I was wondering if it would be possible to create a system like making invoices but for use with the cancelled orders? I have to make printed copies for the government because of taxes and refunds. So it would be perfect, if it could simply take the invoice.php and change "Invoice" into "cancelled" and the amounts into negative numbers, ie. -$10 instead of $10. Would this be possible? Thanks :) Jesper Quote Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2004 Share Posted May 14, 2004 Hi, installed the contrib, and it is working ie I was able to cancel an order, but I cannot see any links in the admin panel to view the cancelled orders, etc. Where might I have an error? Thanks, great contribution! Quote Link to comment Share on other sites More sharing options...
Sanguinarius Posted June 5, 2004 Share Posted June 5, 2004 I've double-checked my installation. I've triple checked my installation th other day, and a few minutes ago, I quadruple checked my installation. I'm still getting on http://www.sanguinarius.org/store/cancelle...unt_history.php this: Order Information 1146 - Table 'sanguinarius_org_-_oscommerce.TCANCELLED_TABLE_ORDERS' doesn't exist select count(*) as total from TCANCELLED_TABLE_ORDERS o, CANCELLED_ORDERS_TOTAL ot, orders_status s where o.customers_id = '2' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '1' [TEP STOP] When I tried re-running the cancelled_orders.sql file, my phpAdmin database says: Error SQL-query : CREATE TABLE cancelled_orders ( orders_id int(11) NOT NULL, customers_id int(11) NOT NULL default '0', customers_name char(64) NOT NULL default '', customers_company char(32) default NULL, customers_street_address char(64) NOT NULL default '', customers_suburb char(32) default NULL, customers_city char(32) NOT NULL default '', customers_postcode char(10) NOT NULL default '', customers_state char(32) default NULL, customers_country char(32) NOT NULL default '', customers_telephone char(32) NOT NULL default '', customers_email_address char(96) NOT NULL default '', customers_address_format_id int(5) NOT NULL default '0', delivery_name char(64) NOT NULL default '', delivery_company char(32) default NULL, delivery_street_address char(64) NOT NULL default '', delivery_suburb char(32) default NULL, delivery_city char(32) NOT NULL default '', delivery_postcode char(10) NOT NULL default '', delivery_state char(32) default NULL, delivery_country char(32) NOT NULL default '', delivery_address_format_id int(5) NOT NULL default '0', billing_name char(64) NOT NULL default '', billing_company char(32) default NULL, billing_street_address char(64) NOT NULL default '', billing_suburb char(32) default NULL, billing_city char(32) NOT NULL default '', billing_postcode char(10) NOT NULL default '', billing_state char(32) default NULL, billing_country char(32) NOT NULL default '', billing_address_format_id int(5) NOT NULL default '0', payment_method char(32) NOT NULL default '', cc_type char(20) default NULL, cc_owner char(64) default NULL, cc_number char(32) default NULL, cc_expires char(4) default NULL, last_modified datetime default NULL, date_purchased datetime default NULL, orders_status int(5) NOT NULL default '0', orders_date_finished datetime default NULL, currency char(3) default NULL, currency_value decimal(14,6) default NULL, PRIMARY KEY (orders_id) ) TYPE=MyISAM MySQL said: Table 'cancelled_orders' already exists Back Can someone please help me? I don't know why it works great for everybody else, except for me. I'm not stupid. I've installed *other* mods before. I can follow directions. If I made a mistake, I would have caught it, by now. I keep checking and re-checking my work as if that will magically fix things, but strangely enough -- it doesn't! Imagine that... How odd. ;) PLEASE I need help! Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
Guest Posted June 23, 2004 Share Posted June 23, 2004 Hey all, I'm still running 2.1 and will not be updating in the near future. This contrib says it is for 2.2 but I was wondering if anyone has installed it on 2.1 and have it working? Anyone?? Thanks! Rob Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2004 Share Posted August 11, 2004 Great contribution. Worked great until today. Can someone please help point me into the right direction or help me figure out what this error is trying to tell me? 1136 - Column count doesn't match value count at row 1 insert into cancelled_orders select * from orders where orders_id = '442' [TEP STOP] I have looked at the two tables and everything looks to be the same. Thanks for any help you have to offer. Kelly Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2004 Share Posted August 11, 2004 OK!!! I figured it out!!!! Someone kick me!!!! :ph34r: I forgot I deleted a column ID the other day. :lol: FYI: for those trying to find the same answer I bet if you check the two Column Header IDs you will see that they do not match. Have a great day all!!!! B) Quote Link to comment Share on other sites More sharing options...
Hein Posted September 6, 2004 Share Posted September 6, 2004 Hi Catman, Could you be a bit more specific :-) I've looked over everything too many a time and think I'm losing my head :-( Help appreciated Regards Quote Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2004 Share Posted September 7, 2004 anyone having a problem, upon entering the admin area (index.php) that the cancelled order # is at zero? I have 18 cancelled orders, yet this one is incorrect. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2004 Share Posted September 22, 2004 I am having the same problem 1136 - Column count doesn't match value count at row 1 insert into cancelled_orders select * from orders where orders_id = '6' [TEP STOP] I cannot figure it out, novice at this.... Can someone help me and explain how to fix it? :( Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2004 Share Posted September 23, 2004 I cannot figure it out. I have uploaded the sql file 3 times, scanned over the tables and cannot find what is off. Catman, if you can explain how you fixed this error, I would greatly appreciate it.... Quote Link to comment Share on other sites More sharing options...
FM Posted September 28, 2004 Share Posted September 28, 2004 Hi, installed the contrib, and it is working ie I was able to cancel an order, but I cannot see any links in the admin panel to view the cancelled orders, etc. Where might I have an error? Thanks, great contribution! <{POST_SNAPBACK}> I have this same problem but it happened only when I use Finnish instead of English. I can cance the order but cannot see the cancelled orders when entering the admin/cancelled_orders.php. Nothing is listed. Same thing with the catalog side. When I try to check my cancelled orders and language is Finnish it shows nothing. When I change to English all cancelled orders are shown. Is there a way to fix this language problem? Quote Link to comment Share on other sites More sharing options...
FM Posted October 1, 2004 Share Posted October 1, 2004 (edited) Does anyone know how to make this contribution support other languages also? Your help would be appreciated! :rolleyes: Edited October 1, 2004 by FM Quote Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2004 Share Posted October 24, 2004 Catman, if you can explain how you fixed this error, I would greatly appreciate it.... <{POST_SNAPBACK}> I am not sure if anyone has found the problem, but I fell upon this request today and hope my assistance isn't too late. I think this is a simple fix or it was in my case. All you need to do is make sure your fields in the "orders" table match the fields in the "cancelled_orders" table. Maybe look at each table and compare, if you see any differences, change the "cancelled_orders" table to match. Remember to back up first!!!! Quote Link to comment Share on other sites More sharing options...
MzBeanz Posted November 23, 2004 Share Posted November 23, 2004 Hi everyone! I love this contribution but I am having trouble. I am trying to install the change to the followinf file, but I do not see this code anywhere in the file?? Can anybody help me? Thanks so much! /admin/includes/functions/general.php --------------------------------------------------------- FIND THIS CODE ORIGINAL CODE TOWARDS THE BOTTOM OF THE FILE --------------------------------------------------------- function tep_remove_order($order_id, $restock = false) { if ($restock == 'on') { $order_query = tep_db_query("select products_id, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($order = tep_db_fetch_array($order_query)) { tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'"); } } tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'"); tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'"); tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'"); } Quote 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.