質問

I want to show shipping method base on total product weight.

I have 2 Shipping method A and B.

If total shipping weight equal or less than 150. Then will show shipping method A

If total shipping weight greater than 150. Then will show shipping method B.

Anyone can explain how to apply shipping method condition total product weight wise?

役に立ちましたか?

解決

In collectRates function of specific shipping method, add logic to check weight of cart item.

For example, in collectRates method of shipping method A, add following logic. // Add logic to calculate cartweight if ($cartweight > 150 ) { return false; }

他のヒント

thankyou for your suggestion. this is a very good suggestion.

add condition in app/code/Ests/EchoShipping/Model/Carrier echoshipping.php

add a condition in collectRates method

$weight = $request->getPackageWeight(); if ($weight < 50 ) { return false; }

I got success.

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top