Jump to content

[SOLVED Bug PS1.4.10] In order shipping, problem with addresses display when extra address updated


Recommended Posts

I found a bug on PS1.4.10

I did a bug report here:

http://forge.prestas...owse/PSCFI-7157

 

Here is the detail.

 

 

This bug is present in PS1.4.10

Been tested both in local and in a server with a plain version installation.

This bug was not present in PS1.4.25

To better explain this bug I will describe an example...

  • A customer adds a product to his cart then creates an account with an address 'address1'
  • he arrives on the order-address page and decides to have different billing and shipping addresses
  • he un-checks 'Use the same address for billing'
  • he then clicks on the button 'Add a new address'
  • he arrives on the address page and create the new address 'address2'
  • he clicks on the 'Save' button and is back to order-address
  • he then chooses 'address2' as shipping address and 'address1' as billing address
  • he notices he made a mistake and want to modify this new address 'address2'
  • he clicks on the link 'Update' located under the shipping address
  • he arrives on the address page where he can modify this address
  • he clicks on the button 'Save' and is back on the order-address page
  • unfortunately something went wrong...

1st bug -> The box 'Use the same address for billing' is checked

2d bug -> If un-check again 'Use the same address for billing', billing and shipping addresses are inverted

I tried to find a solution but couldn't find any

 

 

Any help would be greatly appreciated !

 

Loic

Edited by cactusman2 (see edit history)
Link to comment
Share on other sites

It seems to be related to cookies.

I have checked around and I have added {debug} to my order-address.tpl to see how the cookies change

The first address I have created during the registration process has for id 8525

I then have created a new address (id 8526) from the order-address page

 

Case 1: delivery address = 8525 and invoice address = 8526 and I update delivery address

$cart->id_address_delivery = 8525

$cart->id_address_invoice = "8526"

The input is un-checked and everything is normal, modification is applied

 

Case 2: delivery address = 8525 and invoice address = 8526 and I update invoice address

$cart->id_address_delivery = "8525"

$cart->id_address_invoice = 8525

BUG: the input is checked however when I un-check the input I can see that modification is applied

 

Case 3: delivery address = 8526 and invoice address = 8525 and I update delivery address

$cart->id_address_delivery = 8525

$cart->id_address_invoice = "8525"

BUG: the input is checked however when I un-check the input I can see that modification is applied on the address 8526 however the delivery and invoicing address are inverted

 

Case 4: delivery address = 8526 and invoice address = 8525 and I update invoice address

$cart->id_address_delivery = "8526"

$cart->id_address_invoice = 8525

The input is un-checked and everything is normal, modification is applied

 

Conclusion:

It's only when you modify the default address (the first address you give when you register) than everything works.

When you modify an address you added the bug appears

Link to comment
Share on other sites

I found a solution.

Hopefully it won't have any bad impact on the rest of the shop

 

You have to modify classes/Address.php

- Comment function update and function _cleanCart around line 155 and 160

- Comment

&& self::_cleanCart((int)$this->id)

in function delete near line 180

 

Hope it will be helpul

Edited by cactusman2 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...