Skip to main content

Force NEW Shipping Address

More
9 years 11 months ago #253389 by jhdesign
-- HikaShop version -- : 2.6.3

Due to nature of store, shipping address will always be different than billing.

Is there a way to force a new ship address instead of default to using billing?

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #253391 by nicolas
Replied by nicolas on topic Force NEW Shipping Address
Hi,

You would have to turn off the option "Show shipping 'same address' checkbox" in the HikaShop configuration.
Then, you want to edit the file "address_select" in the menu Display>Views and change the code:
Code:
if(empty($this->addresses)) { $js = ''; $params = new stdClass(); $params->type = $this->type; $params->address_id = 0; $params->edit = true; $params->fieldset_id = 'hikashop_checkout_'.$this->type.'_address_zone'; echo hikashop_getLayout('address', 'show', $params, $js); }
to:
Code:
if(empty($this->addresses)) { $js = ''; $params = new stdClass(); $params->type = $this->type; $params->address_id = ($this->type=='billing' ? 0 :(int)$current); $params->edit = true; $params->fieldset_id = 'hikashop_checkout_'.$this->type.'_address_zone'; echo hikashop_getLayout('address', 'show', $params, $js); }
and that the code:
Code:
<?php if($this->type=='shipping') $this->addresses = null; ?>
at the top of the view file and that should do it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum