2

I want to move discount div to below the shipping method div. I tried it with xml. I tried it to move like this : <move element="checkout.discount" destination="checkout.cart.methods" after="checkout.cart.methods.onepage.bottom"/> But it is not working.

Situation : Right now discount section is below the payment method and right side. It is default view.

What exactly I want : I want discount section below the shipping method. It will be middle of the page.

1

For this you have to use jQuery. I think xml move tag is not working for this.

Go to

onepage.phtml

file and put this code at the end of the file

<script type="text/javascript">
//<![CDATA[
 require([
    'jquery'
], function($) {
    setTimeout(function() {
        $( "#iwd_opc_discount" ).insertAfter( "#onepage-checkout-shipping-method-additional-load" )
      }, 2500);
   }
 );
//]]>
</script>

Suppose #iwd_opc_discount is your discount div id.

#onepage-checkout-shipping-method-additional-load is your shipping div id.

Edited : XML is also working for it. @ravi soni's link is also working.

| improve this answer | |
  • This is work for me. Thanks buddy. – Ronak Jun 21 '19 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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