Jump to content

Hide Shipping Price (which always shows free) before the Shipping carrier step


Mian Waqas

Recommended Posts

Hi,

I have a question regarding Free shipping, as you all know that it always shows Free (because it is selected by default in back office carriers) until it has been changed in carrier selection step.

so what I need guidance on is that I want to hide the shipping cost until "shipping method" step in check out. (or possibly if it says "To be calculated on next step" )

here is the cartpresenter.php code , which i guess shall need modifying ?

 if (isset($deliveryOptionList) && count($deliveryOptionList) > 0) {
                foreach ($deliveryOptionList as $option) {
                    foreach ($option as $currentCarrier) {
                        if (isset($currentCarrier['is_free']) && $currentCarrier['is_free'] > 0) {
                            $shippingDisplayValue = $this->translator->trans('Free', [], 'Shop.Theme.Checkout');
                            break 2;

 

Will be great full with a Cup

Best Regards

Edited by SMTmardan (see edit history)
Link to comment
Share on other sites

So, you have a shipping cost? But only want to show the shipping cost as soon as they select one of the multiple shipping methods?

If so, I suppose you can use JavaScript to hide it untill you need it in the checkout process:

Tip, use the js-current-step class combined with the checkout-delivery-step id (see image)
 

Screenshot 2022-02-28 at 14.40.18.png

Link to comment
Share on other sites

1 hour ago, Nickovitshj said:

So, you have a shipping cost? But only want to show the shipping cost as soon as they select one of the multiple shipping methods?

If so, I suppose you can use JavaScript to hide it untill you need it in the checkout process:

Tip, use the js-current-step class combined with the checkout-delivery-step id (see image)
 

Screenshot 2022-02-28 at 14.40.18.png

Thanks for replying,

i am not good at JS :( need further guidance please.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...