Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
  <div class="row justify-content-md-center mt-5">
    <div class="col-12">
      <div class="card">
        <div class="card-body">
          <h5 class="card-title">Assigning values for order additional fields</h5>
          <p class="card-text">
            Click the button bellow to open the Inline Cart using a catalog product and order additional fields with values assigned.
          <a href="#" class="btn btn-success" id="buy-button">Buy now!</a>





                window.document.getElementById('buy-button').addEventListener('click', function() {

      // textbox type example
        code     : 'TextInIPNCustom123',
        value    : 'Some text value'
      // listbox type example
        code     : 'SourceOrder',
        value    : 'The WWW'
      // hidden type example
        code     : 'cart2cotestorderhidden',
        value    : 'Some text for the hidden field'
      // checkbox type example
        code     : 'cart2cotestordercheckbox',
        value    : true
    code: '2CO3MONTHS',
    quantity: 1