How to restrict onepage checkout to not load address same as billing when select “Ship to different address” on frontend?

magento.stackexchange https://magento.stackexchange.com//questions/59514

  •  12-12-2019
  •  | 
  •  

Question

I am using Magento 1.9.1 and using IWD onepage checkout. On checkout page, when I fill in billing address information and then decide to ship on different address, by unchecking the "Ship to this address" checkbox, it displays Shipping address form and it's fields are filled with the information filled in the billing address form above. As you can see the examples below,

enter image description here

and when I uncheck the "Ship to this address", it display shipping address form filled with the same address as billing:

enter image description here

I don't want to load the same billing address information in the Shipping address when I uncheck the "Ship to this address".

How can I restrict to fill the fields automatically ? where to make changes ? whether to the controller or phtml to edit ?

Tried a lot but couldn't find where it is filling in the information into the Shipping address fields. I am a beginner at magento, any kind responses would be appreciated. Thanks.

Was it helpful?

Solution

As always, answering my own question :

1)Remove or comment out the function “pushBilingToShipping()” in:

skin\frontend\base\default\js\iwd\opc\checkout.js

2)Also comment: “if(!skip_copy) this.pushBilingToShipping();”

3)then in: IWD\Opc\controllers\IndexController.php

inside: initDefaultAddress()

comment or remove: “if (!$this->getOnepage()->getQuote()->isVirtual())” clause with statements.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top