January 16, 2009 by Ivan
Simple Create Order module – Zen cart
Ads by Google
I have created a simple module in zen-cart. This module called Simple Create Order v1.0. I created this module because i can’t find any module for create order from the admin back end.
After did some search on google and looking in Zen-Cart forum. I found that there are 2 modules related to mine: those are super order 2.0 and edit order v1.5.3.
I thought i can use super order 2.0, but i did found that the developer of this module discontinued the project and there are many bugs and many complicated patch in the forum, after that i decided to not use that module.
And then i come up for the second choice that is edit order v1.5.3, i think this module is the one i looking for, but this module only edit existing order made by the customer, not create a new one.
And then i have an idea, how about if i create my own module by recode the edit order module? After a several hours i did have my own module that is “Simple Create Order v1.0″.
My idea is really simple, i did join 2 modules (edit order v1.5.3 and add customer v1.02) with a little modifications and create my own create order module. You can download it here.
HOW TO INSTALL:
===============
1. Download the zip file.
Download
Downloaded 644 times
2. Upload files to your store directory; the directory structure design for zen cart 1.3.8a, if you still have standard installation you can just upload files in modifications folder, if not please refer to instruction manual include in zip file.
HOW TO USE:
===============
For create an order: In ADMIN->CUSTOMERS->Create Order
For create an customer: In ADMIN->CUSTOMERS->Add customer
For edit an Order: In ADMIN->CUSTOMERS->ORDERS->EDIT make necessary changes to customer’s order (i.e. to delete a product, change quantity to 0) and then click UPDATE.
PATCH:
===============
5 Agustus 2010: Fixed Cannot Delete Order… Finally
18 Sep 2009: Update add customer from admin module to v1.06
11 May 2009: Add resent invoice as request by Melissa.
29 April 2009: Fixed for anyone using prefix database table name. (Thanks to Brandy)
SCREENSHOT (click to enlarge):
=======================
Found any bugs or a suggestion please post here. Enjoy…
If you find my coding tips, plugins, or tutorials then buy me a cup of coffee or leave a comment.



Hi, Thanks for your plugin.
I’m using that, but a small problem when sent the email to customer, the invoice link is shop/admin/account_history_info.php?order_id=1007 and I found there was no account_history_info.php file in your plugin…
Don’t konw what happened, ask for help, thanks
Thanks for taking the time to write the mod. I did notice that it ignors the disocunt of a product so you have to make sure that you catch the differance. Most of our products are discounted because we show the list price then "slash" it (using discount).
@Ty
Yes i did notice that. But it is from edit order module. But i will fix it in the next release.
Thanks for the notice.
Hello and thanks for this module!
I dont see shipping price changing when adding or removing products. Maybe missing is also option to change shipping method?
Hi Ivan – thank you so much for this – we receive a lot of phone orders – so just what we are after
We already have 'add customers' and 'edit orders' – so the addition of 'create orders' will be wonderful!
Just wondering – with Step 2, the 3rd set of code seems the same? (but I might be having a blond day)
Find:
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDER_EDIT, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete', 'NONSSL') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
Replace With:
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDER_EDIT, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete', 'NONSSL') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
My apologies if I've missed something….
Many thanks
Sams
Hello Ivan, just installed your add-on, thanks, but I have this problem.
With the orders.php modified as per instruction, I have no "delete order" button.
If I put back the original orders.php file, your addon will work on adding customers, and creating new orders, but not on editing orders.
Looking for an answer, regards.
@Sams and Primus
Please use a file compare software, and compare original admin/orders.php and my modification/orders.php
i forgot to update the instruction file.
I'm so sorry.
I will update it soon.
Thanks Ivan!
I can see the correct info by doing the file comparing as you suggested.
One more question – the admin/edit_orders file – I have the 'Edit Orders' module installed – and when I compared (your) file with the orig file, there are dozens of differences – If I install your 'all in one' program, can I safely use your edit_orders file and overwrite the old one?
Many thanks
Sams
I only add auto calculation shipping module and resend invoice.
You can use my edit_orders file, but make sure you backup your old one first.
Cheers.
Ivan, I am new to zen cart but would like to use your plugin. I will be uploading to the modifications folder. But, What is the full path to the modifications folder? \\store_name\?
@cwill78295: it mean full path to your zencart installation folder
Ivan, I have installed your add on to my existing running store but I am getting the following error when I try to create a new order. Can you advise where I have gone wrong
Thanks in advance.
Sorry Ivan, didn't add the error
1109 Unknown table 'customers' in where clause
in:
[SELECT `customers_firstname` , `customers_lastname` , `customers_email_address` , `customers_telephone`, `entry_company` , `entry_street_address` , `entry_suburb` , `entry_postcode` , `entry_city` , `entry_state` , `entry_country_id` , `entry_zone_id` FROM zen_customers JOIN zen_address_book ON ( `customers_default_address_id` = `address_book_id` ) WHERE `customers`.`customers_id` = 240]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Hi Chris,
Please download the one from this site.
Thanks.
Thanks Ivan!
This tool is very powerful!
I lost a order in my zen cart orders, it's very usefully!
Hi Ivan,
Great add-on!! everything seems to be working except I can't seem to delete any orders?
What does this code do?
case 'deleteconfirm':
// demo active test
if (zen_admin_demo()) {
$_GET['action']= '';
$messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
zen_redirect(zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')), 'NONSSL'));
}
$oID = zen_db_prepare_input($_GET['oID']);
zen_remove_order($oID, $_POST['restock']);
zen_redirect(zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')), 'NONSSL'));
break;
why the reference to zen_admin_demo()???
Thanks in advance for all your hard work and effort!!!
Lyle
Hi Lyle,
Please update your orders.php.
You can download from my blog, i fixed it.
Hello. I am unable to delete orders after installing this mod. I went through the instructions and I believe I've made all the required changes correctly. I'm using file coparison software to see the differences between the orders.php file, but i confess I am lost as to where the issue lies. Looking at the past threads it looks like there is an update to the order.php file on a blog, but I do not know where it it. I can't seem to find it. I am using 1.3.9c. Can anyone help? Thanks!
Hi Nate,
Please update your orders.php.
You can download from my blog. thanks.
i was just starting to test the system out but for some reason it doesn't like my countries postal code it gives it and error when adding a customer. i'm assuming there are rules set for the add customer form could you pint me in the right direction thank you
Our orders.php has been patched to work with php 5.3. Will using your replacement break our patched file? We have not yet installed the “Simple Create Order” module.
Is this issue fixed now?
Please use file compare and merge your orders.php and my orders.php
I think that case is came from the fedex and usps compatibility with your postal code. what is your postal code?
Use file comparer to compare my files and your orders.php.
And merge them.
Thanks
Hi Magnus, i'm afraid not.
Zencart 2.0 will release soon.
I'm wonder if this feature available on the new zencart or not.
Thanks
Ivan,
We're having trouble with our shopping cart's shipping estimator. As soon as we finished installing this module, the shipping estimator quit working. We donated $5, and would be happy to donate another $5 if you could help us fix it.
Thanks,
Preston Mitchell
Berridge Farms
Hi Preston,
What is your shipping estimator?
i'm using usps and fedex.
Please checek your shipping module configuration from the admin.
Hi Ivan, I am having the issue of not being able to delete orders, which I see that you've addressed by telling people to download the new orders.php file from your blog. firstly, this is your blog, no? I can't find the updated version of this file anywhere. I just downloaded the mod today from this page… so where EXACTLY can I find the new orders.php file?
Thank you!
Did you download the one from this blog?
Yes, I downloaded at the “Download” button linked above. The modifications orders.php file did not resolve my problem of not being able to delete.
Thanks!
I love your post, thank you for sharing.
Hi,
I'm trying out this mod and I have a problem with the tax, it shows the product price net of text, and it shows the tax rate in the tax box but it does not add the tax rate to the total? I dont have any tax mods switched on, only the standard Zen cart tax. Any idea waht I need to do to get it to show the total including tax?
Regards
Breda
Same issue here. I have tried everything but cannot delete orders
HI Breda,
For the tax you need to add it manually and calculate it manually too,
Thanks
i wonder what is wrong with the delete order. because i fixed it long time ago.
But i will find what cause it.
Thanks.
For those who have problem with cannot delete the order.
Please download the latest patch from this post.
Just press download, and overwrite the order.php from modifications > admin > orders.php
or see around line 849 and 851 for the fixes.
Thanks.
Hey there, Was looking for opportunity to post here as it beats phoning! My group is extremely astounded by the actual contribution additional webmasters are making on your site and hope to chip in in addition any time i can. I agree with the particular preceding commentor and anticipate to check back now and again.
Hey there Ivan. We’ve installed the module on our websites – it is a really great module. However, I’ve noticed a big problem for us. When I input the delivery address, it does not appear on the online invoice and the invoice print off which will cause a massive problem with our delivery company. Is there an easy solution?
Thanks so much,
Dan Jones
Hi, I was wondering if you can create a search for product box in the add product page instead of step1 2 etc?
Thanks
Love the mod by the way!