Jump to content
Sign in to follow this  
penfold_99

[Contribution] Purchase Order V2.3

Recommended Posts

Hi Guys,

 

I've installed this contribution and when i go into the admin section for customers, i can edit the customers account, but i get this appearing at the top of the screen:

 

Warning: reset() [function.reset]: Passed variable is not an array or object in C:\wamp\www\oscommerce-2.2ms2-051113\catalog\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in C:\wamp\www\oscommerce-2.2ms2-051113\catalog\admin\includes\classes\object_info.php on line 18

 

Any ideas as to what is causing this problem?

 

I've had a nose through this contribution forum, but not come across anything.

 

Help please!!

 

 

Hehe - got it working guys - missed some vital lines :)

 

One question if i may?

If i disable the credit account status for a customer (for instance if they have gone overdue on their account) when they go to purchase another item they get the following message:

 

Credit Account Error!

 

You do not have a purchase order credit account with us. Please contact us at 1-800-743-4302 if you wish to open a purchase order credit account.

 

 

I know i can change the text issued here, but where is it located? - i need to change it to something along the lines of "Please contact us on *********** to update your account" - where the ******* is our telephone number or email address (we're in the UK so the 1-800 ****** number is not relevant)

 

Much appreciated - brilliant contribution - thanks to all those who have worked had on it.

 

Me being a beginner can't work out where the text is located!

 

Cheers in advance :)

Share this post


Link to post
Share on other sites

Hi,

 

Just a little question about this contrib.

 

Im looking for a system to allow customers/businesses to buy their products on Account and pay later.

 

But what I want to know is do I need to get paid and then manually enter the payment into the website, or does the website allow them to pay the balance online and change the amount automatically?

 

thanks in advance

Share this post


Link to post
Share on other sites

Hi Penfold_99!

 

There is a new contribution out, "Commercial Package" made by OldManRiver, that allow for single company/corp account and multiple users by branch/office.

 

I really like the idea, and would like to have it working with Purchase Order Account 2.3 and Purchase Order Account Application...

 

Do you think it could be hard to adapt?

 

Thanks in advance!

 

Plascual

Share this post


Link to post
Share on other sites

Hi

 

I have just installed this but a little lost on some of the features.

 

Where a customer buys on Account, how can I view outstanding payments (as in I have shipped the goods but customer not yet paid), or is it a case of filing the purchase and ticking it off when it comes in? For tax purposes, ideally it would be a case that no money is recieved at time of purchase, and when I receive the money I can assign it to the specific order the customer made.

 

Secondly, if a customer has not got an account, is there any way of not offering this as a payment option. Thought I had read somewhere this was possible but cannot find where I found it?

 

Thanks

 

W

Share this post


Link to post
Share on other sites

Oh, double post :o

 

Hi

 

I have just installed this but a little lost on some of the features.

 

Where a customer buys on Account, how can I view outstanding payments (as in I have shipped the goods but customer not yet paid), or is it a case of filing the purchase and ticking it off when it comes in? For tax purposes, ideally it would be a case that no money is recieved at time of purchase, and when I receive the money I can assign it to the specific order the customer made.

 

Secondly, if a customer has not got an account, is there any way of not offering this as a payment option. Thought I had read somewhere this was possible but cannot find where I found it?

 

Thanks

 

W

Edited by Wired PSF

Share this post


Link to post
Share on other sites

Ok, figured out the hide of Purchase Order in payment method, refer to post #34.

 

So. just need to understand the reporting / outstanding monies owed feature.

 

Thanks

 

W

 

Hi

 

I have just installed this but a little lost on some of the features.

 

Where a customer buys on Account, how can I view outstanding payments (as in I have shipped the goods but customer not yet paid), or is it a case of filing the purchase and ticking it off when it comes in? For tax purposes, ideally it would be a case that no money is recieved at time of purchase, and when I receive the money I can assign it to the specific order the customer made.

 

Secondly, if a customer has not got an account, is there any way of not offering this as a payment option. Thought I had read somewhere this was possible but cannot find where I found it?

 

Thanks

 

W

Share this post


Link to post
Share on other sites

Had a thought to this.

 

Within the order, I could add new Status' such as

 

Account Customer - Unpaid & Shipped

Account Customer - Paid & Shipped

 

(or something like that).

 

Then, within the orders screen I can select say the first one to see who has outstanding debt (and who i need to chase :) ). I added a report to show Monthly Sales and Tax, i can again drill down to the existing Shipped to see what normal customers have paid, and Acc Cst - Unpaid & Shipped to see what money has not yet been collected.

 

Two things

 

1. Does this make sense to do?

2. How do I add in additional Status? (Edit - Ignore this one, did it in Localization / Order Status)

 

Thanks

 

W

 

Ok, figured out the hide of Purchase Order in payment method, refer to post #34.

 

So. just need to understand the reporting / outstanding monies owed feature.

 

Thanks

 

W

Edited by Wired PSF

Share this post


Link to post
Share on other sites

This is a great contribution

 

I hope someone can help me

 

I have set up the files and everything works except when testing it, if the customer has credit is lower then the purchase amount, and if you select purchase order account at the checkout_payment and click continue then it somehow redirect to the login page.

 

Could someone please help me with that

 

Thanks in advance

Share this post


Link to post
Share on other sites

Customer Admin defaults to disable under Allow Purchase Orders Payments: and Credit Account Status:

 

Tried this fix with no luck

 

I figured out what was wrong with mine, Hopefully it will work for you.

 

Open up the file:

 

admin\customers.php

 

search for:

 

tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action'))));

break;

default:

 

$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");

 

Add // to the front of the $customer_query line above

 

Should look like this:

 

//$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");

 

Only do this for the line underneath " default:

 

Refresh your admin screen and you will now see 0.00 in both the screen for Credit Limit and Available balance.

 

One other thing i just figured out, to reduce the amount of the credit limit (Once it is set) all you need to do is put in a negative amout into the Increase Credit Limit: -1000.00

Good Luck, hope I saved someone a little time :)

 

Customer Admin defaults to disable under Allow Purchase Orders Payments: and Credit Account Status:

 

Any Help Here would be great. I tried the code above with no luck , when i added the // it just produced a list list of errors in the admin page. Starting with clearing all customer information. so tried to refill a test customer out with no luck every time you edit that customer it clears all info. I guess this is because the // voids the customer query.

 

So i still can't get it to work, the disable / enable field under customer admin defaults to disable.

 

Thanks in advance

Share this post


Link to post
Share on other sites

I have installed Purchase Orders on my system but something is not right. When I go to my Customers page in Admin I get the following:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in d:\mypath\admin\customers.php on line 812

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in d:\mypath\Shop\admin\customers.php on line 814

 

Warning: reset() [function.reset]: Passed variable is not an array or object in d:\mypath\Shop\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in d:\mypath\Shop\admin\includes\classes\object_info.php on line 18

 

 

I have reloaded everything twice but am still getting the same messages.

 

I can supress the messages by turning error reporting off but I would prefer no errors or warnings.

Share this post


Link to post
Share on other sites
I have installed Purchase Orders on my system but something is not right. When I go to my Customers page in Admin I get the following:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in d:\mypath\admin\customers.php on line 812

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in d:\mypath\Shop\admin\customers.php on line 814

 

Warning: reset() [function.reset]: Passed variable is not an array or object in d:\mypath\Shop\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in d:\mypath\Shop\admin\includes\classes\object_info.php on line 18

I have reloaded everything twice but am still getting the same messages.

 

I can supress the messages by turning error reporting off but I would prefer no errors or warnings.

 

 

OK must have missed something. Re-installed 'Everything' from the gound up and my messages have gone.

Share this post


Link to post
Share on other sites

Here's a bug I noticed in 2.3.3. In a couple places, the direct English string is referenced:

 

./checkout_process.php:56: if ($order->info['payment_method'] == 'Purchase Order Account') {

./account_history_info.php:187: if($order->info['payment_method'] == 'Purchase Order Account')

 

Shouldn't these refer to MODULE_PAYMENT_PO_TEXT_TITLE in case someone refines the string in another language?

 

Mark

Share this post


Link to post
Share on other sites

Here's the patch that should fix it:

 

Thu Jul 20 14:02:40 EDT 2006 Mark Stosberg <mark@summersault.com>

* bug fix to purchase order extension. Use constant instead of default string

diff -rN -u old-store/account_history_info.php new-store/account_history_info.php

--- old-store/account_history_info.php 2006-07-20 14:03:38.000000000 -0400

+++ new-store/account_history_info.php 2006-07-20 14:03:39.000000000 -0400

@@ -184,7 +184,7 @@

</tr>

<?php

// Company PO Account start

- if($order->info['payment_method'] == 'Purchase Order Account')

+ if($order->info['payment_method'] == MODULE_PAYMENT_PO_TEXT_TITLE )

{

?>

<tr>

diff -rN -u old-store/checkout_process.php new-store/checkout_process.php

--- old-store/checkout_process.php 2006-07-20 14:03:38.000000000 -0400

+++ new-store/checkout_process.php 2006-07-20 14:03:39.000000000 -0400

@@ -53,7 +53,7 @@

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

- if ($order->info['payment_method'] == 'Purchase Order Account') {

+ if ($order->info['payment_method'] == MODULE_PAYMENT_PO_TEXT_TITLE ) {

$check_credit = tep_db_query("select customers_credit_left from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'");

$credit = tep_db_fetch_array($check_credit);

$subamt = $credit['customers_credit_left'] - $order->info['total'];

Share this post


Link to post
Share on other sites

I'm also having the same issue. The module is not doing the math automatically.

 

Anyone has found a solution to this issue?

 

Also, is there a way to put the PO number in the orders page, the invoice and the packing slip?

 

Thanks!

 

 

I was wondering if someone can help me with my problem with Purchase Order v.2.3.3 running under

OSC 2.2 ms 2.

 

I've installed this contrib three times. It installs perfect with nothing wrong. But my problem is that the total of the orders are not being charged to the credit account.

 

for example. when i process an order for $40 by loggin into the client's account with a $500 credit limit, the $40 is not changing the balance.

 

is there something I'm doing wrong. Well evidently, since it's not working.

 

i've already installed it, and enabled it through the customer's account.

 

If someone could please help me out.

 

thank you.

Share this post


Link to post
Share on other sites

I guess editing all the files would help, wouldn't it? :D

 

I skipped checkout_process.php completely. The math issue is fixed. That also fixed the PO number in the invoice/orders page. I guess I'll use the code from the invoice to add the PO number to the packing slip.

 

Excellent contribution! :thumbsup: :thumbsup:

 

I'm also having the same issue. The module is not doing the math automatically.

 

Anyone has found a solution to this issue?

 

Also, is there a way to put the PO number in the orders page, the invoice and the packing slip?

 

Thanks!

Share this post


Link to post
Share on other sites

I've had this installed for a while now, and just discovered a problem. For me, it doesn't work when I have taxes enabled. The purchase order number doesn't go through, and I get this error: Credit Account Error! Please enter your purchase order number.

 

I also have chemo's MS3 Tax Class contribution installed to improve performance. I have a sneaking suspicion that the problem stems from some sort of conflict between the two.

 

Has anyone else had this problem and fixed it? I've been poking through the code, but I'm not seeing where the problem's coming from yet.


Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Share this post


Link to post
Share on other sites

And. Now it's started working again. Now that I commented out all the if-else statements in po.php because our system handles that differently, anyway.

 

But now, when the po number is stored in the session, it doesn't disappear, and you can't override it. For example, I make an order, and enter 123 as the order number. I then go and make another order. I try to enter 456. It goes through okay, I think. Until I get to checkout_confirmation.php, and the po number is displayed as 123. It can't change until that session is deleted.


Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Share this post


Link to post
Share on other sites

I apologize, it looks like the problem was that I had forgotten something I needed to do to integrate it with another contribution. I have (well, bits and pieces of) fast easy checkout installed, and it requires that you unregister the individual payment variables at the top of checkout_confirmation. I had done so for various other payment modules, but apparently not for po_number. It's fixed now, as far as I can tell.


Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Share this post


Link to post
Share on other sites

Hello,

 

I followed instructions and everything is working, except that once the order is made using PO only user can see PO number.

 

I don't have it recorded on order, or in the confirmation email.

 

Any ideas?

Share this post


Link to post
Share on other sites
Great contribution!

 

I installed the contribution, but it appears that the purchase order number is not saved into the database for each order. Consequently, the customer cannot view the purchase order number. It temporary saves the purchase order number during checkout; but it's just not written into the db.

 

Does anyone's work properly? Please check your account_history_info.php to verify that it does. Thanks in advance!

 

Noticed you guys let his question slip. I am having the same issue here.... it passes the PO number to the checkout confirmation screen, but does not seem to be writing it to the database. I manually checked my mySQL database and the field is blank....

 

Any ideas? I really need to get this fixed ASAP, otherwise I have uninstall this mod.

 

Thanks in advance!!

 

Brian

Brian@eWebDevelopment.net

Share this post


Link to post
Share on other sites

Another comment to add.... the instructions say to edit:

 

catalog/admin/includes/classes/orders.php

 

 

well the newest version of oscommerce has order.php not orders.php plural.... was this a typo i'm assuming?

Share this post


Link to post
Share on other sites

If anyone can figure this out i'll paypal them $20... a little incentive. :)

 

I need to be able to store that PO number the customer enters, otherwise this mod is no good to me :(

Edited by bbott

Share this post


Link to post
Share on other sites

I figured a fix... in po.php replace all occurences of po_number with purchase_order_number

 

Then in checkout_process.php change the one occurence of po_number to purchase_order_number

 

:)

Share this post


Link to post
Share on other sites
I figured a fix... in po.php replace all occurences of po_number with purchase_order_number

 

Then in checkout_process.php change the one occurence of po_number to purchase_order_number

 

:)

 

Greg, I just installed this contribution. I haven't made the changes above, but my PO # is writing to the database.

 

I am still feeling out this contribution & I am not sure of all the features. Do the changes above make any changes, Other than writting to the database?

 

The orders.php was a typo... but i didn't catch it until you pointed it out ;).


Kristine

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×