I'm looking for a way to change the subtotal before grandtotal in checkout and cart.
I want to hide the discount amount and add this to the final subtotal like this:
Current View:
Produkt #1 Price(10$) qty(2) subtotal(20$)
_____________________________
Subtotal 20$
discount -5$
shipping 5$
tax 0$
grandtotal 20$
What I want
Produkt #1 Price(10$) qty(2) subtotal(20$)
_____________________________
Subtotal 15$
shipping 5$
tax 0$
grandtotal 20$
I hope someone can help me with this.
Use observer, You must recalculate all value and save.
Related
Offers FREE SHIPPING only to products with a product attribute (in_stock) to YES and the subtotal of such items must be greater than $99. Rules apply to matching items only.
For example,
item A $80 in stock
item B $20 in stock
Results: FREE SHIPPING
item A $80 in stock
item B $20 in stock
item C $30 out of stock
Results: SHIPPING COST FOR ITEM C ONLY
item A $100 in stock
Results: FREE SHIPPING
item C $30 out of stock
item A $80 in stock
RESULTS: SHIPPING COST FOR BOTH item A and C.
hi please make this type rules for this functionality, you change just use product attribute 'stock-availability' in condition with sku-id's.
you will check rules here:-
https://www.dropbox.com/s/7t8c5qiznkjgz13/Free%20Shipping%20for%20Single%20Product%20Using%20Shopping%20Cart%20Price%20Rules.docx?dl=0
magento i need to apply discount 20% for the total if above 50euros but not to the discounted items if customers selects some already discounted items that should not include in the total can any one help
Thanks in advance
You need to create a custom module or say shopping cart price rule and an event observer to check whether the "special price" is zero or not. If it is "Zero" that means it is not a already discounted product or you can even check the "final price" with the "price" , if the final price is lesser than price it is already discounted.
If these conditions are satisfied get the prices of remaining products prices and discount them then add the already discounted products price to make the total amount.
I hope You understood this concept and write your own module.
you have to use a check in view page.
for example
$price = $product->getPrice();
$specialprice = $product->getFinalPrice();
if(!empty($specialprice)){
//then your price would be same
}
elseif(empty($specialprice)){
then price would be = $price*20/100;
}
hope this would help you and don't forget to like if it was helpful
How can I get the discount applied on cart line item individually?
Is this possible to get total unit price after applying discount?
To discount applied on cart line item you can use
$item->getDiscountAmount();
To calculate the price subtracting the discount amount $item->getDiscountAmount(), use below
$price = $item->getPrice() - $item->getDiscountAmount();
This will give you the total unit price after discount.
The prices are including VAT Tax. The VAT % applied is based on the delivery address. When the delivery country is changed and the VAT % changes, the the amount incl. tax is changed.
For example:
An amount of 0.79 euro is calculated as tax which corresponds with a delivery adress in the Netherlands. 19% Vat is applicable.
Price ex VAT 4.94/1,19=4,15
VAT Amount = 4,15*0,19=0,79
This is working fine.
When a change the delivery date to the country Belgium, where the VAT is 21%
Then the all the amount including tax is increaded. This should not happen as we choose use prices including tax.
The calculation thats is made by Magento is based on the price excel tax when 19%
Dutch VAT was applicable and then applied 21 Belgian VAT:
Price EX VAT: 4,15 = wroing amount has not been recalculated
Belgian VAT Amount = 4,15*,21= 0.87 = wrong amount
The correct calculatio should be:
Price ex VAT 4.94/1,21= 4,08 = correct price excl 21% tax
VAT Amount = 4,08*0,21= 0,86 = correct 21% VAT Amount
Total price = 4,94 incl. VAT
For Belgium i get this price 5,02 and it should be 4,94.
Desired Outcome:
The amount incl tax should stay the same regardless of the VAT% applied.
How can i fix this.
In fact i don't think your reasoning is good.
i explain:
the base price value of the product is it VAT free value.
For a given country, the product is applied a VAT to comply with country VAT related rates.
For wathever country you deliver the product, what changes is VAT but not product base price value , otherwise you'll loose some margin.
Say:
product A VAT Free price is : 100 and you bought it 80 (20 eur margin)
VAT for Netherlands is 19 : Taxed price for Netherlands => 119
VAT for Belgium is 21 : Taxed price for Belgium => 121
Wanting to keep 119 for Belgium would make loose you 2 euros ,since you would have virtually sold it for 98.
If that's really what you want to do : ie , flat price whatever VAT Rate is applide ,Then a "trick" might be to create customer groups based on their country & used tier pricing to reduce product base price in order to maintain VAT rate independent taxed price. (which i wouldn't recommend)
I'm trying to rewrite a template for the cart.
I need to retrieve the discount amount but I was not able to find where.
Ie If my coupon code gives me $10 discount I want to retrieve 10, if I have a discount of 5% I want to retrieve 5 if the total price is $100.
Thank you.
you can debug your object by printing it out and observing what values it contains
print_r($this->getQuote()->getData());
I used the following code to access discount price. I was accessing the details of last order in a phtml file. For the last order if there was a discount coupon used then I used following code to access the Discount Amount.
$lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order=Mage::getModel('sales/order')->loadByIncrementID($lastOrderId);
if($lastOrderId) //If order was placed then only display coupon code
{
$coupon=$order->getCouponCode();
echo "<b>Discount coupon used during order:</b>".$coupon;
$disAmount=$order->getDiscountAmount();
echo "<br/>Discount Amount: ".$disAmount;
}