Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow custom labels in installments options

See original GitHub issue

Issue Description

Is your feature request related to a problem? Please describe. I find difficult to configure (too much magic behind the scenes) and not quite custom the way the installment options are configured, because they use the drop-in format, which in some cases does not result in the expected output.

Describe the solution you’d like Allow custom text in the installments dropdowns, instead of the current format that is done behind the scenes.

Describe alternatives you’ve considered image

Allow the developer to, instead of proving a simple array of numbers, each for every installment, allow to provide custom item labels, like: installmentOptions: { card: { values: [ { value: 1, label: 'Pay 10000€ at once' }, { value: 2, label: 'Pay 5000€ in two times' } ] } }

Maybe something like:

const installmentItemsMapper = value => ({
  id: value,
  name: typeof value === 'object' && value.label ? value.label : amount.value ? `${value}x ${getPartialAmount(value)}` : value

Additional context Add any other context or screenshots about the feature request here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

lluishi93commented, Nov 19, 2020

Sorry, haven’t seen this one! that’s awesome, thank you a lot

marcperezcommented, Jul 7, 2020

Hi @lluishi93,

We just released a new feature (#83) that should help you customize the installment option translations. This feature has been included in the v3.10.0 release, which is already available on NPM and will soon be available as a script tag.

As a quick recap of the feature:

The new translation key used in the installment options is "installmentOption": "%{times}x %{partialValue}". This means you can customize the translation including the two variables you already see in the current dropdown. We also support plurals and specific count translations. An example could be:

const translations = {
  "en-US": {
    "installmentOption": "Pay %{partialValue} at once",
    "installmentOption__plural": "Pay %{partialValue} in %{times} times",


Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom label 0–4 [custom_label_0–4] - Google Support
Create up to 1,000 unique labels for each custom label attribute across your account (up to 5,000 labels total, 1,000 labels per attribute)....
Read more >
Custom Labels - Setup - Blackthorn Candy Shop
Custom Labels are custom text values, up to 1,000 characters, that can be accessed from Apex Classes or Visualforce Pages. Our Payments ......
Read more >
Create and print labels - Microsoft Support
Create and print a page of identical labels. Go to Mailings > Labels. Select Options and choose a label vendor and product to...
Read more >
Accept a payment using Stripe Elements and the Charges API
Accept online payments from U.S. and Canadian customers. ... Custom styling can be passed to options when creating an Element. const style =...
Read more >
Setting up the Zebra label printers for custom label printing
7. Print labels · In Retail POS, select Settings > Locations. · To the right of your location, select Customize. · Disable Enable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found