change address options on hikashop checkout

  • Posts: 57
  • Thank you received: 4
9 years 6 months ago #203236

Hi,

I need your help.

In my checkout I have to diferent sides to change the address.
One for billing and another for shipping.

But I need to do some changes and I don't found the place.
I have maked some changes on diferent views of checkout address and I need some help to do some changes.
At this moment I have this:



One of this box on billing side and another to shipping.
The changes that i need are:
  1. Remove the select from billind side. I want only the box with the unique billing address that the customer have.
  2. Remove the edit box from both sides (billing and shipping). Like I have in this picture. I want to remove this option. The customer only can select or create. I don't want permission to him to edit or delete addresses.

This changes it's only in checkout process (select addresses).

Thanks for your help.
Regards

Attachments:

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #203277

Hi,

The views are : "checkout | address_selector". and "address | show"

If you want to change the address selector, you have an option in the HikaShop configuration ; where you can choose between 3 different modes.
Depending the mode, the selection is different and the checkbox is not used.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 57
  • Thank you received: 4
9 years 5 months ago #203419

Hi, yes I know that we can do some changes in this views, but the problem it's because I don't want to change in the both sides, but only in Billing side.

I don't want that the customers change something in the billing side, and I want to let them to only select an option in the shipping side or add a new one, but don't delete or edit the addresses.

I know that I can edit here the select (address_select.php):

echo JHTML::_('select.genericlist', $values, 'hikashop_address_'.$this->type, 'class="hikashop_field_dropdown" onchange="window.localPage.switchAddr(this, \''.$this->type.'\');"', 'value', 'text', $current, 'hikashop_checkout_address_'.$this->type.'_selector'); ?>

But if I blocked for example this for ($this->type == "billing") after that, if i try to change the address in select of the shipping side, don't let me and show me an message saying that i need to add a new address.

But I only want to remove the select options from billing side, and (edit and delete) options from both sides.

Can you show me some examples, or explain more especific please where I can change without damage something?

Last edit: 9 years 5 months ago by rfernandes.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 5 months ago #203475

Hi,

How about simply adding some simple CSS to hide the select for the billing address:
#hikashop_checkout_billing_address_selection select{ display: none; }

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

  • Posts: 57
  • Thank you received: 4
9 years 5 months ago #203535

Hi,

I've thought about it, but isn't an option because if you after try to view a source code, you can turn off that CSS option and the visitor can view that again and make some changes that I don't wan't to let him do that.

I only wan't to let him to see the billing address, and choose the shipping address.
I wan't this options because all the addresses come from one webservice and display in the shipping address.
After that, the customer choose one address of this list and if the address isn't inserted before in Hikashop that address will be insert to get a ID for all work great.

Because we have a billing application where the customer can order directly from the store or order by phone, and we have clients with a lot of addresses.
So isn't necessary to add all of them on hikashop, but only the addresses that the customers use, because we need to insert them to stay in the history of orders and other stuffs.
So the customer choose an address, the function see if the address exists in hikashop or not, and if exists, get the ID and continuous normaly, if not, insert the address, get the ID and continuous normally to, and it's because this, that i wan't to hide this blocks because we don't want to let the customer to change the billing address or insert a lot of addresses that never use in orders from web.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 5 months ago #203565

Hi,

Then, the change in address_select is the way to go.
Try with such code:

if($this->type=='billing'){
$a = reset($this->addresses);
 echo '<input type="hidden" value="'.$current.'" name="hikashop_checkout_address_'. $this->type.'_selector" />';
}else{
echo JHTML::_('select.genericlist', $values, 'hikashop_address_'.$this->type, 'class="hikashop_field_dropdown" onchange="window.localPage.switchAddr(this, \''.$this->type.'\');"', 'value', 'text', $current, 'hikashop_checkout_address_'.$this->type.'_selector'); ?>
}

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

Time to create page: 0.069 seconds
Powered by Kunena Forum