In my development Magento Store I have two shipping methods .. Flat rate and USPS

But there is one condition if logged in user pass that condition I have to remove all the allowed methods and only allow free shipping option as shipping method.

In other case free shipping method will not show to user as option.

Please help.

1 Answer 1


To accomplish this without any code written use the cart promotional rules.

  1. Create a new Cart rule
  2. Apply to the Logged in customer group
  3. Under actions apply free shipping to For shipment with matching items

You might need to tweak here and there to get the rule to apply but this should basically it.

If this doesn't work for you another quick option would be to make some sort of check in the rontend/base/default/template/checkout/onepage/shipping_method/available.phtml while it's looping through the available options.

Enable free shipping in the backend and then check if the current user is logged in using


If logged in skip all shipping methods except free shipping if not logged in display the other methods.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.