Jump to content
freakystreak

Create Account in Admin 2.3.4.1.Frozen

Recommended Posts

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?


Ah, the world wide web. What a wonderful place.

Share this post


Link to post
Share on other sites

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 by 241
added some code for clarity

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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Share this post


Link to post
Share on other sites

Thank you, much appreciated. Hope fully now I can get this working.


Ah, the world wide web. What a wonderful place.

Share this post


Link to post
Share on other sites

@freakystreak

I added a bit of code to above post which may help


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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Share this post


Link to post
Share on other sites

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 by 241

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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

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

×