Post by septero » Wed Feb 21, 2024 8:16 am

Hi,

On checkout form I have added VAT number custom field which is showing when customer select corresponding user group (company). In System>Localisation>Country I have added VAT field into default address format.

Everything is working ok but VAT field is showing on order confirmation on both payment and shipping addresses. How to get it show only on payment section and hide it on shipment address?

OpenCart 3.0.3.9. PHP 8.3. Default theme.

Newbie

Posts

Joined
Wed Feb 08, 2023 10:33 pm

Post by softmonke » Wed Feb 21, 2024 11:11 am

septero wrote:
Wed Feb 21, 2024 8:16 am
Hi,

On checkout form I have added VAT number custom field which is showing when customer select corresponding user group (company). In System>Localisation>Country I have added VAT field into default address format.

Everything is working ok but VAT field is showing on order confirmation on both payment and shipping addresses. How to get it show only on payment section and hide it on shipment address?

OpenCart 3.0.3.9. PHP 8.3. Default theme.
By default, if the custom field's "Location" option is set to "Address", it will appear for both payment and shipping address. Without making custom modifications, you will not be able to get the custom field to only show for payment address but hidden for shipping address. Alternatively, you can also consider setting the "Location" option to "Account" - but I'm not entirely sure if that will make sense for VAT field.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by jani90 » Sun Oct 06, 2024 1:01 am

Hello,

if I may borrow a theme.

How did you set the address format in System>Localisation>Country?

I also need to enter a VAT number.

Thank you for your reply and best regards

Newbie

Posts

Joined
Sun Apr 05, 2020 4:04 am

Post by softmonke » Sun Oct 06, 2024 7:29 am

jani90 wrote:
Sun Oct 06, 2024 1:01 am
Hello,

if I may borrow a theme.

How did you set the address format in System>Localisation>Country?

I also need to enter a VAT number.

Thank you for your reply and best regards
Address Format in System » Localisation » Country is only for formatting the address stored in the database so that it shows up in your specified format for orders throughout your site, i.e. in Sales » Orders, invoices, shipping list, when customers view their orders, etc.

For VAT number field, your best option would be to use OpenCart's Custom Fields feature which you can manage under Customers » Custom Fields. But as mentioned above, custom fields with "Location" option set as "Address" will appear for both Payment and Shipping address. And without custom modifications or third-party extensions, it's not possible to only allow it to show up for Payment address.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am

Who is online

Users browsing this forum: spstore and 21 guests