We are creating a new total line item on the quote, such as an oversize charge and this needs to be taken into account when the tax calculation is calculated. We have set it to be before tax, but obviously when looking through the tax total file it doesn't appear to grab other totals or a way to say this total needs to have tax applied.
Has anyone came up with a solution to this?
From what I can remember all the 'footer' totals (I remember them as being in a <tfoot> normally) are based on the subtotal and not each other. If your 'oversize' total block modifies the subtotal after it has been displayed then maybe the tax will calculate the updated value.
In your collect method you can try to add the value to the Subtotal instead of the GradTotal ( $address->setSubtotal ). I'm not sure if it will work or if it will need further adjustments.
Related
So I was able to create a search that shows historical unit rates at an item level then I can filter by customer to show any price increases that may have taken place to create a price tracker. It works as advertised. Below is a screen shot of what the output is. "Base Price" is the minimum item rate for lifespan since we transitioned to NetSuite. Then 1-6 months back it will pull the item rate and as you can see, around the 3rd month, it increases and shows change.
Here is how the search looks when executed
What I am attempting to do now subtract the values from the formula from the "base price" because that is at the end of the day the total impact value. Eventually I want to bring in quantity so we can see the total impact of these changes to track if we are seeing an increase or not.
EX. If base is $2 and we sell 20 a month. $40 in sales. Now we up it to $3, sales would be $60. But we want to show the $20 in increase impact instead.
Below is from the results tab to generate the above.
Here is the view from the Results Tab
Is there a way to create that calculation somehow in NS? I am almost thinking it is because I used the DECODE instead of the CASE WHEN ?
Thank you
You can generally combine supported functions; you just need to make sure that any functions applied in the Summary or Function columns are replicated in the formula. For example, your first column "Item Rate" has a Summary function or "Minimum" applied - this needs to be included in the formula, something like:
DECODE(...) - MIN({rate})
Trying to remove an item from the quote object, but cannot get order total updated.
For example, a customer adds product A ($2), and B ($3) to the cart, and then place the order.
After customer hits the place order button, I am trying to remove product B from the order.
Using the code below, I can successfully remove B from the order. But the total of the order is not updated.
$quote->getItemsCollection()->removeItemByKey($item->getId());
Say I have product B removed, then order should have a total of $2, but I checked from the order grid in backend, the total was $5.
//Try with the below code. not tested.
$quote->getItemsCollection()->removeItemByKey($item->getId());
$quote->save();
//I thing you need to remove items from order to reflect your changes in order.
foreach($order->getAllItems() as $item) {
$item->isDeleted(true);
}
Please note that this is not recommended to do things like this as per this link More details
I have to fetch the price of Lego items
http://mightyutan.com.my/batman-movie/?id_category=1413&n=100
But the challenges here are the price are split into two conditions
No discount, reflect regular price
With discount, show discounted price
How could I use ImportXML for my column to display discounted price, else regular price? I only know to capture a fixed xpath pattern
//div[#class='content_price']/span[#class='price'][1]
Also, I have display the title of the Lego set, for due to the items with no discount, total rows return from my title and price are not tally
Thanks for the help
try this if you want to use include class:
//*[contains(#class,'product-block-inner')]//span[contains(#class,'price')][last()]
or better this when you are sure class won't be changed:
//*[#class = 'product-block']//span[#class='price'][last()]
as discount is located after initial price - just get last price element for product, so it will be discount or if it's not available - initial price =)
how i could adjust the quantity on square connect API as fixed type, for example:
on Square : 10 items
And on My System: 5 items
i want to update the quantity on square to 5 , and yes, i don't know what the quantity on square so i cant use -5 and adjustment type SALE.
is there any option for Inventory Adjustment Type to make it FIXED.
Thanks
It is not currently possible to set a variation's inventory quantity to an absolute amount. You can perform the following steps as a workaround:
Use the List Inventory endpoint to identify a particular variation's current quantity.
Use the Adjust Inventory endpoint to adjust the variation's quantity by the amount necessary to match your external system. You can set the adjustment_type parameter in your request to MANUAL_ADJUST to indicate that the adjustment is not related to a sale or increase in stock.
I've submitted a feature request to the API engineering team.
When customer places an order, how to set minimum order amount?
i.e) Total amount of order not below than $500.
I know how to get total order amount. But I don't know where to place that code and where to check
sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$oOrder = Mage::getModel('sales/order')->load($sOrderId);
if($oOrder >=$500)
{
.....
}
If customer has purchased total less than $500, they won't allow to checkout at the cart.
Login as admin, then go to System->configuration, then select ‘Sales‘ from left Nav and click on ‘Minimum order amount‘.
Then select Yes from Enable dropdown, enter Minimum order amount, enter message and also enter error message that will be shown whenever the order will be less than specified amount at the shopping cart.
Thanks.
You need to change the scope of the minimum amount setting. For that you need a new module with a system.xml file that contains the same path to the minimum amount field and just changes the <show_in_store> value. Read more about this here.