Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MOECTOE Suite public BETA 1 Support


dreamscape

Recommended Posts

MOECTOE Suite - Manual Order Entry, Customer Tools, and Order Editing Suite

Public BETA 1 released: http://www.oscommerce.com/community/contributions,1911

 

Please see announcement for details:

http://www.oscommerce.com/forums/index.php?act=ST&f=20&t=81273

 

This is the support channel for the MOECTOE Suite, Public BETA 1 release. Bugs, comments, suggestions, etc can be posted here.

Edited by dreamscape

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

great contribution!!! i?ve tested it within a few minutes. works great. much better than older other contribs with manual order entry!

 

maybe you should change your install-instructions.. you have forgot to tell about the "define(FILENAMES_bla', 'filename.php');" in the application_top or filenames.php...

 

keep up your good work!

 

greets from germany

 

Ronald

WAR is not the answer!

Link to comment
Share on other sites

you have forgot to tell about the "define(FILENAMES_bla', 'filename.php');"? in the application_top or filenames.php...

Ah... so I did. :blink: ... I was trying to get the BETA 1 packaged up and skipped over that part.

 

Here it is for others. Add to catalog /admin/includes/filenames.php or catalog /admin/includes/application_top.php if you have no filenames.php:

 ?define('FILENAME_MOECTOE_MANUAL_ENTRY', 'moectoe_manual_entry.php');
?define('FILENAME_MOECTOE_ADD_PRODUCT', 'moectoe_add_product.php');
?define('FILENAME_MOECTOE_EDIT_ORDER', 'moectoe_edit_order.php');

 

PS. this will be fixed in the BETA 2 instructions... instructions were not of top importance to me for BETA 1, and probably won't be for BETA 2. However, I plan for RELEASE 1 to have improved, and very easy to follow instructions with possibly a small manual on how to use the mod.

Edited by dreamscape

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

what you want modify in later releases?

I am not sure I fully understand your question, but I think you are asking what will I add in later releases??

 

Well this initial release is just a public beta. Though it is very much functional, inside the code there are many things I would like to change just to make it cleaner, easier to upgrade, etc.

 

As far as new features, in the announcement thread, I have outlined my planned development path for this mod, as well as a few of the features I have in mind. The planned features list may change depending on how much feedback I get and what type of feedback. So really BETA 2 will be a big fix of BETA 1 with hopefully a few more features and some cleaner code. And then RELEASE 1 be a bug fix of BETA 2, with hopefully the full current planned features included. Exactly what these are I am not sure, but I do have ideas for some. I am also welcome to suggestions. Anyways you can read more about the development path and some features I hope to get in BETA 2 or at least RELEASE 1 at:

http://www.oscommerce.com/forums/index.php?showtopic=81271

 

Beyond RELEASE 1? I have not thought that far.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

1 thing I did immediately think was:

 

On: admin/customers.php page, have a button (near to the 4 existing buttons per customer) saying "manual order"...I'll see about doing that and sending it to you for inclusion if you feel it's worth adding!

Hey Burt,

 

This is already included in the "Extras" folder. There is a button & the code for that (button says "New Order"), as well as the code to place a button on the admin/orders.php page to edit the order with the mod (I used the update button for now since the edit one was already being used, but before final release I will probably make a "manual edit" button or something).

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

  • 2 weeks later...

Hello!

 

I just wanted to thank you for your contribution. I found it this morning after a long search and it works, so far, like a charm. I will keep an open eye and report any improvements that could make the experience even better.

 

Have a fun weekend,

 

:: doris B)

Link to comment
Share on other sites

ps. By reading my own message I realize I forgot this one:

 

What would be really of tremendous value is the ability to edit an order. Specifically:

 

In the case of my client it works so that different % of discounts (kind of elaborate...) and fees (different handling fees for different shipments) are calculated after the order is submitted by the customer. After the calculation is done, the final Grand Total will be withdrawn from the submitted CC and a notification sent to the customer.

 

Any ideas on how this could be set up?

 

:: doris B)

Link to comment
Share on other sites

What would be really of tremendous value is the ability to edit an order.

This is already an included function. In fact, when "adding a new order", what you are actually doing is editing a blank order that was inserted into the database. In the contribution package you download, there is an "Extras" folder. In there are directions for adding 2 buttons to the admin to compliment this contribution. One is a button to add to the admin/customers.php page for creating new orders for existing customers from that page if you wish. The other is a button to add to admin/orders.php to send existing orders to the module for editing. ;)

 

 

Specifically:

 

In the case of my client it works so that different % of discounts (kind of elaborate...) and fees (different handling fees for different shipments) are calculated after the order is submitted by the customer. After the calculation is done, the final Grand Total will be withdrawn from the submitted CC and a notification sent to the customer.

 

Any ideas on how this could be set up?

Using the button & code in the "Extras" folder, as mentioned above, you can edit the order and add the discounts to the order total section and it will alter the Grand Total. You could probably then use the regular admin/orders.php page to send the notification to the customer. Future versions of the MOECTOE Suite I plan to have an optional notification email in the order editing section similar to the one of the regular orders page.

 

To withdraw the amount from the submitted CC, you would need to do this at your merchant account's virtual terminal. I do have plans to write an OSC admin virtual terminal for authorize.net, so one can easily do these types of things from within the OSC admin. I do not have a time frame for this, and I guess 1 to 2 months, but it could be longer as I am busy with many other projects. I will only be doing an authorize.net terminal but will be trying to do so in a way that it can easily be followed as an example for making terminals for other gateways that allow it (like ECHO for example).

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Dear Dreamscape:

 

Great contribution! A good 'clear/update-code' of the manual order.

I try make a spanish implementation of this and I found some problems in the moectoe_edit_order.php.

 

1.- I can't find where make a 'comment' (I saw the code into this, but I don't appaears when this page is load).

 

2.- The small round images near the 'subtotal' and in the field below don't opens a new field (It seems that javascript don't work as fine I would like) to 'IMAGE_ADD_NEW_OT' promises.

 

3.- I like the check fields to hidde the 'invoiced address' and 'shipping address'. I think it would be a good idea to allow to also hidde the 'customer address' to clear space to make the order. I try, but my limited knowledge in javascript and HTML (a labirint of table tags!) force to do nothing...

 

4.- I detect that this code (as the precedent) don't uptdate the 'products' table. I'd maked this code in the previous versions, but I don't know if it would work in this suite or not... Are you planning to make this addom?

 

Thanks again for your (good) work!

Link to comment
Share on other sites

Hello dreamscape,

 

I need your input. I get this error message

 

Parse error: parse error in /home/topvin/public_html/order/admin/configuration.php on line 24

 

when trying to get into the configuration section of the admin area.

 

The code I have there is

  require('includes/application_top.php');
 require(DIR_WS_FUNCTIONS . 'moectoe.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 if (tep_not_null($action)) {
   switch ($action) {
     case 'save':
       $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
       $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
       while (list($key, $value) = each($_POST['configuration'])) {
??????????if (is_array($_POST['configuration'][$key])) $configuration_value = implode(', ', $_POST['configuration'][$key]);
????????}

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'");

       tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));
       break;
   }
 }

 

Line 24 is

?if (is_array($_POST['configuration'][$key])) $configuration_value = implode(', ', $_POST['configuration'][$key]);

 

Any ideas on how to fix this? I just copied and pasted form your instructions. I'm really not a coder, just a good copy-and-paster. ;)

 

Thanks a bunch,

 

:: doris B)

Edited by domaky
Link to comment
Share on other sites

Here is the fix for that error in configuration.php. I posted this in the announcement thread, but didn't re-post it here. Actually because the error was 1st posted there and should have been posted here. Ah well...

 

anyways that code you pasted in configuration.php, replace with this:

? ? ? ?if ((isset($_POST['configuration'])) && ($_POST['configuration'] != '')) {
? ? ? ? ?while (list($key, $value) = each($_POST['configuration'])) {
? ? ? ? ? ?if (is_array($_POST['configuration'][$key])) $configuration_value = implode(", ", $_POST['configuration'][$key]);
? ? ? ? ?}
? ? ? ?}

 

so that it now looks like this:

? ? ?case 'save':
? ? ? ?$configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
? ? ? ?$cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

? ? ? ?if ((isset($_POST['configuration'])) && ($_POST['configuration'] != '')) {
? ? ? ? ?while (list($key, $value) = each($_POST['configuration'])) {
? ? ? ? ? ?if (is_array($_POST['configuration'][$key])) $configuration_value = implode(", ", $_POST['configuration'][$key]);
? ? ? ? ?}
? ? ? ?}

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

1.- I can't find where make a 'comment' (I saw the code into this, but I don't appaears when this page is load).

That is because this sections is not functional yet. I commented the entire section out for BETA1. If you look in the code it says "to be implemented in BETA 2".

 

2.- The small round images near the 'subtotal' and in the field below don't opens a new field (It seems that javascript don't work as fine I would like) to 'IMAGE_ADD_NEW_OT' promises.

I'm not sure I completely understand, but are you saying that they worked for english but are not working for spanish? Or they do not work at all (do not work for english or spanish)? What browser are you using?

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Dear Dreamscape:

 

1.- I can't find where make a 'comment' (I saw the code into this, but I don't appaears when this page is load).

 

That is because this sections is not functional yet. I commented the entire section out for BETA1. If you look in the code it says "to be implemented in BETA 2".

 

ok.

 

QUOTE 

2.- The small round images near the 'subtotal' and in the field below don't opens a new field (It seems that javascript don't work as fine I would like) to 'IMAGE_ADD_NEW_OT' promises.

 

I'm not sure I completely understand, but are you saying that they worked for english but are not working for spanish? Or they do not work at all (do not work for english or spanish)? What browser are you using?

 

I think it's not the problem the traslation to spanish. The other JS it seems to work propertly. I have IE6.0. I understand that, if I click into this boutton, I will get a extra field below the field of subtotal. My cursor change to 'hand', I click it and then nothing appears...

 

Also I sugest you that it will be a good idea to make a extra checkbox field to hidde all info concerning 'customer's address' to concentrate only in the 'order' (this info get almost the 33% of the screen and I think we don't need infront this in all the time of geting items to the order).

 

I don't have the level of PHP-JS that you have. If you want, I can make the 'spanish' translation of the files involved in this interesting contribution.

 

All the best.

Link to comment
Share on other sites

ok, I've found the problem with IE6. It seems IE for windows does not yet support the display: table-row; property. IE5 for Mac does, so I had assumed its windows counterpart would as well... but I was wrong.

 

Ok I have fixed the javascript for IE for windows and it will be fixed in BETA 2, but I really have no idea when that will come, as I am busy with other things, so BETA 2 has been delayed for awhile. However, I do want to get a fix to all BETA 1 users, so here it is. In admin/moectoe_edit_order.php, replace the javascript with this (inlcuding all JS to avoid confusion as to what to replace):

<script language="javascript" src="includes/general.js"></script>
<script language="javascript" type="text/javascript"><!--
 function update_customer_zone(theForm) {
   var NumState = theForm.update_customer_zone_id.options.length;
   var SelectedCountry = '';

   while(NumState > 0) {
     NumState--;
     theForm.update_customer_zone_id.options[NumState] = null;
   }

   SelectedCountry = theForm.update_customer_country_id.options[theForm.update_customer_country_id.selectedIndex].value;

<?php echo moectoe_js_zone_list('SelectedCountry', 'theForm', 'update_customer_zone_id', 'customerStateInput', 'customerStateMenu'); ?>
 }

 function update_delivery_zone(theForm) {
   var NumState = theForm.update_delivery_zone_id.options.length;
   var SelectedCountry = '';

   while(NumState > 0) {
     NumState--;
     theForm.update_delivery_zone_id.options[NumState] = null;
   }

   SelectedCountry = theForm.update_delivery_country_id.options[theForm.update_delivery_country_id.selectedIndex].value;

<?php echo moectoe_js_zone_list('SelectedCountry', 'theForm', 'update_delivery_zone_id', 'deliveryStateInput', 'deliveryStateMenu'); ?>
 }

 function update_billing_zone(theForm) {
   var NumState = theForm.update_billing_zone_id.options.length;
   var SelectedCountry = '';

   while(NumState > 0) {
     NumState--;
     theForm.update_billing_zone_id.options[NumState] = null;
   }

   SelectedCountry = theForm.update_billing_country_id.options[theForm.update_billing_country_id.selectedIndex].value;

<?php echo moectoe_js_zone_list('SelectedCountry', 'theForm', 'update_billing_zone_id', 'billingStateInput', 'billingStateMenu'); ?>
 }

 function openWindow(file, windowName) {
   msgWindow = window.open(file, windowName,'top=250,left=250,width=550,height=400,location=no,status=yes,toolbar=no,resi
ze=yes');
   if (!msgWindow.opener) msgWindow.opener = self;
 }

 function myName() {
   window.name = 'manualEntry';
 }

 function selectRowEffect(object, buttonSelect) {
   if (document.edit_order.select_shipping[0]) {
     document.edit_order.select_shipping[buttonSelect].checked=true;
   } else {
     document.edit_order.select_shipping.checked=true;
   }
 }

 function rowOverEffect(object) {
   object.className = 'dataTableRowSelected';
 }

 function rowOutEffect(object, oldClass) {
   object.className = oldClass;
 }

 function setVisibility(ID, checkID) {
   if (document.getElementById) { // gecko(NN6); IE5+
     var obj = document.getElementById(ID);

     if (checkID.checked) {
       obj.style.visibility = "visible";
     } else {
       obj.style.visibility = "hidden";
     }
   } else if (document.all) { // IE4
     if (checkID.checked) {
       document.all[ID].style.visibility = "visible";
     } else {
       document.all[ID].style.visibility = "hidden";
     }
   } else if (document.layers) { // NN4+
     if (checkID.checked) {
       document.layers[ID].visibility = "show";
     } else {
       document.layers[ID].visibility = "hide";
     }
   }
 }

 function setAddressVisibility(ID, checkID) {
   if (document.getElementById) { // gecko(NN6) + IE 5+
     var obj = document.getElementById(ID);

     if (checkID.checked) {
       obj.style.visibility = "hidden";
       obj.style.display = "none";
     } else {
       obj.style.visibility = "visible";
       try {
         obj.style.display = "table-row";
       }
       catch(e) {
         obj.style.display = "inline";
       }
     }
   } else if (document.all) { // IE4
     if (checkID.checked) {
       document.all[ID].style.visibility = "hidden";
       document.all[ID].style.display = "none";
     } else {
       document.all[ID].style.visibility = "visible";
       document.all[ID].style.display = "inline";
     }
   } else if (document.layers) { // NN4+
     if (checkID.checked) {
       document.layers[ID].visibility = "hide";
       document.layers[ID].display = "none";
     } else {
       document.layers[ID].visibility = "show";
       document.layers[ID].display = "inline";
     }
   }
 }

 function setStateVisibility(ID, vis, ID2) {
   if (document.getElementById) { // gecko(NN6) + IE 5+
     var obj = document.getElementById(ID);
     var obj2 = document.getElementById(ID2);

     if (vis == "hidden") {
       obj.style.visibility = "hidden";
       obj.style.display = "none";
       obj2.style.visibility = "visible";
       obj2.style.display = "inline";
     } else {
       obj.style.visibility = "visible";
       obj.style.display = "inline";
       obj2.style.visibility = "hidden";
       obj2.style.display = "none";
     }
   } else if (document.all) { // IE 4
     if (vis == "hidden") {
       document.all[ID].style.visibility = "hidden";
       document.all[ID].style.display = "none";
       document.all[ID2].style.visibility = "visible";
       document.all[ID2].style.display = "inline";
     } else {
       document.all[ID].style.visibility = "visible";
       document.all[ID].style.display = "inline";
       document.all[ID2].style.visibility = "hidden";
       document.all[ID2].style.display = "none";
     }
   } else if (document.layers) { // NN4+
     if (vis == "hidden") {
       document.layers[ID].visibility = "hide";
       document.layers[ID].display = "none";
       document.layers[ID2].visibility = "show";
       document.layers[ID2].display = "inline";
     } else {
       document.layers[ID].visibility = "show";
       document.layers[ID].display = "inline";
       document.layers[ID2].visibility = "hide";
       document.layers[ID2].display = "none";
     }
   }
 }

 function setCustomOTVisibility(ID, vis, ID2) {
   var thisForm = document.edit_order;

   thisForm[ID+"[title]"].value = '';
   thisForm[ID+"[value]"].value = '';
   
   if (document.getElementById) { // gecko(NN6) + IE 5+
     var obj = document.getElementById(ID);
     var obj2 = document.getElementById(ID2);

     if (vis == "hidden") {
       obj.style.visibility = "hidden";
       obj.style.display = "none";
       obj2.style.visibility = "visible";
       obj2.style.display = "inline";
     } else {
       try {
         obj.style.display = "table-row";
       }
       catch(e) {
         obj.style.display = "inline";
       }
       obj.style.visibility = "visible";
       obj2.style.visibility = "hidden";
       obj2.style.display = "none";
     }
   } else if (document.all) { // IE 4
     if (vis == "hidden") {
       document.all[ID].style.visibility = "hidden";
       document.all[ID].style.display = "none";
       document.all[ID2].style.visibility = "visible";
       document.all[ID2].style.display = "inline";
     } else {
       document.all[ID].style.visibility = "visible";
       document.all[ID].style.display = "inline";
       document.all[ID2].style.visibility = "hidden";
       document.all[ID2].style.display = "none";
     }
   } else if (document.layers) { // NN4+
     if (vis == "hidden") {
       document.layers[ID].visibility = "hide";
       document.layers[ID].display = "none";
       document.layers[ID2].visibility = "show";
       document.layers[ID2].display = "inline";
     } else {
       document.layers[ID].visibility = "show";
       document.layers[ID].display = "inline";
       document.layers[ID2].visibility = "hide";
       document.layers[ID2].display = "none";
     }
   }
 }

 function setShipping(method) {
   var thisForm = document.edit_order;
       
   thisForm["update_totals[<?php echo $shippingKey; ?>][title]"].value = thisForm["update_shipping["+method+"][title]"].value;
   thisForm["update_totals[<?php echo $shippingKey; ?>][value]"].value = thisForm["update_shipping["+method+"][value]"].value;
 }
//--></script>

 

This should make the JS working correctly in IE for windows now.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Hello dreamscape,

 

Thank you so much for posting the fix in this thread too. It must be difficult to keep up with all the postings.

 

I'm running into really odd parse error message, this time line 18 (which in this case is: ??if (tep_not_null($action)) {)

 

Without the changes for moectoe the configuration.php works just like a charm. When I insert the changes I'm with the parse error again.

 

I've posted the code on experts-exchange (to give you a little break :) ), but nobody could see anything wrong with the code. So I'm posting the top part with the changes in configuration.php in the hope that you or somebody else who has the eye for dots and quotation marks can see anything that might cause the error.

 

Here it is:

<?php
/*
 $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require(DIR_WS_FUNCTIONS . 'moectoe.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

??if (tep_not_null($action)) {
????switch ($action) {
??????case 'save':
? ? ? ?$configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
? ? ? ?$cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
? ? ? ?if ((isset($_POST['configuration'])) && ($_POST['configuration'] != '')) {
? ? ? ? ?while (list($key, $value) = each($_POST['configuration'])) {
? ? ? ? ? ?if (is_array($_POST['configuration'][$key])) $configuration_value = implode(", ", $_POST['configuration'][$key]);
? ? ? ? ?}
? ? ? ?}

 

Many and more thanks for all and any help with this :-)

 

:: doris B)

Link to comment
Share on other sites

Hi dreamscape,

 

Here we go:

 

Parse error: parse error in /home/topvin/public_html/order/admin/configuration.php on line 18

 

Please let me know if there is anything else I can do to help find the "dead dog" :)

 

Greetings,

 

:: doris

Link to comment
Share on other sites

this doesn't really make sense. You did not alter anything until line 24 or so.

 

Would it be possible for you to post your full configuration.php or pm it to me?

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

this is, especially compared to the other "edit order" contributions, a really nice work and exactely what I was looking for.

 

I am running into two minor problems:

 

The popup window that appears when adding new products has s fixed size, which is too small for me (yes, I am wearing glasses, but this is more due our huge categories). Where can I change this?

 

After adding a product I get the following message:

 

ot_tax

 

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/actual/shop/admin/moectoe_edit_order.php:249) in /home/httpd/actual/shop/admin/includes/functions/general.php on line 18

 

After pushing the "back" button, everything is in the order, it jusr doesn't look nice. Any ideas?

 

Many thanks for this great work,

 

Michael

Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)

Link to comment
Share on other sites

Hi,

 

please forget the header error, this only occurs on my notebook, the Server works fine. So only the size of the popup is needed.

 

Greetings, Michael

Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)

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