Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Step-By-Step Manual Order BETA


frankl

Recommended Posts

This is a beta version of a manual order module. It is intended as a base for others to build on for a future (more elegant) manual order entry system.

 

I wish I had more time to devote to learning PHP so that I could do better, but I'm very busy taking care of business.

 

 

Please, if you can improve this module in any way, please do!

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

Download it here:

 

Step-By-Step Manual Order Entry BETA

 

 

THIS CODE IS BETA!

 

I have just copied, pasted and modified existing code. This code is BETA so may do unexpected things.

 

Please report bugs etc here, but the baton may have to be passed to others who have more time and skill than me!

 

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 3 step process to create an order, add products, and add shipping costs.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

Great mod.

I'm having a prob when entering the order.

When I hit submit the next screen (create_order_process.php)

shows the following

 

1054 - Unknown column 'new_value' in 'field list'

 

insert into orders_status_history (orders_id, new_value, date_added) values ('1717', '1', now())

 

[TEP STOP]

Link to comment
Share on other sites

I'm having a prob when entering the order.

When I hit submit the next screen (create_order_process.php)

shows the following

 

1054 - Unknown column 'new_value' in 'field list'

 

insert into orders_status_history (orders_id, new_value, date_added) values ('1717', '1', now())

 

[TEP STOP]

 

Me too!

 

I am assuming that there is an addition to the database that was not included.

Link to comment
Share on other sites

Great MOdS!!!

 

I LOVE It. have anyone got this to work Please fix up the code.. As i'm a newbie to coding. I will test it out for anyone if anyone got this going please let m ekno wTHANKS!!!!

thanks good job for this. this is getting to be a good mods.. i love it and many thanks to FRANK for his hard work in starting this.. thanks you!!!

 

 

Once I make money I'll donate to that who needs..

 

:)

Link to comment
Share on other sites

Great mod.

I'm having a prob when entering the order.

When I hit submit the next screen (create_order_process.php)

shows the following

 

1054 - Unknown column 'new_value' in 'field list'

 

insert into orders_status_history (orders_id, new_value, date_added) values ('1717', '1', now())

 

[TEP STOP]

This is for the orders status history table in the database. This has been changed for MS1 and MS2. If you are using MS1 or MS2, find the following in catalog/admin/create_order_process.php:

 

$sql_data_array = array('orders_id' => $insert_id,

'new_value' => $new_value,

'date_added' => 'now()');

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

 

delete and replace with:

 

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $new_value,

'date_added' => 'now()');

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

 

 

ALSO:

 

All users need to add this in catalog/admin/application_top.php (in the same section as the other FILENAME defines):

 

define('FILENAME_CREATE_ORDER', 'create_order.php');

 

 

Please try these, test and let us know how it goes.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

Okay, after seeing Jonathan Hilgeman's Order Edit tool, I decided to combine my mod & his mod and the results work great. If you installed the Step-By-Step Manual Order mod before, just upload edit_orders.php to admin folder, edit_orders.php language file to english folder and add

 

define('FILENAME_EDIT_ORDERS', 'edit_orders.php');

 

to application_top.php (or filenames.php)

 

(plus directions for create_order_process.php and application_top.php in the post above)

 

Otherwise follow the instructions in install.txt

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

If you have Worldaccess with your worldpay account you can do it with that, and then just add the details to the manual order. Ask WP it cost about ?50 to set up but if you ask nicely they migh set it up for free ;)

 

I have an idea for this mod which someone might want to add. Basically for manual order entry only add a check box somewhere, so you can ask the customer if they will use the website possibly in future. If they say yes, check the box and it will add the generated password to the invoice/receipt that you can give to the customer. Just an idea :)

Link to comment
Share on other sites

Step 4 of the install calls to,,

Upload these files to catalog/admin/includes/modules/

account_details.php

create_account_details.php

 

I am assuming this is a typo error as there is no create_account_details.php in the package and that the create_order_details.php is the file intended to be listed there?

 

Thanks in advance for info

Tom

Link to comment
Share on other sites

:blink: OK,, installed,, went to create order,, put the info in,, and here is what i came up with

 

error msg

Fatal error: Cannot redeclare tep_validate_email() (previously declared in /home/pencilb/public_html/admin/create_account_process.php:24) in /home/pencilb/public_html/admin/includes/functions/validations.php on line 43

 

any ideals?

Link to comment
Share on other sites

Step 4 of the install calls to,,

Upload these files to catalog/admin/includes/modules/

account_details.php

create_account_details.php

 

I am assuming this is a typo error as there is no create_account_details.php in the package and that the create_order_details.php is the file intended to be listed there?

Yes Tom, sorry about the typo

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

:blink: OK,, installed,, went to create order,, put the info in,, and here is what i came up with

 

error msg

Fatal error: Cannot redeclare tep_validate_email() (previously declared in /home/pencilb/public_html/admin/create_account_process.php:24) in /home/pencilb/public_html/admin/includes/functions/validations.php on line 43

 

any ideals?

I have looked at the MS2 file structure and it includes validations.php in the admin folder (previous versions do not)

 

If using MS2, comment out (i.e. put a /* at the start and a */ at the end) lines starting at No. 24:

 

function tep_validate_email($email) {

$valid_address = true;

 

up to and including lines ending with (and including line 113):

 

return $valid_address;

}

 

This will prevent the mod calling the validate email function twice.

 

Probably the best tool for editing php files is PHPEdit, go to PHPEdit Home Page

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

I have looked at the MS2 file structure and it includes validations.php in the admin folder (previous versions do not)

 

If using MS2, comment out (i.e. put a /* at the start and a */ at the end) lines starting at No. 24:

 

function tep_validate_email($email) {

$valid_address = true;

 

up to and including lines ending with (and including line 113):

 

return $valid_address;

}

 

This will prevent the mod calling the validate email function twice.

 

Probably the best tool for editing php files is PHPEdit, go to PHPEdit Home Page

Frank

Thanks for replying

I did as u said,, which is basicaly comment out the validations.php script in the admin/includes/function folder.. there was nothing else left except some comments and the open close tags,,

here is what happens,,, when i click to add an account,, put the info in,, and click to continue on,, i get this error

1062 - Duplicate entry '1' for key 1

 

insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_zone_id, entry_state) values ('20', '1', 'Tommy', 'Tester', '123 anystreet', '12345', 'Gray', '223', 'm', '', '27', '')

 

[TEP STOP]

 

now,, it does add that customer,, however,, i can not delete that customer out,, or edit that customer.. or touch that customer in anyway,, if i say try to delete the customer,, i get the followin error

 

Warning: reset(): Passed variable is not an array or object in /home/pencilb/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/pencilb/public_html/admin/includes/classes/object_info.php on line 18

 

and yes,, i am on ms2,,,

anyone else?

any ideals,,

thanks again frank

Tom

Link to comment
Share on other sites

If using MS2, comment out (i.e. put a /* at the start and a */ at the end) lines starting at No. 24:

 

function tep_validate_email($email) {

$valid_address = true;

 

up to and including lines ending with (and including line 113):

 

return $valid_address;

}

 

This will prevent the mod calling the validate email function twice.

 

Probably the best tool for editing php files is PHPEdit, go to PHPEdit Home Page

Frank

Thanks for replying

I did as u said,, which is basicaly comment out the validations.php script in the admin/includes/function folder.. when i click to add an account,, put the info in,, and click to continue on,, i get this error

 

1062 - Duplicate entry '1' for key 1

insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_zone_id, entry_state) values ('20', '1', 'Tommy', 'Tester', '123 anystreet', '12345', 'Gray', '223', 'm', '', '27', '')

[TEP STOP]

 

now,, it does add that customer,, however,, i can not delete that customer out,, or edit that customer.. or touch that customer in anyway,, i get the followin error

 

Warning: reset(): Passed variable is not an array or object in /home/pencilb/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/pencilb/public_html/admin/includes/classes/object_info.php on line 18

 

and yes,, i am on ms2,,,

anyone else?

any ideals,,

thanks again frank

Tom

Link to comment
Share on other sites

, i get this error

 

1062 - Duplicate entry '1' for key 1

insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_zone_id, entry_state) values ('20', '1', 'Tommy', 'Tester', '123 anystreet', '12345', 'Gray', '223', 'm', '', '27', '')

[TEP STOP]

 

Tom

Frank

I have found it myself,, i think,,, still testing somethings,,

but this error,,, if fixed by going into create_account_process.php

and finding the line

'address_book_id' => 1,

and changing it to

'address_book_id' => (int)$default_address_id,

 

this seems to have fixed the error i got after commenting out the validation step

hope that this helps someone else as well

Tom

Link to comment
Share on other sites

Frank

Thanks for all the hard work u applied to creating this controbution,,

Its wonderful,, and yes it is working on ms2 with the exception of creating the order,, it does not notify the customer.

 

Now,, if u or anyone can help me to figure out how to create the order,, but leave it in the customers cart for them to do the checkout would be wonderful

Thanks again for this wonderful mod.

Tom

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