ok, will do, but does SO get this info from the db or?? if so, is it possible to force this setting to get the data ex tax?
Printable View
I'm pretty sure it's a DB setting via the configuration table but, again, no sure idea. :unsure:
Hello harlyman,
I did a little reseach into your problem and here are my findings. These are my opinons and how I would approach solving the problem. I am sure there are other ways inwhich to get to the same solution which maybe easier, but I have not found.
As Super Orders 2.0 works right now the subtotal amount is retrieved directly from the 'orders_totals' table in the db which I assume gets written after a customer has submitted their order. Ok, so lets review how this value is set when you view a customer's order in the admin:
admin/includes/classes/order.php 'Line #43-46'
So, this part of the class stores the subtotal with tax from the 'orders_totals' table in the db.Code:$totals = $db->Execute("select title, text, class
from " . TABLE_ORDERS_TOTAL . "
where orders_id = '" . (int)$order_id . "'
order by sort_order");
admin/super_data_sheet.php 'Line#32'
The $order object gets created (instantiated) here and at this time $order->totals[$i]['text'] is assigned the order's subtotal with tax.Code:$order = new order($oID);
admin/super_orders.php 'Line#773'
This line actually displays the subtotal from $order->totals[$i]['text'] on the order's detail page in the admin.Code:<td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
Ok, but you want subtotal without tax. I will outline my solution but I have not tried this or tested it and it will need through testing to get it right.
1. Inside 'admin/includes/classes/order.php', add a new method/function like getSubTotalwoTax( ) to query the 'orders_product' table which lists all the items in an order. Loop through all the product lines and calculate the sum of fields 'products_quantity' x 'products_price' and return the total amount.
2. In 'admin/super_data_sheet.php' after Line 32, add a new variable, say $subTotalwoTax and call your new function from the $order object as:
$subTotalwoTax = $order->getSubTotalwoTax($oID);
3. Inside 'admin/super_orders.php - Line#773' change $order->totals[$i]['text'] to $subTotalwoTax.
Ok, this is a rough hack, and personally, it would be better to edit the orders.php class and add another array variable to the totals member variable to make it cleaner. In that case, you could simply change the display line from $order->totals[$i]['text'] to say, $order->totals[$i]['subTotalwoTax'], but you get the idea.
Of course you need to document the exact changes you make, because any future upgrade of zen-cart will likely overwrite the orders.php file and your will lose your changes.
Hi,
I installed Super Orders on my store, but I don't see any of the functionality.
I can go to Admin>Config>Super Orders
But I can't find Admin>Customers>Super Orders
and I see no links to super orders on any of my existing orders.
Does it only work with new orders or did I mess up in the installation process?
Thanks,
Nate
Batch_status_update not sending emails...
Well, this is no real solution but yo should know that SO 1.3 batch status update works just fine on Zen-Cart 1.3.6...
So if you need it (the only thing I really need from SO) you might consider down-grading :blush:
Still interested in 2.0 solution though :lookaroun
Cedo
Only one thing has changed in that file between major versions. Open admin/super_batch_status.php. Find this line...
Change it to read as follows....Code:$notify = (int)$_POST['notify'];
Upload and give it a whirl.Code:$notify = $_POST['notify'];
I just downloaded Super Orders 2.0, great features!
But, before I install it, want to make sure if it works with current ZenCart 1.3.6 and Stock by Attributes mod that I am using, doesn't it?
Thanks!