Need to suppress the shipping calculator in the checkout process since I have Free Shipping

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
In my customer roles, I have set up all "Registered" members to have free shipping.  Additionally, I have set it up so that each product has the "Free Shipping" checkbox selected.  My problem is that the shipping estimator still appears on the order summary page.  Is there a way to hide this in the Admin tool?  If I'm doing free shipping for all my products, there's no need to have the estimator.  As a quick fix, I've commented out the code in the View, but would rather not do it that way.  Thanks!
Il y a 12 ans
Go to admin area > Configuration > Settings > Shipping settings. Untick "Estimate shipping enabled". But this will disable it for all users
Il y a 12 ans
You can also change the source code in order to disable it only for registered customers:
1. Open \src\Presentation\Nop.Web\Controllers\ShoppingCartController.cs file
2. Find PrepareShoppingCartModel method
3. Replace
model.EstimateShipping.Enabled = cart.Count > 0 && cart.RequiresShipping() && _shippingSettings.EstimateShippingEnabled;

with
model.EstimateShipping.Enabled = cart.Count > 0 && cart.RequiresShipping() && _shippingSettings.EstimateShippingEnabled && !_workContext.CurrentCustomer.IsRegistered();

4. Recompile the solution
Il y a 12 ans
thanks!  Would I be able to enable the shipping estimator only for a non-system customer role that I defined?  I navigated to the code, and I see that in the Intellisense, if I type:

!_workContext.CurrentCustomer.

There is a "CustomerRoles" collection.  Is that populated with the all the roles for me to check against?
Il y a 12 ans
JVandy wrote:
Is that populated with the all the roles for me to check against?

Yes
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.