Checkout billing error

In our checkout (as guest) the billing fields are necessary to be passed as arguments for credit card payment. However when customer enters the shipping address image hosted at ImgBB — ImgBB
but leaves the “My billing address is different from the shipping address” unchecked because well the billing address is the same.
Then proceeds to place the order. He will not be able to proceed because the required billing address fields have not been filled in the same as shipping address and then he must check the “My billing address is different from the shipping address” and then fill in the same address image hosted at ImgBB — ImgBB

How can the billing address be filled in the same as shipping address as soon as shipping address is entered/or shipping is updated/calculated so that customer doesn’t have to fill in the billing fields again?
Also how do I leave the “My billing address is different from the shipping address”
checkbox unchecked by default (Using Unitheme 2 CS-Cart MV 4.16.2)

Hi!

Can help you with this one.

  1. Please create the app/addons/my_changes/controllers/frontend/checkout.post.php file with the following content:
<?php

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. Go to the Add-ons > Manage add-ons page.
  2. Find there the My changes add-on, install and activate it, in case it is not installed and activated.

I hope it will help you.

I did this but the “my billing address is different” option is still checked by default.
I want it to remain unchecked

Sorry, you want it to be unchecked and I’ve misread this as checked instead.

In this case you need to make sure that the profile fields marked as “required” for the billing section are the same as the same profile fields from the shipping section. In other words, there should be no “required” profile fields in the billing section that are not marked as “required” in the shipping section.