Magento 2 - Estimate Shipping and Tax cart does not calculate or include my custom shipping method's rate - cart

I have used a custom shipping method and when you go to the Estimate Shipping and Tax cart, my custom shipping method 'rate' is not being added into the Order Total.
As you can see the image below.
estimate-shipping-tax-cart
When I select my shipping method, the rate is shown as 0.00
But for Flat Rate the rate is being calculated properly.
estimate-shipping-tax-cart-with-flat-rate
I would like to know how to fix this and why it's happening like that.

Please check all your files once,
Try to create your custom shipping method using this https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/
that might help you.
I have created using this referance and it works fine.

Related

which ajax function called and changes vaue on selection of custom option to change total price in magento

When we select custom options total price is calculated in product.js. I want to know where these functions are called for making changes for total price other than product.js. I am new to magento. Will be thankful for help.

Moving the Shipping Calculation to the Totals Block

We have a requirement to move the shipping calculation block to the totals block.
Basically we have 2 options when the cart page loads up:
1) When shipping is set, present the shipping rate normally.
2) When shipping is not set, present the html and form to post a shipping request.
Issue is, the shipping block inside the totals block is not rendered when there is no shipping price so we moved the html of the shipping calculation inside the totals block. Problem with that is, that the sales tax is shown BEFORE the shipping which obviously is incorrect.
As far as I see it, the only option we have is to create a new total block, for instance "calculate_shipping" and call it only when there is no shipping rate. This total block will have no real "total" value but just bare HTML with the form post.
Your thoughts and suggestions are appreciated. I'm hoping there is a better way.
There are a couple of modules out there that might help:
http://www.rapidcommerce.eu/blog/2012/04/allways-show-shipping-costs-in-magento/
and
https://github.com/integer-net/Autoshipping

Magento - edit custom priced configurable product in cart

i got a problem with a magento extension(currently for 1.8.1):
I have products in my cart.
Therefore I can choose a gift and add it for free into the cart (via observer the priced is set to 0)
BUT here the problem: if the gift is a configurable product i want to set the options. After editing the product the price is set to the original-price again.
How can i keep the gift-price?
greetz,
Florian
Several ways to accomplish this, but the probably easiest (and cleanest) is via a custom total model.
Here is a description, somewhat dated but should be enough to get you started.
Just make sure your total model is calculated after the subtotal model so your quote item price adjustment sticks.
You will also want to pay attention to whether or not you want your total model to be calculated before or after the tax total model.
How do I get quote totals before saving payment method?

Magento change shipping price when create order

I'm create order programmaticaly, and all works fine. But i need to change shipping price. I try to:
$shippingAddress->setCollectShippingRates(true)->collectShippingRates()
->setShippingMethod('flatrate_flatrate')
->setShippingAmount('200')
->setBaseShippingAmount('200')
->setPaymentMethod('checkmo');
But in admin it still shows Shipping & Handling InformationFlat Rate - Fixed €12,230.00
If you need to change the shipping price for all your orders, best way to do it is to change the config on the admin panel: System->Configuration->Shipping Method->Flat Rate, the Price field.
If this is something you need for different orders, the best way to do it is to create custom shipping methods. You can see Magento's guideline to do so, or this other article which is also nice.

Google Checkout Per Item Flat Rate and By Weight In Same cart

Im am setting up some Google Add to Cart buttons and am having trouble calculating proper shipping. My entire store has items that have product-weight classes to calculate the shipping. The shipping table is retrieved from Merchant Center.
I have one item that needs to have flat rate shipping, so it has a product-shipping-first and product-shipping class. When this item is in the cart with any other products the flat rate shipping overrides the entire cart and the customer is only charged the flat rate shipping.
I want the cart to calculate like PayPay does by default. It calculates all the by weight products, then adds the flat rate on top of that total.
Please note that submited shipping instructions in the posted shopping cart will take precedence over the Merchant Center, thus settings in the Merchant Center are ignored.
In your case, using the product-shipping class will create a "shipping-methods" tag in the shopping cart XML, thus overriding the Merchant Center shipping instructions. Try to find a way to use one or the other.
Some shipping troubleshooting hints here:
https://developers.google.com/checkout/articles/Troubleshoot_Merchant_Issues

Resources