Analytics/ Tracking

devlaravel

Dev-Sandbox

Posted on May 18, 2023

Analytics/ Tracking

Scenario Needed: Get Order, Customer Details on Order Confirmation Page

We don't have separated firstname and lastname in stencil.

Solution
If customerId: 0
Get the customer details from Billing address
2 scenarios
- Already customer present, he chose to have the first name.
- New customer, we only have his info via the Billing address. So we will get this from Billing Address.

If Customer is logged in - Get via Graphql.

query Customer {
  customer {
    firstName
    lastName
    email
    entityId
  }
}
Enter fullscreen mode Exit fullscreen mode
đź’– đź’Ş đź™… đźš©
devlaravel
Dev-Sandbox

Posted on May 18, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related