- Posts: 32
- Thank you received: 0
Force NEW Shipping Address
9 years 11 months ago #253389
by jhdesign
Force NEW Shipping Address was created 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?
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.
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:
to:
and that the code:
at the top of the view file and that should do it.
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);
}
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);
}
Code:
<?php if($this->type=='shipping') $this->addresses = null; ?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds