My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
There were a couple of posts mentioning that the order total calculations were a bit peculiar. If anyone is interested, I modified the Edit Order page to calculate the sub-total, postage, VAT and grand total to my requirements. That being:
- leaving VAT on the sub-total,
- not having to re-input the postage without VAT before pressing update,
- calculating the VAT to include VAT on the products and VAT on the post,
- and calculating the grand total to be VAT from the sub-total and VAT from the postage.
Whether or not this causes any problems I have yet to discover, but it seems to do what I want it to do.
The following is a win merge patch for Edit Orders 2.03:
(For those without winmerge, the left arrow is the original file, the right arrow is the new file.)
Code:89c89 < $AddShippingTax = "0.0"; // e.g. shipping tax of 17.5% is "17.5" --- > $AddShippingTax = "17.5"; // e.g. shipping tax of 17.5% is "17.5" 593c593,596 < $RunningTaxTotalChanges += (($_POST[shippingtaxrate] / 100) * $ot_value); --- > $ot_value = $ot_value / (1 + ($_POST[shippingtaxrate]/100)); > $RunningTotalShippingTax = (($_POST[shippingtaxrate] / 100) * $ot_value); > $RunningTaxTotalChanges += $RunningTotalShippingTax; > $RunningTaxTotalShipping = $ot_value; 636c639 < $ot_value = $RunningSubTotal; --- > $ot_value = (($RunningSubTotal + $RunningTax) - $RunningTotalShippingTax); 644a648,653 > if($ot_class == "ot_shipping") > { > $ot_value = $RunningTaxTotalShipping + $RunningTotalShippingTax; > // $sendtotaltoorders = 2; > } > 647c656,659 < $ot_value = $RunningTotal; } --- > $ot_value = $RunningTotal - $RunningTax; > //$ot_value = $ot_value + $RunningTotalShippingTax; > }
Just a quick question: If a product is deleted from an order using Edit Orders, is it re-stocked automatically?
Thanks!
Danielle
Can you please help me with changing $ to €? Euro is the only currency that I'm using in my shop, but still the $ shows on this mod (and this mod only).
Also, the product names won't show at all on list (when adding new products to order) if I haven't savd them in English. Would it be possible to get the names from other language field or do I have to save all products in two languages?
Just wanted to post an update on this.. I tried virtualomega's fix (see previous post below), and it didn't work, but gave me a good hint on what the answer was..
In edit_orders.php find:
Replace with:Code:<td class="pageHeading" align="right"><?php echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('action'))) . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a>';
Code:<!-- BOF Required Super Orders edit to return to super_orders.php instead of orders.php --> <td class="pageHeading" align="right"><?php echo '<a href="' . zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oID . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> <!-- EOF Required Super Orders edit to return to super_orders.php instead of orders.php --> <!-- <td class="pageHeading" align="right"><?php echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('action'))) . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> -->=========================================
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
I also wanted to share on other minor edit I made to edit_orders.php to use with Super Orders. This will add an additional button that takes you back to the Super Orders detail page for the current order from the "Add Product" section of Edit Orders. (Currently there is only a "Back" button that returns you to the Edit Order page..)
Look for this:
A few lines down from there find this:Code:if($action == "add_product")
Replace with this:Code:<td class="pageHeading" align="right"><?php echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('action'))) . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>
Code:<!-- BOF Edit to return to current order being edited instead of the order list page --> <td class="pageHeading" align="right"> <?php echo '<a href="javascript:history.back()">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?> <?php echo '<a href="' . zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oID . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_details.gif', IMAGE_ORDER_DETAILS) . '</a>'; ?></td> </td> <!-- EOF Edit to return to current order being edited instead of the order list page -->
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Bookmarks