Override Payment styling

Ask about this Page
Copy for AI
View as Markdown

Override UI elements of the Payments workflow.

You can override the following elements of the InStore Payment module:

For general information, see Core module styling overrides overview.
To override strings, see Override core strings.
For all keys that are used in the Payment screens, see List of core strings.

Styling of payment types

Use the guides below to override the HTML structure of the payment types, including cash, cash drawer, change due, credit processing, and stored-value card entry workflows. You can also override the HTML structure for Pay On Account (POA) workflows.

Payment types structure

Payment types layouttsx
<Grid className="instore-payment-entry-container">
  <Grid item xs={12} md={6} className="instore-payment-amount-section">
    <Grid item xs={12}>
      <Typography className="instore-payment-amount-header" />
    </Grid>
    <Grid item xs={12}>
      <KeypadEntry className="instore-payment-amount-keypad" />
    </Grid>
  </Grid>
  <Grid item xs={12} md={6} className="instore-payment-types-section">
    <Grid item xs={12}>
      <Typography className="instore-payment-types-header" />
    </Grid>
    <Grid item xs={12}>
      <Grid>
        <TenderButton className="instore-payment-types-button-${type}" />
        {/* {type} is cash, credit, paybylink, etc. */}
      </Grid>
    </Grid>
  </Grid>
</Grid>
InStore payment types override

Cash structure

Cash layouttsx
<Grid className="instore-payment-entry-container">
  <Grid item xs={12} md={6} className="instore-payment-amount-section">
    <Grid item xs={12}>
      <Typography className="instore-payment-amount-header" />
    </Grid>
    <Grid item xs={12}>
      <KeypadEntry className="instore-payment-amount-keypad" />
    </Grid>
  </Grid>
  <Grid item xs={12} md={6} className="instore-cash-section">
    <Grid item xs={12}>
      <Typography className="instore-cash-header" />
    </Grid>
    <Grid item xs={12}>
      <Grid>
        <Button className="instore-cash-button-${value}" /> {/* List of buttons */}
      </Grid>
    </Grid>
  </Grid>
</Grid>
InStore cash override

Cash drawer structure

Cash drawer layouttsx
<Grid>
  <Grid item xs={12} md={6}>
    <Grid item xs={12}>
      <Typography className="instore-cash-promp-drawer" />
    </Grid>
  </Grid>
</Grid>
InStore cash drawer override

Change due structure

Change due layouttsx
<Grid className="instore-change-due-container">
  <Grid item xs={12}>
    <Typography className="instore-cash-change-row-0" />
    <Typography className="instore-cash-change-row-1" />
    <Typography className="instore-cash-change-row-2" />
    <Typography className="instore-cash-change-row-3" />
  </Grid>
</Grid>
InStore change due override

Credit processing structure

Credit processing layouttsx
<Grid className="instore-payment-entry-container">
  <Grid item xs={12}>
    <Typography className="instore-credit-process-label" />
    <Typography className="instore-credit-process-amount" />
  </Grid>
</Grid>
InStore credit processing override

Stored-value card entry structure

Stored-value card entry layouttsx
<Grid>
  <Grid item xs={12} md={6}>
    <Grid className="instore-gift-cart-header">
      <Grid item xs={12}>
        <Button className="instore-gift-cart-camera-button" />
        <Typography className="instore-gift-cart-label" />
      </Grid>
      <Grid item xs={12}>
        <KeypadEntry className="instore-gift-cart-keypad" />
      </Grid>
    </Grid>
  </Grid>
</Grid>
InStore stored-value card override

HTML structures for Pay On Account

Use this wrapper to introduce the POA component:

<Paper elevation={0} className='instore-POA-paper-background'>
  <Container className='instore-POA-confirmation-container'>

HTML structure for POA Company Name label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography
      className='instore-POA-company-name-label'
    >
      {t('POA.companyName')}
    </Typography>
  </Grid>
  <Grid
    item
    xs={12}
    sm={6}
    className='instore-POA-company-name-field'
    >
    <Typography
      variant='subtitle1'
      id='customer-company-name'
    >
      {customer.company}
    </Typography>
  </Grid>
</>

HTML structure for POA Authorized Purchaser label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography
      variant='h6'
      id='instore-POA-authorised-purchaser-label'
    >
      {t('POA.authorizedPurchaser')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <Typography
      variant='subtitle1'
      className='instore-customer-authorised-purchaser-field'
    >
      {customer.first_name + ' ' + customer.last_name}
    </Typography>
  </Grid>
</>

HTML structure for POA Customer Number label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography
      variant='h6'
      className='instore-customer-number-label'
    >
      {t('POA.customerNumber')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <Typography
      variant='subtitle1'
      className='instore-customer-number-field'
    >
      {customer.customer_number}
    </Typography>
  </Grid>
</>

HTML structure for POA Customer Email label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography variant='h6' className='instore-customer-email-label'
    >
      {t('POA.customerEmail')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <Typography variant='subtitle1' className='instore-customer-email-field'
    >
      {customer.email}
    </Typography>
  </Grid>
</>

HTML structure for POA Account IDs label and drop-down

<>
  <Grid item xs={12} sm={6}>
    <Typography variant='h6' className='instore-POA-account-id-label'
    >
      {t('POA.accountID')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <Typography variant='subtitle1' className='instore-customer-account-number'
    >
      {accountNumber}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <FormControl className='instore-POA-account-dropdown'
    >
      <Select
      >
        <MenuItem
        >
          {account}
        </MenuItem>
      </Select>
    </FormControl>
  </Grid>
</>

HTML structure for POA page divider

  <Grid item xs={12} sm={6}>
    <Divider variant='middle' className='instore-POA-divider' />
  </Grid>

HTML structure for POA Payment Amount label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography variant='h6' className='instore-POA-payment-amount-label'
    >
      {t('POA.paymentAmount')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <Typography variant='subtitle1' className='instore-poa-payment-amount'>
      {currentTenderAmount.toFormat(currencyInstance.currencyFormat)}
    </Typography>
  </Grid>
</>

HTML structure for POA Purchase Order label and field

<>
  <Grid item xs={12} sm={6}>
    <Typography variant='h6' className='instore-purchase-order-label'
    >
      {t('POA.purchaseOrderLabel')}
    </Typography>
  </Grid>
  <Grid item xs={12} sm={6}>
    <TextField
      value={purchaseOrder}
      className='instore-POA-purchase-order-input'
    />
  </Grid>
</>

HTML structure for POA navigation buttons

<Button
  className='instore-back-btn'
>
  {t('Common.buttons.back')}
</Button>
<Button
  className='instore-next-btn'
>
  {t('Common.buttons.next')}
</Button>

Pay On Account HTML rendered on the UI

InStore POA page

Add payment details to the Totals box

You can add your own specific information to display to your colleagues at the top of the Totals box during checkout. For example, you can display loyalty benefits, customer entitlements, or applied discount information to help the colleague to explain the amount due for a customer.
The additional information is added within a flexibly sized component called the MoneyBoxInjection. You can call the InStore moneyBoxInjection property at render time.
To display payment details within the Totals box, do the following:
  1. Follow the steps for overriding the theme and add the following to the configuration:
    Injector.inject({
      tenantId: "a1a1-b2b2-c3c3-d4d4",
      moneyBoxInjection: {
       items: [
         { label: "Shopper due 1000 Loyalty points on checkout", alignment: "center" },
         { type: "divider" },
         { label: "Stored value available to use: £180.50", alignment: "right" },
         { type: "divider" },
         { label: "Price Match Applied:", value: "-£10.00", alignment: "left" },
       ]
      }
    });
    
  2. For each item in the items array, assign one of the following options:
    {
      "label": "Promo: Buy 1 Get 1 Free!",
      "value": "-£1.00",
      "alignment": "center"
    }
    
  3. Implement a divider (a horizontal line) by inserting the following text:

    { "type": "divider" }
    

    Use theming described elsewhere in this topic to style line thickness, color, and spacing.

  4. Use theming overrides to style the MoneyBoxInjection component. For example:
    MoneyBoxInjection: {
      styleOverrides: {
        root: {
          "&.instore-moneybox-injection": {
            textAlign: themeOptions.defaultTextAlign || "left",
            margin: themeOptions.moneyBoxMargin || "4px 0",
            fontSize: themeOptions.moneyBoxFontSize || "14px",
            color: themeOptions.moneyBoxTextColor || "#000",
            "& .instore-moneybox-item-left": { textAlign: "left" },
            "& .instore-moneybox-item-center": { textAlign: "center" },
            "& .instore-moneybox-item-right": { textAlign: "right" },
            "& .instore-moneybox-separator": {
              borderTop: `1px solid ${themeOptions.moneyBoxSeparatorColor || "rgba(0,0,0,0.3)"}`,
              margin: themeOptions.moneyBoxSeparatorSpacing || "4px 0",
            },
          }
        }
      }
    }