Jump to content
Sign in to follow this  
frankl

[Contribution] Step-By-Step Manual Order

Recommended Posts

Hi! I am new to this, so please forgive me for this question. Does anyone have or know where I can find detailed instructions for this contribution? It would be greatly appreciated! Thanks! :rolleyes:

Share this post


Link to post
Share on other sites
Hi! I am new to this, so please forgive me for this question. Does anyone have or know where I can find detailed instructions for this contribution? It would be greatly appreciated! Thanks! :rolleyes:

It was in one of the earlier downloads but the contribution is incomplete, as mentioned before it took a long time to actually get it to work. Try downloading an earlier version just to get hold of the manual.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I have installed version 1.8 released 13 Apr 2006, this is very cool.

 

My goal is to add orders to existing customers. our products are downloadable, and this contribution doesn't fill out enough tables. The script create_order_process.php only adds entries to the orders, orders_total and orders_status history tables.

 

This contrib could use an update to complete the code for the rest of the tables that are changed when using orders_process.php during the customers purchase process. I'll write something here if I write it myself.

 

Jaime Schmidt

Share this post


Link to post
Share on other sites

I used some tips above.

 

I set the default currency correctly using : Currency Tip

 

I also changed my default payment method using :Payment Method Tip

 

 

One small language change : /admin/includes/languages/english/create_order.php

changed :

 define('CATEGORY_ORDER_DETAILS','Choix monétaire');

for :

define('CATEGORY_ORDER_DETAILS','Choose currency');

 

Now the big change was in /admin/edit_orders.php to make this work with downloadable products:

 

In point 2.1.1 // 2.1.1 Get Product Attribute Info

 

replace

 

 				foreach($add_product_options as $option_id => $option_value_id)
			{
				$result = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON po.products_options_id=pa.options_id LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON pov.products_options_values_id=pa.options_values_id WHERE products_id='$add_product_products_id' and options_id=$option_id and options_values_id=$option_value_id and po.language_id = '" . (int)$languages_id . "' and pov.language_id = '" . (int)$languages_id . "'");
				$row = tep_db_fetch_array($result);
				extract($row, EXTR_PREFIX_ALL, "opt");
				$AddedOptionsPrice += $opt_options_values_price;
				$option_value_details[$option_id][$option_value_id] = array ("options_values_price" => $opt_options_values_price);
				$option_names[$option_id] = $opt_products_options_name;
				$option_values_names[$option_value_id] = $opt_products_options_values_name;
			}

 

for

 

foreach($add_product_options as $option_id => $option_value_id)
			{
				$result = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . 
				" pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . 
				" po ON po.products_options_id=pa.options_id LEFT JOIN " .
				TABLE_PRODUCTS_OPTIONS_VALUES . 
				" pov ON pov.products_options_values_id=pa.options_values_id LEFT JOIN " .
				TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD .
				" pad ON pad.products_attributes_id=pa.products_attributes_id WHERE products_id='$add_product_products_id' and options_id=$option_id and options_values_id=$option_value_id and po.language_id = '" . (int)$languages_id . "' and pov.language_id = '" . (int)$languages_id . "'");
				$row = tep_db_fetch_array($result);
				extract($row, EXTR_PREFIX_ALL, "opt");
				$AddedOptionsPrice += $opt_options_values_price;
				$option_value_details[$option_id][$option_value_id] = array ("options_values_price" => $opt_options_values_price, "products_attributes_filename" => $opt_products_attributes_filename, "products_attributes_maxdays" => $opt_products_attributes_maxdays, "products_attributes_maxcount" => $opt_products_attributes_maxcount);
				$option_names[$option_id] = $opt_products_options_name;
				$option_values_names[$option_value_id] = $opt_products_options_values_name;
			}

 

in // 2.2.1 Update inventory Quantity

 

replace

 

if (IsSet($add_product_options)) {
			foreach($add_product_options as $option_id => $option_value_id) {
				$Query = "insert into " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set
					orders_id = $oID,
					orders_products_id = $new_product_id,
					products_options = '" . $option_names[$option_id] . "',
					products_options_values = '" . tep_db_input($option_values_names[$option_value_id]) . "',
					options_values_price = '" . $option_value_details[$option_id][$option_value_id]["options_values_price"] . "',
					price_prefix = '+';";
				tep_db_query($Query);
			}
		}

 

with

if (IsSet($add_product_options)) {
			foreach($add_product_options as $option_id => $option_value_id) {
				$Query = "insert into " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set
					orders_id = $oID,
					orders_products_id = $new_product_id,
					products_options = '" . $option_names[$option_id] . "',
					products_options_values = '" . tep_db_input($option_values_names[$option_value_id]) . "',
					options_values_price = '" . $option_value_details[$option_id][$option_value_id]["options_values_price"] . "',
					price_prefix = '+';";
					$newarray = $option_value_details[$options_id][$options_value_id];
				tep_db_query($Query);
				if (isset($option_value_details[$option_id][$option_value_id]['products_attributes_filename']) && tep_not_null($option_value_details[$option_id][$option_value_id]['products_attributes_filename'])) {
					$Query = "insert into ". TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set 
					orders_id = $oID, 
					orders_products_id = $new_product_id,
									  orders_products_filename = '" . $option_value_details[$option_id][$option_value_id]['products_attributes_filename'] . "',
									  download_maxdays = '". $option_value_details[$option_id][$option_value_id]['products_attributes_maxdays'] ."', 
									  download_count = '". $option_value_details[$option_id][$option_value_id]['products_attributes_maxcount'] ."'";
					tep_db_query($Query);
				}
			}
		}

 

I hope this helps someone, There needs to be more for the edit functionality to work.

 

Jaime Schmidt

Share this post


Link to post
Share on other sites

I should document the above :

 

The change is to the file edit_orders.php

 

1. In // 2.1.1 Get Product Attribute Info

 

I added to the select to get the download data from the products_attributes_download table, and added them into the array $option_value_details ( at position [$option_id][$option_value_id])

 

2. in // 2.2.1 Update inventory Quantity

 

I added a whole new insert query to add a line to the orders_products_download table using the values gotten above.

 

Jaime Schmidt

Share this post


Link to post
Share on other sites

Hello:

I would like to know if it is posible to show in the admin/orders.php the person who create a new order with the order editor (the name of the diferent persons that have the permissions to create a new order with the order editor).

Maybe you know somebody who has work on it or a contribution.

On the other hand in my store we have the person who make the new order and the person who take the order and process it until it is done. These two persons may not be the same. They have permissions to place an order with the order editor and edit the orders. I would like to know how can I also select the person who process the order.

Thankyou in advance.

Gregorio

Share this post


Link to post
Share on other sites

Hello:

I have a question. When I create a new customer with the manual order maker, it does not create a customer ID. And the new customer does not appear in the database neither in the customer.php. How can I fix it?

Thankyou in advance

Share this post


Link to post
Share on other sites

After creating a customer, I thought it would make more sense that the link that says 'Congratulations! The new account has been successfully created! You can now take a manual order' (just the "manual order" part is the link" would take you to the new customer you created.

 

But on the "manual order" page, you then have to find your new customer in the drop down box.

 

If you're lazy, like me, here's how to make your newly created customer show up in that "manual order" link...

 

2 EZ-PZ changes:

 

1: admin/includes/languages/english/create_account_success.php ~line 16

change from:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php . '"> manual order</a>. <p><p>

 

to:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php?Customer=".intval($_GET["Customer"]) . '"> manual order</a>. <p><p>

 

2: admin/create_account_process.php ~line 429

change from:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

to:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS."?Customer=$address_id", '', 'SSL'));

 

Now you can enjoy a Pepsi with me now that there's a couple less mouse clicks! :D :D

Share this post


Link to post
Share on other sites

Hopefully somebody knows... However I didn't see anybody having this problem here.

 

I have 1.8 version installed.

 

As I go to create new orders and want to add products - nothing happens! I click "Add products" and go to a page where I am supposed to select them. I see one line:

Step 1 [drop down menu] << Select a catalogue

 

All right, I don't use categories. Right now there is only one product in "Top" category (this is the only option in Step 1 drop menu). But when I try to select it, nothing happens.

 

As I click "back" button I get 404 error - admin/FILENAME_ORDERS_EDIT - where is this file defined and how come it is not showing?

Share this post


Link to post
Share on other sites

Ok. Figured it out. This contribution does not work if you don't use categories. I had to go to catalog admin, create a category and then recreate my product within this category. Wend back and removed the old one. Now both issues are taken care of.

Share this post


Link to post
Share on other sites
After creating a customer, I thought it would make more sense that the link that says 'Congratulations! The new account has been successfully created! You can now take a manual order' (just the "manual order" part is the link" would take you to the new customer you created.

 

But on the "manual order" page, you then have to find your new customer in the drop down box.

 

If you're lazy, like me, here's how to make your newly created customer show up in that "manual order" link...

 

2 EZ-PZ changes:

 

1: admin/includes/languages/english/create_account_success.php ~line 16

change from:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php . '"> manual order</a>. <p><p>

 

to:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php?Customer=".intval($_GET["Customer"]) . '"> manual order</a>. <p><p>

 

2: admin/create_account_process.php ~line 429

change from:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

to:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS."?Customer=$address_id", '', 'SSL'));

 

Now you can enjoy a Pepsi with me now that there's a couple less mouse clicks! :D :D

 

Nice, thanks for that :)

Share this post


Link to post
Share on other sites
After creating a customer, I thought it would make more sense that the link that says 'Congratulations! The new account has been successfully created! You can now take a manual order' (just the "manual order" part is the link" would take you to the new customer you created.

 

But on the "manual order" page, you then have to find your new customer in the drop down box.

 

If you're lazy, like me, here's how to make your newly created customer show up in that "manual order" link...

 

2 EZ-PZ changes:

 

1: admin/includes/languages/english/create_account_success.php ~line 16

change from:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php . '"> manual order</a>. <p><p>

 

to:

define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php?Customer=".intval($_GET["Customer"]) . '"> manual order</a>. <p><p>

 

2: admin/create_account_process.php ~line 429

change from:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

to:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS."?Customer=$address_id", '', 'SSL'));

 

Now you can enjoy a Pepsi with me now that there's a couple less mouse clicks! :D :D

 

 

 

I couldn't get this to work as is, it took me to the wrong customer after creating the account. I had to change the last line of your code to

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS."?Customer=$customer_id", '', 'SSL'));

for it to work

 

Thanks for the tip though :)

 

Dave

Edited by stubbsy

Share this post


Link to post
Share on other sites
Available immediately. Download location in next message.

 

WHAT DOES IT DO?

 

 

2. Create new orders

A 2 step process to create an order, add products, and add shipping costs.

 

I have added Jonathan Hilgeman's 'Edit Order' module and my own to create this useful little tool. Very basic, no bells and whistles but others are sure to add more functionality.

Could someone expand on the create new orders. I am looking for a bulk method to ad customers and orders in one fell swoop.

 

Thank

John

Share this post


Link to post
Share on other sites

Hi :)

 

Can someone help me?

 

I want to change the orders adress format when I enter an order manually.

 

Actually I have :

 

name surname

street

city, postal code

 

and I want :

 

name surname

street

postal code city

 

 

 

Thanks ;)

Share this post


Link to post
Share on other sites

I have this mod installed and somewhat working...The problems I have are:

 

New customer creation:

 

no email with password sent

new customer does not show on customers page in admin

 

Any help would be appreciated :)

 

TIA Thomas0012

Share this post


Link to post
Share on other sites

Hi, very interested in this contribution, I had it installed last year but had to rebuild the site since then.

 

This time, I have downloaded v1.8. The install.txt file mentions "changes_to_original_files.txt; but does not contain that file. v1.7 does not contain it.

 

Searching the forums (e.g. at Google: site:forums.oscommerce.com changes_to_original_files.txt) shows only someone else who looked but never found the file.

 

Does anyone know where it is?

 

Regards to all.

John

Share this post


Link to post
Share on other sites

Can someone please explain to me how to install this mod. I read the install notes but they don't make sense to me. I'm not quite a newbie, but I'm definately no expert. Any help would be most appreciated. Thanks!

 

Available immediately. Download location in next message.

 

WHAT DOES IT DO?

 

1. Add new customers

You can add a customer through admin, just fill in the form and hit confirm.

A new customer account will be created with a random password, and a welcome email with the password will be sent to the given email address.

 

2. Create new orders

A 2 step process to create an order, add products, and add shipping costs.

 

I have added Jonathan Hilgeman's 'Edit Order' module and my own to create this useful little tool. Very basic, no bells and whistles but others are sure to add more functionality.

 

When installing, please pay attention to the modifications you need to make to the files depending on which version of osC you are using. And don't forget, before installing, BACKUP!

 

If you use this module, it is mandatory to donate to the Core Team. These guys have worked so hard for so long we owe them more than we can ever pay them so give them something, whatever you can afford. Donation info is here.

Share this post


Link to post
Share on other sites

When I click on edit customer information I get this message:

 

1054 - Unknown column 'c.member_flag' in 'field list'

 

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.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '356'

 

If I remove this from the code I can access the edit customer info screen but when I click update it returns another error message.

Share this post


Link to post
Share on other sites
When I click on edit customer information I get this message:

 

1054 - Unknown column 'c.member_flag' in 'field list'

 

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.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '356'

 

If I remove this from the code I can access the edit customer info screen but when I click update it returns another error message.

 

 

I just did the same contrib and now I'm getting the same error under Admin->Customers->customers.

 

 

Can someone please post up some help?

 

Thanks,

rich

Share this post


Link to post
Share on other sites
sorry guys looks like someone posted this a few pages back

 

http://forums.oscommerce.com/index.php?sho...1877&st=420

 

Thanks Talle!!!!

 

 

 

It seems like you have to modify your database customers table and add the field member_flag. I went into the database, added the field member_flag and copied the same settings as the newsletter field and it looks liked it worked. I have not received any errors as of yet.

 

 

ray

Share this post


Link to post
Share on other sites
It seems like you have to modify your database customers table and add the field member_flag. I went into the database, added the field member_flag and copied the same settings as the newsletter field and it looks liked it worked. I have not received any errors as of yet.

ray

 

 

can you please elaborate? I did the other way... in that I just removed all referenced to 'member_flag'. but if there is a way to actually make it work rather than just ignoring it, I'd like to know how? I'm very limited in PHPmyadmin stuff. But I can figure out how to copy and paste commands if you can post them.

 

Your help is much appreciated!!!

 

Thanks,

rich

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  

×