app/code/local/Df/Mods/Model/Sales/Quote/Address.php:
class Df_Mods_Model_Sales_Quote_Address extends Mage_Sales_Model_Quote_Address { public function getSameAsBilling () { return true; } }
app/code/local/Df/Mods/etc/config.xml:
<?xml version="1.0" encoding="utf-8"?> <config> <modules> <Df_Mods> <version>0.1.0</version> <depends> <Mage_Sales/> </depends> </Df_Mods> </modules> <global> <models> <sales> <rewrite> <quote_address>Df_Mods_Model_Sales_Quote_Address</quote_address> </rewrite> </sales> </models> </global> </config>
2) Перекройте диалог Billing Information следующим образом (перекрывать лучше не хакая тему default/default, а в своей теме; ниже это тема df/default):
app/design/frontend/df/default/template/checkout/onepage/billing.phtml:
было:
<?php if ($this->canShip()): ?> <li class="control"> <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li> <li class="control"> <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label> </li> <?php endif; ?> </ul> <?php if (!$this->canShip()): ?> <input type="hidden" name="billing[use_for_shipping]" value="1" /> <?php endif; ?>
стало:
</ul> <input type="hidden" name="billing[use_for_shipping]" value="1" />