Re: Super Orders v4.0 Support Thread
batch status update and batch form print are not working in 1.5.3, check all is not working, if you manually edit the url it will work, but the "check all" button does not work.
in batch form print, if you manually select, it does not pass the batch through to print preview.
Re: Super Orders v4.0 Support Thread
the button creates this link....
/super_batch_forms.php?status=2&ot_sign=1&checked=0'
which doesn't work, but if i type this url into the browser
/super_batch_forms.php?start_date=&end_date=&status=2&products=&customers=&countr ies=&payments=&ot_sign=1&order_total=&search=&oid_range_first=&oid_range_last=&c hecked=1
it works, exactly the same is true for batch status update
Re: Super Orders v4.0 Support Thread
Quote:
Originally Posted by
DigitalShadow
batch status update and batch form print are not working in 1.5.3, check all is not working, if you manually edit the url it will work, but the "check all" button does not work.
in batch form print, if you manually select, it does not pass the batch through to print preview.
I made the following changes on a ZenCart 1.5.3 installation running PHP 5.3.27. (In this change, you're moving away from a page refresh to using JavaScript.) You can use this as a temporary fix until DivaVocals or someone releases a full update.
=== OPEN /admin/super_batch_forms.php ===
=== FIND AT (OR NEAR) LINE 117 ===
Code:
<?php /* END addition */ ?>
=== BEFORE, ADD ===
Code:
function checkByParent(aId) {
var collection = document.getElementById(aId).getElementsByTagName('INPUT');
for (var x=0; x<collection.length; x++) {
if (collection[x].type.toUpperCase()=='CHECKBOX') {
if (collection[x].checked == true)
{
collection[x].checked = false;
}
else { collection[x].checked = true; }
}
}
}
=== FIND AT (OR NEAR) LINE 412 ===
PHP Code:
if ($checked) {
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_UNCHECK_ALL . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_FORMS, zen_get_all_get_params(array('checked')) . 'checked=0', 'NONSSL') . '\'">';
} else {
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_CHECK_ALL . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_FORMS, zen_get_all_get_params(array('checked')) . 'checked=1', 'NONSSL') . '\'">';
}
=== REPLACE WITH ===
PHP Code:
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_CHECK_ALL . '" ONCLICK="checkByParent(\'ordersList\');">';
=== FIND AT (OR NEAR) LINE 428 ===
(Careful this may appear multiple times....)
Code:
<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" align="left" colspan="2"> <?php echo TABLE_HEADING_ORDERS_ID; ?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></td>
<td class="dataTableHeadingContent" align="left" colspan="2"><?php echo TABLE_HEADING_ORDER_STATUS; ?></td>
</tr>
<?php
while (!$orders->EOF) {
?>
<tr class="dataTableRow" onMouseOver="rowOverEffect(this);this.style.cursor='default'" onMouseOut="rowOutEffect(this)">
<td class="dataTableContent" align="left"><?php
echo zen_draw_checkbox_field('batch_order_numbers[' . $orders->fields['orders_id'] . ']', 'yes', $checked);
echo $orders->fields['orders_id'];
?></td>
<td class="dataTableContent" align="right"><?php echo '[' . $orders->fields['customers_id'] . ']'; ?></td>
<td class="dataTableContent" align="left"><?php echo $orders->fields['customers_name']; ?></td>
<td class="dataTableContent" align="right"><?php echo $currencies->format($orders->fields['order_total']); ?></td>
<td class="dataTableContent" align="center"><?php echo zen_datetime_short($orders->fields['date_purchased']); ?></td>
<td class="dataTableContent" align="left"><?php echo $orders->fields['payment_method']; ?></td>
<td class="dataTableContent" align="left"><?php echo $orders->fields['orders_status_name']; ?></td>
<td class="dataTableContent" align="right"><?php echo '<a href="' . zen_href_link(FILENAME_ORDERS, 'oID=' . $orders->fields['orders_id'] . '&action=edit', 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_details.gif', ICON_ORDER_DETAILS) . '</a> '; ?></td>
</tr>
<?php
$orders->MoveNext();
}
} // END if ($orders->RecordCount() > 0)
?>
</form>
</table></td>
=== WITHIN THIS BLOCK, FIND ===
=== AFTER, ADD ===
Code:
<div id="ordersList">
=== WITHIN THIS BLOCK, FIND ===
Code:
</form></table></td>
=== REPLACE WITH ===
Code:
</form></table></div></td>
=== SAVE CHANGES ===
1 Attachment(s)
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Here are the changes for Super Batch Status (Update):
=== OPEN /admin/super_batch_status.php ===
=== FIND AT (OR NEAR) LINE 104 ===
=== BEFORE, ADD ===
Code:
function checkByParent(aId) {
var collection = document.getElementById(aId).getElementsByTagName('INPUT');
for (var x=0; x<collection.length; x++) {
if (collection[x].type.toUpperCase()=='CHECKBOX') {
if (collection[x].checked == true)
{
collection[x].checked = false;
}
else { collection[x].checked = true; }
}
}
}
=== FIND AT (OR NEAR) LINE 333 ===
PHP Code:
if ($checked) {
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_UNCHECK_ALL . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_STATUS, zen_get_all_get_params(array('checked')) . 'checked=0', 'NONSSL') . '\'">';
} else {
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_CHECK_ALL . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_STATUS, zen_get_all_get_params(array('checked')) . 'checked=1', 'NONSSL') . '\'">';
}
=== REPLACE WITH ===
PHP Code:
echo '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BUTTON_CHECK_ALL . '" ONCLICK="checkByParent(\'ordersList\');">';
=== FIND AT (OR NEAR) LINE 344 ===
Code:
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
=== REPLACE WITH ===
Code:
<td><div id="ordersList"><table border="0" cellpadding="0" cellspacing="0" width="100%">
=== FIND AT (OR NEAR) LINE 384 ===
=== REPLACE WITH ===
Code:
</table></div></td>
=== SAVE CHANGES ===
I'm also attaching both files as a Zip File. You should only have to upload these and overwrite them in your /admin/ directory.
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
When I return, I'll finish creating the Super orders Github repo.. Would love if you could fork it and submit your changes to the repo..
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
When it's ready, please post it up here and I'll fork it and make my change.
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Quote:
Originally Posted by
retched
When it's ready, please post it up here and I'll fork it and make my change.
Awesome!
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Quote:
Originally Posted by
retched
When it's ready, please post it up here and I'll fork it and make my change.
Super Orders Github repo: https://github.com/DivaVocals/zen_SuperOrders
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Is it just me or is batch form print still not showing the multiple frames for printing multiple orders at once?
Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)
Quote:
Originally Posted by
DigitalShadow
Is it just me or is batch form print still not showing the multiple frames for printing multiple orders at once?
I'm not seeing any problems on my side with my changes and I'm running 1.5.3. All checkboxes and the three buttons above the order listing work for me.