Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cancelled Orders Contribution Support


gottaloveit

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

  • 4 weeks later...

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

----------------------------

Long Island, New York

Link to comment
Share on other sites

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

----------------------------

Long Island, New York

Link to comment
Share on other sites

  • 3 weeks later...
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

 

 

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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

----------------------------

Long Island, New York

Link to comment
Share on other sites

  • 3 weeks later...

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.

--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

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...

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!

Link to comment
Share on other sites

  • 4 weeks later...

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!

--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

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

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? :(

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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!

 

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?

Link to comment
Share on other sites

  • 4 weeks later...
Catman, if you can explain how you fixed this error, I would greatly appreciate it....

 

 

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!!!!

Link to comment
Share on other sites

  • 5 weeks later...

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 . "'");

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...