Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OrderCheck v 1.3 Released


Recommended Posts

http://www.oscommerce.com/community/contributions,1168

 

Ok, I think I finally got this right.

 

Welcome to new and handy dandy OrderCheck.

 

Ordercheck backs up all orders, which is useful for customers who don't finish their payments at paypal, 2checkout, and other type of services.

 

OrderCheck also !shows! with a cute red-light green-light system which orders are "problems" and which aren't.

 

OrderCheck also allows you to !move! your order to the regular "order's" table so that you can keep your accounting straight.

 

Code is osC compliant with an admin interface that matches the rest of osC.

 

I recommend such a system for folks that have sales that go through an outside payment system so that you can keep an eye on customers that aren't completely net savy.

 

cheers

 

Carsten

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

I love this contribe so far but I seem the be have a problem with it causeing this behavior to show up :

 

Sub-Total: $58.20

Sub-Total: $58.20

Table Rate (Fixed Rate): $10.00

Table Rate (Fixed Rate): $10.00

Total: $68.20

Total: $68.20

 

 

 

I am useing loaded5 and when I added

<?php

//BEGIN -- OrderCheck

require(DIR_WS_INCLUDES . FILENAME_ORDERCHECK_FUNCTIONS);

//END -- OrderCheck

?>

It broke completely untill I removed the <?php & ?>

 

other then that it works great

Any Idea where the dups are getting produced??

 

Cheers

Link to comment
Share on other sites

This is a very good module. It seems to work but I have an error just like Redmanmike as well as an error in the OrderCheck section (see below):

HEADING_TITLE HEADING_TITLE_SEARCH

HEADING_TITLE_STATUS TEXT_ALL_ORDERSPendingProcessingDeliveredPaypal Processing

 

 

TABLE_HEADING_CUSTOMERS TABLE_HEADING_ORDER_TOTAL TABLE_HEADING_DATE_PURCHASED TABLE_HEADING_ORDER_ID TABLE_HEADING_ORDER_DUPLICATE TABLE_HEADING_STATUS TABLE_HEADING_ACTION

Thomas Jones $46.95 05/06/2003 23:22:01 1 Pending

Displaying 1 to 1 (of 1 orders) Page 1 of 1

 

 

TABLE_HEADING_LEGEND

ORDER_IN_BOTH

ORDER_NOT_IN_BOTH

 

Is the above normal?

 

Thomas

 

http://www.oscommerce.com/community/contributions,1168

 

Ok, I think I finally got this right.

 

Welcome to new and handy dandy OrderCheck.

 

Ordercheck backs up all orders, which is useful for customers who don't finish their payments at paypal, 2checkout, and other type of services.

 

OrderCheck also !shows! with a cute red-light green-light system which orders are "problems" and which aren't.

 

OrderCheck also allows you to !move! your order to the regular "order's" table so that you can keep your accounting straight.

 

Code is osC compliant with an admin interface that matches the rest of osC.

 

I recommend such a system for folks that have sales that go through an outside payment system so that you can keep an eye on customers that aren't completely net savy.

 

cheers

 

Carsten

Link to comment
Share on other sites

When I tried to move an order than was NOT in Orders I received this error message:

 

1062 - Duplicate entry '8' for key 1

 

insert into orders_status_history (orders_status_history_id, orders_id, orders_status_id, date_added, customer_notified, comments) values ('8', '8', '1', '2003-05-07 00:04:27', '0', '')

 

[TEP STOP]

 

Also the emails are looking strange as well

Subject: EMAIL_TEXT_SUBJECT

From: "Your Gift Basket Store" <[email protected]>

X-Mailer: osC mailer

X-Rcpt-To: <[email protected]>

X-DPOP: Version number supressed

 

Your Gift Basket Store

EMAIL_SEPARATOR

EMAIL_TEXT_ORDER_NUMBER 8

EMAIL_TEXT_INVOICE_URL http://yourbasketstore.com/account_history....php?order_id=8

EMAIL_TEXT_DATE_ORDERED Wednesday 07 May, 2003

 

EMAIL_TEXT_COMMENTS_UPDATE

 

EMAIL_TEXT_STATUS_UPDATE

 

Thomas

Link to comment
Share on other sites

@ Doubles ... :evil:

Did you upgrade?

Are you using PayPal IPN?

 

@ THIS_TYPE_OF_ERROR

Looks like a language file isn't being called properly or is missing.

 

@ Mail

That too looks like a language file problem.

 

@ MOVE -- order

:shock: hmmm, I tested that out pretty throughly this time around. I too had such erros during development but I thought I had thought off the cases where such an error would occur. I double check the logic tonight.

 

Since you're having troubles with the language files, I wonder if you didn't miss something else??? However, I'll run more tests tonight on my box at home.

 

Cheers and sorry for all the troubles.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Moyashi,

 

I am using Loaded 5 and PayPal IPN is being used.

 

I will PM shortly.

 

Thomas

 

 

@ Doubles ... :evil:

Did you upgrade?

Are you using PayPal IPN?

 

@ THIS_TYPE_OF_ERROR

Looks like a language file isn't being called properly or is missing.

 

@ Mail

That too looks like a language file problem.

 

@ MOVE -- order

:shock: hmmm, I tested that out pretty throughly this time around. I too had such erros during development but I thought I had thought off the cases where such an error would occur. I double check the logic tonight.

 

Since you're having troubles with the language files, I wonder if you didn't miss something else??? However, I'll run more tests tonight on my box at home.

 

Cheers and sorry for all the troubles.

Link to comment
Share on other sites

Hello,

I am trying to install this contribution. I think I installed everything correctly but this is my error when i try to view it in browser.

 

Warning: main(DIR_WS_INCLUDESapplication_top_contribs.php) [function.main]: failed to create stream: No such file or directory in /home/karolep/public_html/catalog/includes/application_top.php on line 35

 

Fatal error: main() [function.main]: Failed opening required 'DIR_WS_INCLUDESapplication_top_contribs.php' (include_path='') in /home/karolep/public_html/catalog/includes/application_top.php on line 35

 

 

I checked on line 35 of the application_top.php file and it is this addition:

 

// Begin OrderCheck

require(DIR_WS_INCLUDES . 'application_top_contribs.php');

// End OrderCheck

 

Seems I am stuck at the first step.

 

Any assistance would be greatly appreciated.

 

Karole

Thanks,

 

Karole

Link to comment
Share on other sites

ok, the error is this:

(DIR_WS_INCLUDESapplication_top_contribs.php)

 

which should be

DIR_WS_INCLUDES . 'application_top_contribs.php

 

However I'm not sure where this mistype occured though :oops:

hmm, check in the application_top.php first ... and then let's go from there.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Hey Moyashi,

 

good contribution! nice concept. I installed v1.2 and will now upgrade to v1.3 without hesitation...

 

just 1 thing: I have the same error as Redmanmike:

Sub-Total: $58.20

Sub-Total: $58.20

Table Rate (Fixed Rate): $10.00

Table Rate (Fixed Rate): $10.00

Total: $68.20

Total: $68.20

 

having everything displayed double in the Checkout_confirmation.php...

Very annoying! :shock: Could you please check it out? I've been looking for a solution for some time now... Hadn't made the link to this contribution though... But seeing there are more people here with the same problem... I must agree that it could be due to Ordercheck contrib.

 

DicE

_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Link to comment
Share on other sites

OK, I redownloaded the tar and unzipped again - I reinstalled and am coming up with the same error.

I must be doing something wrong though if others can install this contribution and it is only me with this error.

I moved the:

// Begin OrderCheck

require(DIR_WS_INCLUDES . 'application_top_contribs.php');

// End OrderCheck

to the top of application_top.php and now the error is at line 13 instead of line 35 (where it had been coinciding with where I had it placed the first time).

Any suggestions would be appreciated.

 

~:~ Karole

Thanks,

 

Karole

Link to comment
Share on other sites

:evil: hmmm, why don't I get errors like this ??? :?:

 

@ double totals

I've been trying to track down the cause of the double output for a while now and have never had it happen on my dev box or on my demo server. :x

 

I'll have to take more time to see what's happening with this next week. I'm up to my ears in work right now.

 

If I could get more information it will definitely help to track down this problem.

 

@ application_top_contrib

moving that call shouldn't make any real difference. I have mine at the end of the file.

 

OK, which side is this error occurring in? Admin/catalog

Both sides use a similar file but the contents are different. Have you by accident copied the admin over the catalog one or vise versa?

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

I went in and made sure that I had the proper files in the proper admin and catalog sections.

 

The error is occuring in both admin and catalog sections.

Thanks,

 

Karole

Link to comment
Share on other sites

hey Moyashi,

 

I'm available for your assistence should you want to have a look at something...

 

I made a post about the same issue (the double trouble) in the Install & Config section few days ago.

 

have a look here:

http://www.oscommerce.com/forums/viewtopic.php?t=44571

 

I included login account so you can do a test drive :)

 

Hope it helps!

 

DicE

_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Link to comment
Share on other sites

@moyashi: it's www.thinq.be :D

 

have a look and see if you find the source of all the double trouble...

 

if you need access to admin part then PM me ..

 

DicE

_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Link to comment
Share on other sites

Hello it's me again,

I installed this on a friends site and it was apparently working. However, now when her clients come in to make an order they are receiving an error after they hit the pay with paypal option. This is the error:

 

Fatal error: Call to a member function on a non-object in

/home/sacred/public_html/includes/functions/ordercheck_functions.php on line

6

 

I went to that file and this is the information on line 6:

 

4 // data insert functions below.

5

6 $order_totals = $order_total_modules->process();

7

8 // -----------------------------------------------------------------------

 

I installed the information in the db :) and I have this working on my test site, but it isn't working on hers

 

Any ideas based on the error received?

 

~:~ Karole

Thanks,

 

Karole

Link to comment
Share on other sites

Also, a DB question:

 

If I did do the ordercheck.sql (or think I did) and want to reload it to make sure it was done, will that screw up anything if it is done 2x or does it overwrite and not effect things. I was thinking that possibly I didn't do that step but don't want to mess things up.

 

Thanks,

 

~:~ Karole

Thanks,

 

Karole

Link to comment
Share on other sites

Hi Karole,

 

the answer is in the SQL file:

CREATE TABLE holding_orders (

 orders_id int NOT NULL auto_increment,

 customers_id int NOT NULL,

 customers_name varchar(64) NOT NULL,

 customers_company varchar(32),

 customers_street_address varchar(64) NOT NULL,

 customers_suburb varchar(32),

... etc etc...

 

there are only "CREATE" statements, what basically means that the sql file will only attempt to create the tables. if they already exist, you'll only get an error from phpmyadmin...

 

about screwing anything up by doing it all over again... well, everything will be reset to default I guess.

 

I would manually try to alter things through phpmyadmin. like that you have the choice to keep the data you want, and replace what you think could be wrong...

 

good luck!

 

@Moyashi: Did you get the chance to have a closer look at the double appearing of the values on the checkout_confirmation? You're welcome to use my site as a tester if needed...

 

cya!

 

DicE

_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Link to comment
Share on other sites

Moyashi,

 

The problem begins at:

 

//BEGIN -- OrderCheck

require(DIR_WS_INCLUDES . FILENAME_ORDERCHECK_FUNCTIONS);

//END -- OrderCheck

 

Somehow and somewhere the script is calling for the information twice and the same time!

 

Thomas

 

Hey Moyashi,

 

good contribution! nice concept. I installed v1.2 and will now upgrade to v1.3 without hesitation...

 

just 1 thing: I have the same error as Redmanmike:

Sub-Total: $58.20

Sub-Total: $58.20

Table Rate (Fixed Rate): $10.00

Table Rate (Fixed Rate): $10.00

Total: $68.20

Total: $68.20

 

having everything displayed double in the Checkout_confirmation.php...

Very annoying! :shock: Could you please check it out? I've been looking for a solution for some time now... Hadn't made the link to this contribution though... But seeing there are more people here with the same problem... I must agree that it could be due to Ordercheck contrib.

 

DicE

Link to comment
Share on other sites

Moyashi,

 

The problem starts when '$order_totals = $order_total_modules->process();' is called in ORDERCHECK_FUNCTIONS!

 

I have checked as much as I can but since I do not know the PHP scripting language this is a far as I can go.

 

BTW I am running loaded 5.

 

Thomas

 

Here is the file from catalog /include/classes/order_total.php

<?php

/*

$Id: order_total.php,v 1.2 2003/03/01 21:59:59 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

class order_total {

var $modules;

 

// class constructor

function order_total() {

global $language;

if (MODULE_ORDER_TOTAL_INSTALLED) {

$this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);

reset($this->modules);

while (list(, $value) = each($this->modules)) {

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);

include(DIR_WS_MODULES . 'order_total/' . $value);

$class = substr($value, 0, strrpos($value, '.'));

$GLOBALS[$class] = new $class;

}

}

}

 

function process() {

$order_total_array = array();

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled) {

$GLOBALS[$class]->process();

 

for ($i=0; $i<sizeof($GLOBALS[$class]->output); $i++) {

if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) {

$order_total_array[] = array('code' => $GLOBALS[$class]->code,

'title' => $GLOBALS[$class]->output[$i]['title'],

'text' => $GLOBALS[$class]->output[$i]['text'],

'value' => $GLOBALS[$class]->output[$i]['value'],

'sort_order' => $GLOBALS[$class]->sort_order);

}

}

}

}

}

 

return $order_total_array;

}

 

function output() {

$output_string = '';

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled) {

for ($i=0; $i<sizeof($GLOBALS[$class]->output); $i++) {

$output_string .= ' <tr>' . "n" .

' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['title'] . '</td>' . "n" .

' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['text'] . '</td>' . "n" .

' </tr>';

}

}

}

}

 

return $output_string;

}

 

// ICW ORDER TOTAL CREDIT CLASS/GV SYSTEM - START ADDITION

//

// This function is called in checkout payment after display of payment methods. It actually calls

// two credit class functions.

//

// use_credit_amount() is normally a checkbox used to decide whether the credit amount should be applied to reduce

// the order total. Whether this is a Gift Voucher, or discount coupon or reward points etc.

//

// The second function called is credit_selection(). This in the credit classes already made is usually a redeem box. E.g.

// for entering a Gift Voucher number. Note credit classes can decide whether this part is displayed depending on

// a setting in the admin section.

//

function credit_selection() {

$selection_string = '';

$close_string = '';

$credit_class_string='';

if (MODULE_ORDER_TOTAL_INSTALLED) {

$header_string = '<tr>' . "n";

$header_string .= ' <td><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "n";

$output1_string .= ' <tr>' . "n";

$header_string .= ' <td class="main"><b>'.TABLE_HEADING_CREDIT.'</b></td>' . "n";

$header_string .= ' </tr>' . "n";

$header_string .= ' </table></td>' . "n";

$header_string .= ' </tr>' . "n";

$header_string .= '<tr>' . "n";

$header_string .= ' <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">' . "n";

$header_string .= ' <tr class="infoBoxContents"><td><table border="0" width="100%" cellspacing="0" cellpadding="2">' ."n";

$header_string .= ' <tr><td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' . "n";

$header_string .= ' <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "n";

$close_string = ' </table></td>';

$close_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>';

$close_string .= '</tr></table></td></tr></table></td>';

$close_string .= '<tr><td width="100%">' . tep_draw_separator('pixel_trans.gif', '100%', '10') .'</td></tr>';

reset($this->modules);

$output_string = '';

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {

$output_string .= $GLOBALS[$class]->use_credit_amount();

$selection_string = $GLOBALS[$class]->credit_selection();

if ($selection_string !='') {

$output_string .= '<tr colspan="4"><td colspan="4" width="100%">' . tep_draw_separator('pixel_trans.gif', '100%', '10') .'</td></tr>';

$output_string .= $selection_string;

}

}

}

if ($output_string != '') {

$output_string = $header_string . $output_string;

$output_string .= $close_string;

}

}

return $output_string;

}

 

// update_credit_account is called in checkout process on a per product basis. It's purpose

// is to decide whether each product in the cart should add something to a credit account.

// e.g. for the Gift Voucher it checks whether the product is a Gift voucher and then adds the amount

// to the Gift Voucher account.

// Another use would be to check if the product would give reward points and add these to the points/reward account.

//

function update_credit_account($i) {

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {

$GLOBALS[$class]->update_credit_account($i);

}

}

}

}

// This function is called in checkout confirmation.

// It's main use is for credit classes that use the credit_selection() method. This is usually for

// entering redeem codes(Gift Vouchers/Discount Coupons). This function is used to validate these codes.

// If they are valid then the necessary actions are taken, if not valid we are returned to checkout payment

// with an error

//

function collect_posts() {

global $HTTP_POST_VARS,$HTTP_SESSION_VARS;

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {

$post_var = 'c_'.$GLOBALS[$class]->code;

if ($HTTP_POST_VARS[$post_var]) $GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var];

if (!tep_session_is_registered($post_var)) tep_session_register($post_var);

$GLOBALS[$class]->collect_posts();

}

}

}

}

// pre_confirmation_check is called on checkout confirmation. It's function is to decide whether the

// credits available are greater than the order total. If they are then a variable (credit_covers) is set to

// true. This is used to bypass the payment method. In other words if the Gift Voucher is more than the order

// total, we don't want to go to paypal etc.

//

function pre_confirmation_check() {

global $payment_modules, $order, $credit_covers;

if (MODULE_ORDER_TOTAL_INSTALLED) {

$total_deductions = 0;

reset($this->modules);

$order_total = $order->info['total'];

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

$order_total=$this->get_order_total_main($class,$order_total);

if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {

$total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);

$order_total = $order_total - $GLOBALS[$class]->pre_confirmation_check($order_total);

}

}

If ($order->info['total'] - $total_deductions <= 0 ) {

//die('credit>total');

$credit_covers = true;

$payment_modules='';

}

}

}

//this function is called in checkout process. it tests whether a decision was made at checkout payment to use the credit

// amount be applied aginst the order. If so some action is taken. E.g. for a Gift voucher the account is reduced

// the order total amount.

//

function apply_credit() {

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {

$GLOBALS[$class]->apply_credit();

}

}

}

}

// Called in checkout process to clear session variables created by each credti class module.

//

function clear_posts() {

global $HTTP_POST_VARS,$HTTP_SESSION_VARS;

if (MODULE_ORDER_TOTAL_INSTALLED) {

reset($this->modules);

while (list(, $value) = each($this->modules)) {

$class = substr($value, 0, strrpos($value, '.'));

if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {

$post_var = 'c_'.$GLOBALS[$class]->code;

if (tep_session_is_registered($post_var)) tep_session_unregister($post_var);

}

}

}

}

// Caledd at various times. This function calulates the total value of the order that the

// credit will be appled aginst. This varies depending on whether the credit class apllies

// to shipping & tax

//

function get_order_total_main($class, $order_total) {

global $credit, $order;

if ($GLOBALS[$class]->include_tax == 'false') $order_total=$order_total-$order->info['tax'];

if ($GLOBALS[$class]->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost'];

return $order_total;

}

// ICW ORDER TOTAL CREDIT CLASS/GV SYSTEM - END ADDITION

}

?>

 

just 1 thing: I have the same error as Redmanmike:
Sub-Total: $58.20

Sub-Total: $58.20

Table Rate (Fixed Rate): $10.00

Table Rate (Fixed Rate): $10.00

Total: $68.20

Total: $68.20

 

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