yes true. see:
http://php.net/manual/en/function.basename.php
try for yourself:
test.php
Code:$PHP_SELF = $_SERVER['PHP_SELF']; echo $PHP_SELF . '<----->'; echo basename($PHP_SELF) . '<----->'; echo basename($PHP_SELF, '.php') . '<---';
Providing EO with the minimum subtotal and total in the orders_total table appears to work well with my initial testing. I found a way to exclude ot_tax in the mix by removing ot_tax from the list of modules passed to order_totals in new_order.php, so no messing around with EO needed. But I wonder if the problem found by @carlwhat is the reason why merging the store-side get_zen_tax_locations with EO's version didn't work in my testing. I may try it again just to see what happens. But I'll be happy just the way it is (passing just ot_subtotal and ot_total in orders_total table to EO) if further testing works out well.
Further testing reveals a problem with the order total when subtotal, quantity discount, group discount, shipping, and tax ot_modules are exercised. Each line item is correct, but the total of each line item is too low. It's off by the tax on the sum of the discounts. Any suggestions would be appreciated.
Thanks!
Further testing show the problem appears only when quantity discount is used. If quantity discount is not applicable, and Group discount alone is exercised, the total is correct. If there is no tax, the total is correct. The problem appears only when quantity discount and tax is involved. I should add that everything is correct on the store side. Each line item and the total of all are correct if the same order is entered in the store.
Last edited by Dave224; 7 Feb 2018 at 03:29 AM.
The following files are attached (the log file will be in the next post):
- debug_edit_orders_1222.txt (log file edited to change admin directory name and customer email address)
- Admin New Order Detail Page.jpg - screen shot of portion of orders details for order created with Admin New Order and Edit Orders with incorrect total
- Admin New Order after shipping update.jpg - screen shot of portion of edit orders screen after adding shipping charge and clicking update showing incorrect total
- Admin New Order after product add.jpg - screen shot of portion of edit orders screen after adding product with quantity discount
- Store order detail.jpg - screen shot of portion of store-side order confirmation page showing correct total
Zen Cart v155e, Quantity Discount v1.12.1, Edit Orders v4.3.1, Admin New Orders v1.4.1 (edited to delete ot_tax.php from list of order totals modules). The product has $1.00 off each item for 5 or more. The product cost is $6.00, on sale for 50% off or $3.00 per item. Tax rate is 6% on the product and shipping.
The subtotal, quantity discount, shipping, PA tax line items are all correct for the new order created in Admin New Order and Edit Orders, but the total line item is incorrect, being too low by an amount that equals the tax on the quantity discount ($0.30).
![]()
Here's the log file. See previous post.
debug_edit_orders_1222.txt.zip
Have you tried creating a "normal" order with the same products, totals, etc?
Bookmarks