Pb fixed. Be warned, users, to be carefull when patching the source.I really appreciate you getting back to me and trying to help.
I was missing a syntax on header.php. I fixed it.
Thank you, Scott
Pb fixed. Be warned, users, to be carefull when patching the source.I really appreciate you getting back to me and trying to help.
I was missing a syntax on header.php. I fixed it.
Thank you, Scott
When changing to this:
6) Edit "admin/orders.php"
6.1) Line 589, add 1 piece :
from this:PHP Code:<tr>
<td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> <?php echo zen_draw_checkbox_field('notify', '', true); ?></td>
<!-- GOB_PACKAGE_TRACKERS_MODIFICATION_BEGIN -->
<td class="main"><strong><?php echo ENTRY_NOTIFY_TRACKING; ?></strong> <?php echo zen_draw_checkbox_field('notify_tracking', '', true); ?></td>
<!-- GOB_PACKAGE_TRACKERS_MODIFICATION_END -->
<td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo zen_draw_checkbox_field('notify_comments', '', true); ?></td>
</tr>
PHP Code:<tr>
<td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> [<?php echo zen_draw_radio_field('notify', '1', true) . '-' . TEXT_EMAIL . ' ' . zen_draw_radio_field('notify', '0', FALSE) . '-' . TEXT_NOEMAIL . ' ' . zen_draw_radio_field('notify', '-1', FALSE) . '-' . TEXT_HIDE; ?>] </td>
<!-- GOB_PACKAGE_TRACKERS_MODIFICATION_BEGIN -->
<td class="main"><strong><?php echo ENTRY_NOTIFY_TRACKING; ?></strong> <?php echo zen_draw_checkbox_field('notify_tracking', '', true); ?></td>
<!-- GOB_PACKAGE_TRACKERS_MODIFICATION_END -->
<td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo zen_draw_checkbox_field('notify_comments', '', true); ?></td>
Your emails are not sent!
If I use the second code above it works fine. What is the problem here?
In addition why are no tracking numbers sent if there are no comments on the order?
1) No problem there.
The modifs to do are between the labels <!--GOB_PACKAGE_TRACKERS_MODIFICATION_XXXX --> only.
You have copied a line from ZC 1.3.8 (when that module was published).
That line has been changed in 1.3.9 in:
Simply insert the modif between labels without changing the code.Code:<td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?></strong> [<?php echo zen_draw_radio_field('notify', '1', true) . '-' . TEXT_EMAIL . ' ' . zen_draw_radio_field('notify', '0', FALSE) . '-' . TEXT_NOEMAIL . ' ' . zen_draw_radio_field('notify', '-1', FALSE) . '-' . TEXT_HIDE; ?>] </td>
2) This is the standart behaviour of orders emails in ZC.
A comment or an order status change is needed for the email to be send.
Line 122 of admin\orders.php says:
If you need to send an email, put some char like '-' in the comments.Code:if ( ($check_status->fields['orders_status'] != $status) || zen_not_null($comments)) { $db->Execute("update " . TABLE_ORDERS . " .....
gob,
Thanks for getting back to me on this.
Yes, that is the mistake I was making. I was changing the whole section of the code that appeared in your installation guide.
It seems to be working great now! This is a perfect little contribution for setting up tracking codes for shipping, and makes our shop's life a lot easier now we don't have to manually enter the tracking numbers each time!
The only thing that was slightly confusing was the layout of the installation instructions.
Thanks GOB!
gob33,
Great mod. Thanks for the contribution. I found a couple of errors in the package_trackers_install_so.txt file for those want to use this mod with super orders.
I was having problems getting the customer notified indicator to update properly with a green check mark on the status history display. When i checked my database, the customer_notified field was set to 0 even though I select to notify customer and received the status update email.
Reviewing your php modifications, i found the following issues:
package_trackers_install_so.txt says:
4) Edit "admin/includes/functions/extra_functions/super_orders_functions.php"
4.1) Line 392, find the function:
should say ($notified == 'no' replaced by $notified == '1'):PHP Code://///////////////
// Function : update_status
// Arguments : oID, new_status, notified(optional), comments(optional)
// Return : none
// Description : Adds a new status entry to an order
/////////////////
function update_status($oID, $new_status, $notified = 0, $comments = '') {
global $db;
if ($notified == 'on')
$cust_notified = 1;
else
$cust_notified = 0;
PHP Code://///////////////
// Function : update_status
// Arguments : oID, new_status, notified(optional), comments(optional)
// Return : none
// Description : Adds a new status entry to an order
/////////////////
function update_status($oID, $new_status, $notified = 0, $comments = '') {
global $db;
if ($notified == '1')
$cust_notified = 1;
else
$cust_notified = 0;
also package_trackers_install_so.txt says:
7) Edit "admin/super_orders.php"
...
7.4) Line 118, change these 3 lines:
should say ($notify replaced by $customer_notified):PHP Code:
update_status($oID, $status, $notify, $comments);
if ($customer_notified == '1') {
email_latest_status($oID);
}
to these lines:
// GOB_PACKAGE_TRACKERS_MODIFICATION_BEGIN
update_status($oID, $status, $notify, $comments, $tracker_id, $tracking_numbers);
// GOB_PACKAGE_TRACKERS_MODIFICATION_END
Once I made these changes, the customer_notified field correctly would update to value 1 on future status updates where notification was sent. Also green check mark showed up on customer notified field in super orders status history.PHP Code:
update_status($oID, $status, $customer_notified, $comments);
if ($customer_notified == '1') {
email_latest_status($oID);
}
to these lines:
// GOB_PACKAGE_TRACKERS_MODIFICATION_BEGIN
update_status($oID, $status, $customer_notified, $comments, $tracker_id, $tracking_numbers);
// GOB_PACKAGE_TRACKERS_MODIFICATION_END
Last edited by magnusrf; 6 Sep 2010 at 10:20 AM.
Software Guy has changed the code of Super Orders a little since v2.0rev47 by Frank Koehl.
I suppose users have compared the code when doing modifications and adapted accordingly.
Thanks for noticing these 2 changements.
Thank you for great contribution, works great on 1.3.9.e! Maybe one thing which i would like to change - in orders, your contrib added customer comments - i rather like box with track id of package. (less clicks to see the status) but otherwise, it´s really cool! thanks a lot!![]()
Thanks for this great mod! Just a couple of questions...
How do I change the number of orders that are shown in the sidebox? And is there a way that I can only enable the sidebox when a customer logs into their account?
Thank you!
The number of orders shown in the sidebow is controled in
[Admin->Configuration->Maximum values]
with
Customer Order History List Per Page: 10
Number of orders to display in the order history list in 'My Account'
The display of the sidebow is inside a conditional
so the customer must be registred.Code:if ($_SESSION['customer_id']) { ... }