Payment and delevery adress

  • Posts: 145
  • Thank you received: 1
9 years 5 months ago #204992

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.10

HI there

How come, when i change my deleveryadress is come in the payment section to?

How do i do so it will not do that?

Best regards
Brian


Best regards
Brian

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #204999

Hi,

Yes indeed, when adding an address in the billing or in the shipping address part it adds the address to the other address type.
This is the way the system is working. To change this behavior it will require custom code, or you can potentially play with the address display settings and some css rules.

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

  • Posts: 145
  • Thank you received: 1
9 years 5 months ago #205106

Thanks Xavier

I get to dig into the code.


Best regards
Brian

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

  • Posts: 250
  • Thank you received: 7
9 years 5 months ago #205881

I've just run up against this one. I want my customers to be able to add alternative delivery addresses but they shouldn't be offered that as an alternative billing address. I don't think I've ever come across a shopping cart that offers alternative billing addresses, it's a security issue surely?

The way I expected it to work ...

  • The billing address is the address the customer registered with and it should only be possible to change this by changing your registration.
  • Optional delivery addresses can be added and selected at checkout.

How can this be done?

Thanks,

Ian

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

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

Hi,

I don't see why it would be a security issue.
Moving to another place and having a new billing address is a security issue ?
Or having two houses and changing the billing address based on where you want to be billed is a security issue ?

But why not. Edit the file "address_select" and add the code:
if($this->type=='billing') $this->addresses = array(reset($this->addresses));
before the first instance of the code:
foreach($this->addresses as $address) {
and that should do it if you're using the "list" address selector (as it is by default).

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

  • Posts: 145
  • Thank you received: 1
9 years 5 months ago #206007

Will this code be in the next update of Hikashop?


Best regards
Brian

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

  • Posts: 250
  • Thank you received: 7
9 years 5 months ago #206012

Hi Nicolas,

It's generally considered a security risk if billing and delivery addresses are different, if someone got hold of your credit card details they could use your card and address but have goods delivered to themselves at another address. However there are circumstances where having a different delivery address is necessary, we have customers who order from their business, at one address, but request goods be delivered to a studio they are using.

Also the billing address has to be the same as your bank account address when paying by card, otherwise the bank security checks will fail, so it shouldn't be possible to randomly change the billing address.

If a customer moves address then they edit their account details and change their registered address.

I'll try the code you suggest, if that limits the billing address to just the registered address it will do what I need.

Thanks,

Ian

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

  • Posts: 145
  • Thank you received: 1
9 years 5 months ago #206016

I have tryed this and it do not work.
Where is the code wrong?
It is in the file checkout / address_select.php

if($address_selector == 1) {
if(!empty($this->addresses)) {
if($this->type=='billing') $this->addresses = array(reset($this->addresses)); /*Added 2015 jun 24 */
foreach($this->addresses as $address) {
$checked = '';
if($address->address_id == $current)
$checked = ' checked="checked"';
if($config->get('auto_submit_methods', 1) && empty($checked))
$checked = ' onclick="this.form.submit();return false;"';


Best regards
Brian

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

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

Hi,

As it is a view override, you won't loose it when you update so it should not be a problem for you.

As I said in my previous message, the code to change is for when you're using the "list" address selector. If you use another selector (to be configured in the Checkout tab of the HikaShop configuration) you won't see the change. Also, you need to edit the view for the correct template you're using on your frontend.

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

  • Posts: 250
  • Thank you received: 7
9 years 5 months ago #206090

That code change didn't work for me either, using the list setting.

The nearest I can get to how I'd like it to work is by using the drop down list address selection and hiding the drop down for the billing address (using display:none) so the billing address can't be changed. It also means I don't get a "New" button under the billing address which would be confusing.

The only slight issue I have is that when I add a new address on the delivery side using the drop down I can save it, but it isn't selected, I have to go back into the drop down to select the address I've just entered. I can see customers thinking the address they've entered has just disappeared.

Ian

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

  • Posts: 145
  • Thank you received: 1
9 years 5 months ago #206122

I am using the "List" setting, unforturnally is not doing the work.


Best regards
Brian

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #210323

Hi,

The Nicolas' patch should work.
Now if you don't explain what exactly "is not doing the work" means ; what is your result, etc ; it is more than difficult to understand and to propose you something else ; like forcing to display only the selected address and skip the others.
But for my point of view I don't understand the goal of such kind of patch because the user can still manage his addresses in his user control panel and define his default address (which will be selected by default for his new orders). So removing the selection of the billing address means that you force the users to go in the user control panel if he want to have a different billing address.

About the point

Will this code be in the next update of Hikashop?

No, we can't add such kind of modification in the HikaShop core because it will generate issue for all other HikaShop users ; like explained just before.

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.

Time to create page: 0.093 seconds
Powered by Kunena Forum