Community Add-Ons
| Maintainers: | lildog |
Manual Order Maker
for osCommerce Online Merchant v2.2
Create an order from your admin. Also requires Order Editor.
added Collect Residential / Commercial info for shipping compatibility file
cleaned up code in catalog/admin/create_order.phpin prep to add to admin
opened support forum thread:http://forums.oscommerce.com/index.php?showtopic=312211
Fixed up linebreak problems that were plaguing v1.4.2 by causing parse errors.
The old version was not using UNIX linebreaks, so when PHP ran the file, it thought that everything was on the same line. That caused the errors to occur. This one fixes that up.
If you have v1.4.2 installed and it works fine for you, then you do not need to install this one.
This is the full package.
This fixes a problem where the correct country is not selected, which affects how tax is added to the order.
In admin/includes/modules/create_order_details.php:
FIND:
<?php
if ($is_read_only) {
echo tep_get_country_name($address['entry_country_id']);
} else {
echo tep_draw_input_field('country',
tep_get_country_name($address['entry_country_id'])) . ' ' . ENTRY_COUNTRY_TEXT;
}
?>
CHANGE TO:
<?php
if ($is_read_only) {
echo tep_get_country_name($address['entry_country_id']);
} else {
echo sbs_get_country_list('country') . ' ' . ENTRY_COUNTRY_TEXT;
}
?>
In admin/create_order_process.php:
FIND:
$country =
tep_db_prepare_input($HTTP_POST_VARS['country']);
CHANGE TO:
$country = tep_db_prepare_input(
tep_get_country_name($HTTP_POST_VARS['country']));
- Full package.
- Updated installation instructions
- Optional step from bxmas13 added
This is a very great contribution. I found it was very helpful to have a 'Create Order' button on the customers page. In addition to this I created a 'Customer=number' variable to the button so it would immediately pull up that customers info in the Create Order page.
***NOTE: AS ALWAYS MAKE A BACKUP OF ALL MODIFIED FILES***
Pages Edited:
/catalog/admin/customers.php
-/catalog/admin/customers.php-
Around line 788 FIND:
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
REPLACE with:
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a> <a href="' . tep_href_link(FILENAME_CREATE_ORDER) . '?Customer='. $cInfo->customers_id .'">' . tep_image_button('button_create_order.gif', IMAGE_CREATE_ORDER) . '</a>');
Full package.
Updated installation instructions.
A "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING" error occurs if you use the code in step 6 of the installation instructions as written. This set of instructions corrects that code and adds a step that will enable a the proper button text on a mouse over the Create button.
These are ONLY the corrected install instructions, the rest of the package is required.
The files are formatted in a way that some FTP managers may ram the file into one line string causing unexpected T_REQUIRE errors on line 1. Uploading in binary will solve this problem.
Corrected an error that made this unuseable.
changed
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CREATE_ORDER) . '">' . tep_image_button('button_create_order.gif', IMAGE_CREATE_ORDER','Create Order) . '</a>');
TO:
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CREATE_ORDER) . '">' . tep_image_button('button_create_order.gif', IMAGE_CREATE_ORDER) . '</a>');
Minor update. This disables the field requirements and removes 'required' next to fields. This way no information is required to make an order. This is most useful for generic orders that are picked up or manually delivered. this is the full package.
corrected a few errors in installation instructions. Errors were in the new upload file paths, removed one file, corrected path on two or three othe
Create an order from your admin. Also requires Order Editor.
