- Posts: 103
- Thank you received: 7
Turn off "Address is also a billing address" in new address creation
8 years 4 months ago #295869
by jsyaruss
-- url of the page with the problem -- :
www.stutteringtherapyresources.com
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.0.30
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : no error message
Hello - I would like to hide / turn off the checkbox on the new address form for "Address is also a billing address" or "Address is also a shipping address."
The multiple addresses that this creates causes confusion or my customers, all of whom have only one shipping and one billing address (and most of the time, those are the same).
I've figured out how to have it default to the shipping and billing addresses being the same - that is great. But, in those cases where they do need to enter a different shipping address, I'd like it to not display that checkbox after the address entry.
I can't figure out what view that is on or what code I have to comment out, though.
Help? Thank you.
Scott
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.0.30
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : no error message
Hello - I would like to hide / turn off the checkbox on the new address form for "Address is also a billing address" or "Address is also a shipping address."
The multiple addresses that this creates causes confusion or my customers, all of whom have only one shipping and one billing address (and most of the time, those are the same).
I've figured out how to have it default to the shipping and billing addresses being the same - that is great. But, in those cases where they do need to enter a different shipping address, I'd like it to not display that checkbox after the address entry.
I can't figure out what view that is on or what code I have to comment out, though.
Help? Thank you.
Scott
Please Log in or Create an account to join the conversation.
8 years 4 months ago #295871
by nicolas
Replied by nicolas on topic Turn off "Address is also a billing address" in new address creation
Hi,
To check which view file it is, you can activate the "display view files" setting in the HikaShop configuration.
You'll see it's the view file "show_block_address".
There you have that code:
To check which view file it is, you can activate the "display view files" setting in the HikaShop configuration.
You'll see it's the view file "show_block_address".
There you have that code:
Code:
<input type="hidden" name="data[address_selecttype_<?php echo $this->step . '_' . $this->module_position; ?>]" value="1" />
<label><input type="checkbox" checked="checked" name="data[address_bothtypes_<?php echo $this->step . '_' . $this->module_position; ?>]" value="1"> <?php
$other = ($this->options['new_address_type'] == 'billing') ? 'shipping' : 'billing';
echo JText::_('HIKASHOP_ALSO_'.strtoupper($other).'_ADDRESS');
?></label>
The following user(s) said Thank You: jsyaruss
Please Log in or Create an account to join the conversation.
8 years 4 months ago #295899
by jsyaruss
Replied by jsyaruss on topic Turn off "Address is also a billing address" in new address creation
EXCELLENT! Thanks for this. I was able to remove that bit of code and now it works exactly as I wanted...
EXCEPT for one minor thing.
When I return to the page with the billing and shipping addresses after entering a new address, the system requires me to press NEXT twice to move on to the shipping page.
If I don't enter a different billing/shipping address or if I select addresses from the drop-down menu, then it only requires me to press NEXT once (as it should).
I'm unable to figure out why it requires me to select NEXT twice when I enter a new address. Help?
Again, thanks.
Scott
EXCEPT for one minor thing.
When I return to the page with the billing and shipping addresses after entering a new address, the system requires me to press NEXT twice to move on to the shipping page.
If I don't enter a different billing/shipping address or if I select addresses from the drop-down menu, then it only requires me to press NEXT once (as it should).
I'm unable to figure out why it requires me to select NEXT twice when I enter a new address. Help?
Again, thanks.
Scott
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
8 years 4 months ago #295933
by Mohamed Thelji
Replied by Mohamed Thelji on topic Turn off "Address is also a billing address" in new address creation
Hello Scott,
Thank you for your feedback, the solution will just be to edit the code of your "show_block_address" file of the "checkout" view of your front-end template, and change these lines :
By :
Thank you for your feedback, the solution will just be to edit the code of your "show_block_address" file of the "checkout" view of your front-end template, and change these lines :
Code:
echo $this->fieldClass->display(
$field,
@$this->edit_address->$fieldname,
'data[address_'.$this->step . '_' . $this->module_position.']['.$fieldname.']',
false,
' class="hkform-control" ' . $onWhat . '="window.hikashop.toggleField(this.value,\''.$fieldname.'\',\'address_'.$this->step . '_'.$this->module_position.'\',0,\'hikashop_checkout_\');"',
false,
$this->cart_addresses['fields'],
$this->edit_address,
false
);
?>
</div>
</div>
<?php
By :
Code:
echo $this->fieldClass->display(
$field,
@$this->edit_address->$fieldname,
'data[address_'.$this->step . '_' . $this->module_position.']['.$fieldname.']',
false,
' class="hkform-control" ' . $onWhat . '="window.hikashop.toggleField(this.value,\''.$fieldname.'\',\'address_'.$this->step . '_'.$this->module_position.'\',0,\'hikashop_checkout_\');"',
false,
$this->cart_addresses['fields'],
$this->edit_address,
false
);
?>
</div>
</div>
<input type="hidden" name="data[address_selecttype_<?php echo $this->step . '_' . $this->module_position; ?>]" value="1" />
<?php
The following user(s) said Thank You: jsyaruss
Please Log in or Create an account to join the conversation.
8 years 4 months ago #295943
by jsyaruss
Replied by jsyaruss on topic Turn off "Address is also a billing address" in new address creation
SUPERB! That did it exactly.
Thank you again for your excellent and quick service!
Scott
Thank you again for your excellent and quick service!
Scott
Please Log in or Create an account to join the conversation.
8 years 4 months ago - 8 years 4 months ago #295954
by Philip
Replied by Philip on topic Turn off "Address is also a billing address" in new address creation
Hello,
Happy to see your satisfaction !
If you want to support us other than simply being our customer, remember that you can express yourself on the Joomla Extensions Directory , this will help us a lot !
Best regards
Happy to see your satisfaction !
If you want to support us other than simply being our customer, remember that you can express yourself on the Joomla Extensions Directory , this will help us a lot !
Best regards
Last edit: 8 years 4 months ago by Philip.
Please Log in or Create an account to join the conversation.
8 years 4 months ago #295965
by jsyaruss
Replied by jsyaruss on topic Turn off "Address is also a billing address" in new address creation
oh, sure thing. will do! Thanks again.
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds