btw, another question, anyone knows whether is this contribution compatible with v1.3.8a or not?
thanks,
natalia
Printable View
Yes, I'm useing it on 1.3.8a
It would be helpfull to know what error it gives you. I would suggest checking the code changes you made to /admin/orders.php to make sure there is no typo. I will try on a clean install tomorrow if needed, as my site may not be a compleatly fair test. I have "Info at a Glance", and "USPS.com Click-N-Ship" installed as well, and they also edit orders.php. I also made a few code changes to the code suggested in the readme to modify the way the buttons work. I wanted to be able to click on the origional button and just view the details, but have an edit button at the bottom that used the mod to edit the order. Here are my notes on installing the mod:
Code:edit orders 1.2.6 Nov 12th 2007
unzip
copy and upload admin directory
edit admin/orders.php Note first change is not the same as in readme, but what we want instead; to just rename the button
Replace line:
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, 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>');
With the code:
// ====> BOF: Edit Orders 1.2.6 <====
// $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, 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>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_details.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>');
// ====> EOF: Edit Orders 1.2.6 <====
Replace line:
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
With the code:
// ====> BOF: Edit Orders 1.2.6 <====
// $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
$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>');
// ====> EOF: Edit Orders 1.2.6 <====
Ok, I went back and saw your previous post. A parse error, unexpected $end is usualy caused by a missing } somewhere in your code. I would pull a clean copy of /admin/orders.php and try editing it again. Its usualy faster to redo the mod then actualy try to find the typo burried in 1000+ lines of code.
I just installed the new version of this mod since the old version I had was giving me nothing but errors when I upgraded to zen v1.3.8, BUT, both the Details page and the Edit page look exactly the same and no attributes are showing. I have no way of knowing what sizes people are ordering...
Are these two pages supposed to be exactly the same?
That is how the mod works by default, and I didn't like it either. Look back a few posts for the code I use to change that.
just looked at the code and used it, but now I get this error when hitting the Details button:
Fatal error: Call to undefined function zen_address_format() in xxxx/store/admin/orders.php on line 389
EDIT: Actually I am getting that error for every button (Invoive, Details, Packing Slip) except the EDIT button, which has nothing to do with the mod I don't think.
So, I managed to figure out my issues with the tax not calculating properly. There is a hard coded variable in the edit_orders.php file that specifies the shipping tax. I put in the right number here. This really should be read out of the database though, so I may change this later on.
As for discounts, it was not subtracting them from the total, nor was tax being calculated as a negative. Once again, the tax on this discount should be read from the database.
Now the issue I have is that the email does not work when updating the status or comments. I tried looking at the orders.php file to see what was different. The call to zen_mail was different. I fixed this up, but still have the same problem....
Email Error: Could not instantiate mail function. Please check Admin->Configuration->Email Options->Email Transport
Anyone else have this problem? I can't see how the edit_orders.php version is any different than the orders.php version.
So never did figure out my above problem with Admin being funky, so I re-uploaded the Admin folder from v1.3.8, re-installed the Edit Order mod with the changes in post #54...everything seemed to work correctly, I could get to my invoice, packin slip, etc...BUT now when I want to EDIT an order I get the following error:
Anyone know what this is about? I'm going crazy over here...Quote:
Fatal error: Cannot redeclare zen_get_country_id() (previously declared in ../public_html/store/admin/edit_orders.php:1242) in ../public_html/store/admin/includes/functions/extra_functions/edit_orders.php on line 45