freakystreak Posted July 4, 2019 Share Posted July 4, 2019 I've been trying to install this add-on, 'Create Account and Manual Order Maker (https://apps.oscommerce.com/xoCh3&create-account-manual-order-maker-for) and of course it's written for a version that is 3 years out of date. I have used this add-on before on an older website and it works great. I have to get some solution working for a new website so I have been trying to get this add-on installed. There are only a few core code changes I need to do and I can find all of them apart from these two sections. In admin/orders.php I need to find this code: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_details.gif', IMAGE_DETAILS) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased)); and replace with this section of code: // BOF Order Maker $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_ORDERS_INVOICE,'document',tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true)) .tep_draw_button(IMAGE_ORDERS_PACKINGSLIP,'document', tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true))); $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT,'document',tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $oInfo->orders_id)) . tep_draw_button(IMAGE_CREATE_ORDER,'document',tep_href_link(FILENAME_CREATE_ORDER))); // EOF Order Maker $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased)) and finally, this small line (same page): $contents[] = array('text' => '<br>' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method); with this: // ### BEGIN ORDER MAKER ### $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER_SERVICE_ID . ' ' . $oInfo->customer_service_id); // ### END ORDER MAKER ### Anyone have a clue on how I can integrate these bits of code so I can try and get this essential add-on working? Quote Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
241 Posted July 4, 2019 Share Posted July 4, 2019 (edited) look at the end of the file in the section default I have a very heavily modified site but you should look for something starting like this $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_ORDERS_DETAIL, 'document', tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit')) . Edited July 4, 2019 by 241 added some code for clarity Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
freakystreak Posted July 4, 2019 Author Share Posted July 4, 2019 Thank you, much appreciated. Hope fully now I can get this working. Quote Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
241 Posted July 4, 2019 Share Posted July 4, 2019 @freakystreak I added a bit of code to above post which may help Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
freakystreak Posted July 4, 2019 Author Share Posted July 4, 2019 Thanks mate 😀 Quote Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
241 Posted July 4, 2019 Share Posted July 4, 2019 (edited) I also found I needed to modify the last part to if (empty($oInfo->customer_service_id)){ $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER_SERVICE_ID . ' No ID.'); }else{ $contents[] = array('text' => '<br>' . TEXT_INFO_CUSTOMER_SERVICE_ID . ' ' . $oInfo->customer_service_id); } though that may be because of the heavy modifications Edited July 4, 2019 by 241 Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
freakystreak Posted July 5, 2019 Author Share Posted July 5, 2019 @241 Brilliant, thanks mate. Working fine. Many thanks for your help. Quote Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.