Checkout Billing Field alwa

Hello everyone! Have a question regarding Billing Fields in the checkout page (using MV 4.16.2)

I have created a new customer profile field (VAT number) under the “Billing Address / Shipping Address” section because I am using multiple profiles, and each profile must have its own VAT number.

I have then disabled the “show/required” option for shipping address, and left it checked only for billing address, since VAT is related to billing only.

The issue I am having is that this number MUST be filled, as it is a legal requirement in my country. However, the field is hidden until the user selects “My billing address is different from shipping address”. If the user never selects that checkbox, then he will never see that field.

Is there a way to have this specific field always appear, regardless of the “My billing address is different from shipping address” checkbox?

Thank you!

It looks like a bug. The system should check the required fields on checkout. Please post this issue to the bug tracker branch

1 Like

Thank you! I will post it there.

If you require the My billing address is different from shipping address checkbox to be ticked in by default, you can make the following:

  1. Create the app/addons/my_changes/controllers/frontend/ file with the following content:

defined('BOOTSTRAP') or die('Access denied');

if ($mode === 'checkout') {
    $view = Tygh::$app['view'];
    $user_data = $view->getTemplateVars('user_data');;

    $user_data['ship_to_another'] = true;
    $view->assign('user_data', $user_data);
  1. Install and enable the My changes add-on.

I hope it will help you.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.