Jump to content

PS8 address selection (solved)


Recommended Posts

hello everyone
in PS8 I'm trying to change the text displayed in the address change window in the BO order (I attach an image)
now it appears
10654 - VIA TARCO....
for ease of selection I would like it to appear
Alias Address - VIA TARCO....

what file should I work on?

Immagine 2025-04-09 153532.jpg

Edited by overbags
discussion resolved (see edit history)
Link to comment
Share on other sites

Hello,

Sorry, my bad. Two changes are needed and I only posted one of them

Please also replace line 71 from

 '%d- %s %s %s %s',

To

'%s - %s %s %s %s',

It now displays 0 because of that %d, which is a placeholder for a number

  • Like 1
Link to comment
Share on other sites

  • overbags changed the title to PS8 address selection (solved)

if I can ask another question
if I change an address now the system deactivates the old one and creates a new one

i have the ps_address table
i would like the system to change the old one and that's it
which file should i work on?

Link to comment
Share on other sites

Hello,

From my understanding, PrestaShop does so in order to not change the address for all the orders that use it (eg. the address for the current order will be changed, but all orders that were using the same address will still use the old address).

If you really want to change this logic, you need to edit the following file: src/Adapter/Address/CommandHandler/EditCustomerAddressHandler.php

You will need to replace line 62

if ($editedAddress->isUsed()) {

with:

if (false) {

Thus making sure that the address is always updated.

Edited by Andrei H (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...