Text replacement

Texts can also be replaced outside of the widget on elements with the data attribute porterbuddy-text


Custom text: Placeholder

Custom text without pattern: Placeholder

<p>Custom text: <span data-porterbuddy-text="availabilityPostcodeSuccess">Placeholder</span></p>
<p>Custom text without pattern:
  <span data-porterbuddy-customtext="Custom text with postcode **{{postcode}}**">
  setTimeout(function () {
    window.porterbuddy = {
      token: 'y3wt37LqBsiLo62Jkx284XEdi4LzdX6pihZFwqYX',
      view: 'checkout',
      postalCode: '0153',
      now: '2019-05-29T15:30:00+02:00',
      deliveryWindows: [
          product: 'delivery',
          start: '2019-05-30T17:30:00+02:00',
          end: '2019-05-30T19:30:00+02:00',
          expiresAt: '2019-05-30T14:30:00+02:00',
          price: {
            fractionalDenomination: 14900,
            currency: 'NOK'
      text: {
        availabilityPostcodeSuccess: 'Bestill innen **{{remaining}}** levert **{{delivery}}**'
  }, 1000)