Jump to content
lildog

Manual Order Maker

Recommended Posts

Hi all

 

I'm having a problem creating a new order. I can select an existing customer or create a new customer from create_order.php but after clicking the save button the customer details do not populate in edit_orders.php

 

Can anyone help with this please?

 

Regards

Marc

Share this post


Link to post
Share on other sites

Hi all

 

I'm having a problem creating a new order. I can select an existing customer or create a new customer from create_order.php but after clicking the save button the customer details do not populate in edit_orders.php

 

Can anyone help with this please?

 

Regards

Marc

what did you do to solve the last problem of populating the customer dropdown?

What version of oscommerce are you using?

if you are using RC2a, is the problem maybe that it jumps back to the login page?

Share this post


Link to post
Share on other sites

New issue reported that the customer is not tied to the new order. This is the fix.

in admin/includes/modules/create_order_details.php

find:

 	<td class="main"> <?php echo tep_draw_input_field('customers_id', $account['customers_id'], "disabled") . ' ' . ENTRY_CUSTOMERS_ID_TEXT; ?> </td>

 

change to:

 	<td class="main"> <?php echo $account['customers_id']; ?><?php echo tep_draw_hidden_field('customers_id', $account['customers_id'])/* tep_draw_input_field('customers_id', $account['customers_id'], "disabled") */ . ' ' . ENTRY_CUSTOMERS_ID_TEXT; ?> </td>

 

 

 

BTW: btheobald and antars sure could use to learn about the forums, where problems are discussed and solutions proposed before adding something to the download... :P

Share this post


Link to post
Share on other sites

Hello

i use Manual Order Maker to create an order for an existing customer, but the order is not visible in the customer's history?

 

what is problem

 

Regards Peter

Share this post


Link to post
Share on other sites

[...]

i use Manual Order Maker to create an order for an existing customer, but the order is not visible in the customer's history?

[...]

 

Just take a look to the post just above yours :) Solution was there before your question, already waiting for you.

 

@ Todd: Just installed both great tools this one and the order editor (your versions, not the "fixes") and they work great, thank you very much !

Edited by multimixer

Share this post


Link to post
Share on other sites

Hi all,

 

I am having an issue with this contribution. I added it successfully, but for some reason when I go to create an order and select the customer. all the customer information doesn't transfer to the page where you add the products/create the order? or it's "hidden" Can someone lead me in the right direction please?

Also, is there a way that I would have to confirm the order before it processes. The order is created no matter and would prefer a confirm something or other before an email is sent to the customer.

Any help would be appreciated, thanks!

Share this post


Link to post
Share on other sites

Great contribution.

 

One problem is, we have 65,000+ customers.

Loading that first page - reading the database, then pouplulation the form with those 65,000 customers takes a fierce amount of time.

 

What is doubly frustrating is when we click the select button - it does it all over again.

It reads every record from the table, then populates the form with those records, even though it already captured that information inititally.

 

Anyway to get around this?

 

At the bare minimum - how about just reading the database once?

 

Any help on getting over this?

Share this post


Link to post
Share on other sites

I am having an issue with this contribution. I added it successfully, but for some reason when I go to create an order and select the customer. all the customer information doesn't transfer to the page where you add the products/create the order? or it's "hidden" Can someone lead me in the right direction please?

I'm not experiencing this problem on my test system. There is a bug fix in the last few pages here, but it is a slightly different issue.

Also, is there a way that I would have to confirm the order before it processes. The order is created no matter and would prefer a confirm something or other before an email is sent to the customer.

that would be a question for the order editor topic as it is not related to the manual order maker contribution. There is no automatic order confirmation email sent in the order editor. You have to click the "new order email" button for a confirmation email to be sent. yes, the order it edited on the fly, sorry that is how it works.

Share this post


Link to post
Share on other sites

Great contribution.

 

One problem is, we have 65,000+ customers.

Loading that first page - reading the database, then pouplulation the form with those 65,000 customers takes a fierce amount of time.

 

What is doubly frustrating is when we click the select button - it does it all over again.

It reads every record from the table, then populates the form with those records, even though it already captured that information inititally.

 

Anyway to get around this?

 

At the bare minimum - how about just reading the database once?

 

Any help on getting over this?

lookup the customer first in the admin customer list, then click the new order "create" button on the right column. that will only populate the drop down once as the customer will be selected when entering the page.

 

Then you can even avoid the once population by conditioning the select list creation with an "if" like so at the top of the script:

 // #### Get Available Customers
if (empty($_GET['Customer'])) {
$query = tep_db_query("select a.customers_id, a.customers_firstname, a.customers_lastname, b.entry_company, b.entry_city, c.zone_code from " . TABLE_CUSTOMERS . " AS a, " . TABLE_ADDRESS_BOOK . " AS b LEFT JOIN " . TABLE_ZONES . " as c ON (b.entry_zone_id = c.zone_id) WHERE a.customers_default_address_id = b.address_book_id ORDER BY entry_company,customers_lastname");
$result = $query;

$customer_count = tep_db_num_rows($result);
if ($customer_count > 0){
// Query Successful
$SelectCustomerBox = "<select name=\"Customer\" id=\"Customer\"><option value=\"\">" . TEXT_SELECT_CUST . "</option>\n";

while($db_Row = tep_db_fetch_array($result)){ 

	$SelectCustomerBox .= "<option value=\"" . $db_Row['customers_id'] . "\"";

	if(isSet($HTTP_GET_VARS['Customer']) and $db_Row['customers_id']==$HTTP_GET_VARS['Customer']){
	$SelectCustomerBox .= " SELECTED ";
	$SelectCustomerBox .= ">" . (empty($db_Row['entry_company']) ? "": strtoupper($db_Row['entry_company']) . " - " ) . $db_Row['customers_lastname'] . " , " . $db_Row['customers_firstname'] . " - " . $db_Row['entry_city'] . ", " . $db_Row['zone_code'] . "</option>\n";
	}else{
	$SelectCustomerBox .= ">" . (empty($db_Row['entry_company']) ? "": strtoupper($db_Row['entry_company']) . " - " ) . $db_Row['customers_lastname'] . " , " . $db_Row['customers_firstname'] . " - " . $db_Row['entry_city'] . ", " . $db_Row['zone_code'] . "</option>\n";
	}
}

$SelectCustomerBox .= "</select>\n";
}
} 

Edited by surfalot

Share this post


Link to post
Share on other sites

I have been using Order Editor and added the Manual Order Maker today, and am getting the following error when I click on Orders in the Admin/Customers/Orders Menu. I also get this identical error if I go to order maker and click "details" or "back".

 

PLEASE HELP....

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../includes/functions/compatibility.php:18) in /home/.../includes/functions/compatibility.php on line 30

Edited by uwearusa

Share this post


Link to post
Share on other sites

I need to change default order status from pending to another order status I made such as In-Store. I have tried changing the default order status in the admin under Localization and also in the code of create_order_process.php but it still shows pending as the first status in edit_order.php see picture below:

The order is actually set to the new order status after editing the code in create_order_process.php:

'orders_status' => '30', // DEFAULT_ORDERS_STATUS_ID removed / Order status set to In-Store

OrderInNewStatus.jpg

 

But the first status in edit_order.php still shows pending:

needToChangePendingStatusInCreate_Order.jpg

 

also shows pending in orders.php?oID=128&action=edit:

pendingStatusInEditOrder.jpg

 

Any idea as to how I can make it show my new status: In-Store as the first status marked in edit_order.php and orders.php ?

 

Thanks in advance,

 

John

Share this post


Link to post
Share on other sites

I have been using Order Editor and added the Manual Order Maker today, and am getting the following error when I click on Orders in the Admin/Customers/Orders Menu. I also get this identical error if I go to order maker and click "details" or "back".

 

PLEASE HELP....

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../includes/functions/compatibility.php:18) in /home/.../includes/functions/compatibility.php on line 30

the only thing I can think of is maybe you have doubled the inclusion of the compatibility.php script in the includes/application_top.php script. The location of this changed after the RCx releases and often folks will think it's new code, but is actually simply moved.

Share this post


Link to post
Share on other sites

I need to change default order status from pending to another order status I made such as In-Store. I have tried changing the default order status in the admin under Localization and also in the code of create_order_process.php but it still shows pending as the first status in edit_order.php see picture below:

The order is actually set to the new order status after editing the code in create_order_process.php:

'orders_status' => '30', // DEFAULT_ORDERS_STATUS_ID removed / Order status set to In-Store

 

that's definitely a bug.

 

in create_order_process.php, find:

'orders_status_id' => $new_value,

replace with:

'orders_status_id' => DEFAULT_ORDERS_STATUS_ID,

that should put the default in the history correctly.

Share this post


Link to post
Share on other sites

Hi Todd,

 

I've been using manual order maker 1.57 for the past few weeks. Besides the bug fix you just described, what's the easiest way to go from 1.57 to version 1.58 which you just submitted?

 

Thanks,

 

Nick

Share this post


Link to post
Share on other sites

Hi Todd,

 

I've been using manual order maker 1.57 for the past few weeks. Besides the bug fix you just described, what's the easiest way to go from 1.57 to version 1.58 which you just submitted?

 

Thanks,

 

Nick

 

replace the two create_order* scripts in the admin root and the includes/modules folder. Compare couple small changes to the includes/form_check.js.php

Share this post


Link to post
Share on other sites

I just tried 1.58 and noticed that for the file create_order.php on line 16,

if (empty($_GET['Customer'])) {

was omitted from a fix you mentioned to poster: TheGuy on Jan 1st 2010 about slow load times when there are over 65,000+ customers in the database. Was this intentional or you just forgot? I reason I ask is, I tried it on a server with 150,000+ customers and

if (empty($_GET['Customer'])) {

does make a difference (saves about 26 seconds per use).

 

I was wondering if create_order.php can be cached for say 1 hour at a time so that it would only update available customer from the database every hour instead of every time? If so this would allow create_order.php to load slow the first time but very fast thereafter.

 

surfalot, thanks for the order status fix and your reply, it works great now thanks to you.

Edited by tarroz

Share this post


Link to post
Share on other sites

I just tried 1.58 and noticed that for the file create_order.php on line 16,

if (empty($_GET['Customer'])) {

was omitted from a fix you mentioned to poster: TheGuy on Jan 1st 2010 about slow load times when there are over 65,000+ customers in the database. Was this intentional or you just forgot? I reason I ask is, I tried it on a server with 150,000+ customers and

if (empty($_GET['Customer'])) {

does make a difference (saves about 26 seconds per use).

 

I was wondering if create_order.php can be cached for say 1 hour at a time so that it would only update available customer from the database every hour instead of every time? If so this would allow create_order.php to load slow the first time but very fast thereafter.

 

surfalot, thanks for the order status fix and your reply, it works great now thanks to you.

 

I guess it was more of a subconscious omission. Meaning, the thought of including it didn't come to me at the time, but if it did, I probably would have decided not to include it. I'm thinking the issue of that many customers is the exception rather then the rule. Including that code would inconvenience those that are accustomed to the current functionality.

 

I do see something needs to be done but the right solution hadn't come to me that would be appropriate for both situations.

 

how about this solution... when the script opens, we count the customers (quick query). If the customer count is over xxx then the script will avoid populating the dropdown and offer a button to populate and display it if desired. I get the impression that neither of you with a high number of customers would use this dropdown at all.

Share this post


Link to post
Share on other sites

how about this solution... when the script opens, we count the customers (quick query). If the customer count is over xxx then the script will avoid populating the dropdown and offer a button to populate and display it if desired. I get the impression that neither of you with a high number of customers would use this dropdown at all.

 

That is a good idea, populate only if under xxx then give an option to populate if more.

 

The dropdown may still be useful for looking up customers even with high number of customers because the list shows last name first and you can search the list just by typing in the field so it narrows down to the last name of the customer, thus it will speed up order entry for repeat customers.

 

Another solution might be to have a: "or select by customer phone #" field under select by customer ID so that customers can also be identified by their phone numbers.

Share this post


Link to post
Share on other sites

installed this today, but cant find the new order "button". Where is it supposed to be? Can edit and add items to existing orders.

Share this post


Link to post
Share on other sites

Need help.

 

This was wonderfull working until now. When I click "Send an order confirmation Button" gets this error:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php:18) in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php on line 30

 

I dont know what is the problem because there was working perfect until I instaled SPPC or Header Tags.

 

Contribution instaled order:

ORDER EDITOR 5.0.9 > Administration access level acounts > SPPC > HIDE PRODUCTS FOR SPPC > SPECIALS FOR SPPC > SUPPLIER ADMIN AREA > ULTIMATE SEO URLS5 > HEADER TAGS SEO

 

Any suggestion?

Share this post


Link to post
Share on other sites

installed this today, but cant find the new order "button". Where is it supposed to be? Can edit and add items to existing orders.

 

if it was installed correctly, it would be Admin > Customers > New Order. Or when a customer is highlighted in the list, click the Create button on the right column, or when you are looking at the orders list, click the Create button.

Share this post


Link to post
Share on other sites

Need help.

 

This was wonderfull working until now. When I click "Send an order confirmation Button" gets this error:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php:18) in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php on line 30

 

I dont know what is the problem because there was working perfect until I instaled SPPC or Header Tags.

 

Contribution instaled order:

ORDER EDITOR 5.0.9 > Administration access level acounts > SPPC > HIDE PRODUCTS FOR SPPC > SPECIALS FOR SPPC > SUPPLIER ADMIN AREA > ULTIMATE SEO URLS5 > HEADER TAGS SEO

 

Any suggestion?

this contribution doesn't have a send order confirmation, you need the Order Editor topic. Please don't cross post.<_<

Share this post


Link to post
Share on other sites

if it was installed correctly, it would be Admin > Customers > New Order. Or when a customer is highlighted in the list, click the Create button on the right column, or when you are looking at the orders list, click the Create button.

 

I have copied all the files to the catalog folder, and made the changes in the sql. Is there anything i have missed? The Create button isnt there.

Share this post


Link to post
Share on other sites

I have copied all the files to the catalog folder, and made the changes in the sql. Is there anything i have missed? The Create button isnt there.

there must be something you missed. did you double check to make sure the file changes you made were uploaded? The link has to be there if you made the correct changes and uploaded them. /admin/includes/boxes/customers.php is the file with the link

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

×