npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elasticpath-builder-io-plugin

v0.0.2-0

Published

Easily connect your [Elastic Path Commerce Cloud](https://www.elasticpath.com/products/elastic-path-commerce-cloud) catalog to your Builder.io content!

Downloads

5

Readme

Elastic Path Commerce Cloud Builder.io plugin

Easily connect your Elastic Path Commerce Cloud catalog to your Builder.io content!

Installation

Go to builder.io/account/organization and type elasticpath-builder-io-plugin in the input, then hit save, a prompt will ask you for your client ID, and Client Secret.

Credentials screenshot

You will now see a few new field types (for model fields, symbol inputs, custom components fields), and custom targeting attributes that can be used in three different contexts.

Custom targeting

Custom targeting in Builder.io allow users to target content by a multitude of attributes, and in this plugin you'll be able to add specific content to elasticpath products, for this you'll need first to set the target attributes on the host site, either by setting the userAttributes if you're rendering client side:

builder.setUserAttributes({
  product: currentProduct.id,
});

Or by passing it as a query param to the content API call, or in graqhql query for e.g in Gatsby or nextjs.

  • Elastic path commerce cloud product when used as a custom targeting type, it'll target contexts where the field is set to the product ID, you'll need to set the product ID on the host environment, using one of the methods above. Alternatively, if you want to target by product handle (slug) use the Elastic path commerce cloud product handle type in your custom targeting attributes.

  • Elastic path commerce cloud preview is to be used as a custom field on component models, this will allow you to have templated editing url on your component model relevant to the Elasticpath product being previewed, for example you can set the url in your model to: https://www.mystore.com/product/${previewResource.handle}, add a custom field of type Elastic path commerce cloud product preview to the model, now when you create a new entry, the handle will be added dynamically to the preview url based on the preview product, it is recommended to add a default value to the Elastic path commerce cloud product preview custom field, so users will land at a specific product page when developing a template component.

  • Elastic path commerce cloud node when used as a custom targeting type, it'll target contexts where the field is set to the node ID, you'll need to set the node ID on the host environment, using one of the methods above. Alternatively, if you want to target by node handle (slug) use the Elastic path commerce cloud node handle type in your custom targeting attributes.

  • Elastic path commerce cloud node preview is to be used as a custom field on component models, this will allow you to have templated editing url on your component model relevant to the Elasticpath node being previewed, for example you can set the url in your model to: https://www.mystore.com/product/${previewResource.handle}, add a custom field of type Elastic path commerce cloud node preview to the model, now when you create a new entry, the handle will be added dynamically to the preview url based on the preview node, it is recommended to add a default value to the Elastic path commerce cloud node preview custom field, so users will land at a specific node page when developing a template component.

Symbol Inputs

Using the field types ElasticpathCommerceCloudProduct, ElasticpathCommerceCloudNode, ElasticpathCommerceCloudHeirarchy as inputs, the UIs will prompt to search for products, nodes and collections. When consumed by APIs, SDKs, or in the Builder.io UIs, the value will be resolved automatically the in the form of a Builder.io Request object

{
  "yourFieldName": {
    "@type": "@builder.io/core:Request",
    "request": {
      "url": "..."
    },
    "data": {
      // Response data from the API request, e.g.:
      "product": {
        /* ... */
      }
    }
  }
}

Seeing the plugin in action

Try creating a custom model, component, or symbol using any of the Elastic Path Commerce Cloud field types, and edit away!

Custom Targeting Page