Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="output" class="sci-enable-font">Im Moment gibts noch nichts zu sehen...</div>

<!-- OXOMI JavaScript Bibliothek einbinden und laden -->

<script type="text/javascript" src="https://oxomi.com/assets/frontend/v2/oxomi.js" async></script>
              
            
!

CSS

              
                
              
            
!

JS

              
                // Wir warten bis die OXOMI JavaScript Bibliothek geladen ist...
document.addEventListener("oxomi-loaded", function () {
  try {
    // buzz.enableDebugger();

    const shop = new buzz.Connector({
      name: "E/D/E",
      link: "oxomi"
    });

    // Wird aufgerufen wenn ein Produkt gerendert wird
    shop.addCapability("enhanceProductData", function (message) {
      // Dieses Beispiel liefert für Anschauungszwecke auf jede Anfrage dieselben Daten zurück
      // Schritte zur tatsächlichen Implementierung:

      // Werten Sie das Objekt message.payload().product.itemNumber (weitere Felder siehe
      // https://oxomi.com/kba/de/ZBWVM) aus um das angefragte Produkt zu kennen und für
      // die Anfrage an Ihr System zu verwenden
      const queriedProduct = message.payload().product;

      // Fragen Sie Ihr System an und verarbeiten Sie die Antwort
      // Erweitern Sie das Produkt (product) wie folgt um die Angaben aus Ihrem System.
      // Die Strings aus dem Beispiel sind entsprechend dynamisch zu ersetzen.
      // Belegen Sie dabei insbesondere 'order' um eine Warenkorbübergabe zu ermöglichen

      const product = {
        gtin: "alternative GTIN",
        itemNumber: message.payload().itemNumber,
        model: "alternative Type",
        shortText: "alternativer Kurztext",
        availability: {
          state: "full",
          text:
            "Ausreichend auf Lager aber sehr lange Beschreibung zum Testen der Längenbeschränkung von Infoplay Direct"
        },
        price: {
          prefix: "zzgl. MwSt.",
          amount: "100,00\xa0€"
        },
        alternativePrice: {
          prefix: "inkl. MwSt.",
          amount: "119,00\xa0€"
        },
        priceQuantity: "je 1 Stück",
        order: {
          quantity: "12",
          unit: "Stück"
        }
      };

      // Sendet die Nachricht an OXOMI zur weiteren Verarbeitung/Darstellung
      message.reply(product);

      // Alternativ können Sie wie folgt über OXOMI die Verfügbarkeiten aus dem E/D/E Zentrallager in product.availabity schreiben...

      // oxomi.checkAvailability({
      //   itemNumber1: product.itemNumber,
      //   supplierNumber1: product.supplierNumber,
      //   cached: true,
      //   callback: function (blinkResponse) {
      //     product.availability = {
      //       state: blinkResponse.items[0].stockIndicator,
      //       text: blinkResponse.items[0].stockMessage
      //     };
      //     // Sendet die Nachricht an OXOMI zur weiteren Verarbeitung/Darstellung
      //     message.reply(product);
      //   }
      // });
    });

    // Wird aufgerufen, wenn für das Produkt auf den Warenkorb geclickt wird
    shop.addCapability("addProductToBasket", function (message) {
      const product = message.payload().product;

      // Dieses Beispiel gibt lediglich eine fiktive Meldung aus.
      // Geben Sie hier die Daten aus product zum Produkt an Ihr System zurück

      oxomi.showMessageInDialog(
        "",
        "Produkt '" +
          product.itemNumber +
          "' wurde erfolgreich in den Warenkorb gelegt."
      );
    });
  } catch (error) {
    console.error(error);
  }

  oxomi.init({
    portal: "demo",
    buzzLink: "oxomi"
  });

  // Funktionsaufruf, um eine Story einzubetten
  oxomi.navigatorPro({
    target: "#output"
  });
});

              
            
!
999px

Console