Jump to content

i need help for address custom in bo order page


Recommended Posts

I want to add descriptive words to the beginning of the address lines in the orders section. for example, "Phone:"=5xxxxxxxx at the beginning of the phone line. I need the tax number and the name of the tax office in my country, so I set the 2nd address line as a text where the tax office can be entered.

3.PNG

Link to comment
Share on other sites

Hi @Mehmet Ekiz

If you need and ask in English, you need to give screenshots written in English.

You can make a modification in the file ./src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/customer.html.twig

Example before:

          {% for line in orderForViewing.invoiceAddressFormatted|split("\n") %}
            <p class="mb-0">{{ line }}</p>
          {% endfor %}

 

Example after:

          {#** % for line in orderForViewing.invoiceAddressFormatted|split("\n") %}
            <p class="mb-0">{{ line }}</p>
          {% endfor % **#}
          <p class="mb-0">{{ 'Name'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.firstname  }} {{ orderForViewing.invoiceAddress.lastname  }}</p>
          <p class="mb-0">{{ 'Company'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.companyName  }}</p>
          <p class="mb-0">{{ 'VAT'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.vatNumber  }}</p>

 

The values for Invoice address are "orderForViewing.invoiceAddress.xx"

  • addressId

  • firstName

  • lastName

  • companyName

  • vatNumber

  • address1

  • address2

  • cityName

  • stateName

  • countryName

  • postCode

  • phoneNumber

  • mobilePhoneNumber

  • dni

 

 

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

there was no changethere was no change

3 hours ago, ps8modules said:

Hi.

You can make a modification in the file ./src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/customer.html.twig

Example before:

          {% for line in orderForViewing.invoiceAddressFormatted|split("\n") %}
            <p class="mb-0">{{ line }}</p>
          {% endfor %}

 

Example after:

          {#** % for line in orderForViewing.invoiceAddressFormatted|split("\n") %}
            <p class="mb-0">{{ line }}</p>
          {% endfor % **#}
          <p class="mb-0">{{ 'Name'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.firstname  }} {{ orderForViewing.invoiceAddress.lastname  }}</p>
          <p class="mb-0">{{ 'Company'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.companyName  }}</p>
          <p class="mb-0">{{ 'VAT'|trans({}, 'Admin.Orderscustomers.Feature') }}: {{ orderForViewing.invoiceAddress.vatNumber  }}</p>

 

The values for Invoice address are (orderForViewing.invoiceAddress.xx):

  • addressId

  • firstName

  • lastName

  • companyName

  • vatNumber

  • address1

  • address2

  • cityName

  • stateName

  • countryName

  • postCode

  • phoneNumber

  • mobilePhoneNumber

  • dni

 

 

there was no change. I guess I didn't understand, "Address:" in front of the address block 
I want to write

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...