Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing billing address causes error #12

Closed
pixelmachine opened this issue Jan 11, 2024 · 2 comments
Closed

Missing billing address causes error #12

pixelmachine opened this issue Jan 11, 2024 · 2 comments

Comments

@pixelmachine
Copy link

I have an order that for some reason has no billing address. This causes Commerce Insights (v3 branch) to throw an error.

It looks like the issue is in the Products Service, where there's a check that the Shipping address exists but then data is pulled from the Billing address which may not:

if($shippingAddress){
  $addressShippingDetails = [
    'shippingBusinessName' => $billingAddress->businessName ,
     'shippingFirstName' => $billingAddress->firstName ,
     'shippingLastName' => $billingAddress->lastName ,
     'shippingAddress1' => $billingAddress->address1 ,
     'shippingAddress2' => $billingAddress->address2 ,
     'shippingAddress3' => $billingAddress->address3 ,
     'shippingCity' => $billingAddress->city ,
     'shippingPostcode' => $billingAddress->zipCode ,
   ];
}

I assume that's just a typo.

@dispositiontools
Copy link
Owner

thanks for bringing this to my attention - I'll get this fixed today

@dispositiontools
Copy link
Owner

I've pushed the update for the v3 branch with the fix.
tag v1.0.15
Thanks again @pixelmachine for spotting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants