Giter VIP home page Giter VIP logo

shopify-plugins's Introduction

Shopify Plugins

CircleCI Greenkeeper badge

Add features to your Shopify storefront and checkout with lightweight and easily integrateable plugins.

Shop integration

Plugins are loaded dynamically and only in context. That means, that i.e. the progress-bar plugin is only loaded in when visitor is in the checkout process. The accept-terms plugin is only loaded for the checkout contact information step.

To enable a plugin add this code to your Google Analytics Additional Scripts section in Shopify's Admin / Online Store / Preferences.

fetch('//cdn.jsdelivr.net/gh/nerdsofalltrades/[email protected]/dist/shopify-plugin-loader.min.js').then(function(
  result
) {
  result.text().then(function(script) {
    var plugin = document.createElement('script');
    plugin.innerHTML = script;
    document.body.appendChild(plugin);

    // Load plugins here
    var ctx = window.ShopifyPlugins;

    // Load the accept-terms plugin only in checkout
    // contact information step
    ctx.checkout.contactInformation.load('accept-terms');

    // Load the validate-contact-information plugin only in checkout
    // contact information step
    ctx.checkout.contactInformation.load('validate-contact-information');

    // Load the progress-bar plugin for all steps
    // in checkout
    ctx.checkout.all.load('progress-bar');

    // Load other plugins...
  });
});

Plugins

Accept terms plugin

This plugin adds a mandatory Accept Terms checkbox below the Accept Marketing Checkbox in Shopify's contact information checkout step.

Accept terms plugin in action

Add this code to enable it.

ctx.checkout.contactInformation.load('accept-terms');

Without options standard english texts are displayed and the url of your terms is expected to be found at /pages/terms. To change that just pass options and set it up as you like.

ctx.checkout.contactInformation.load('accept-terms', {
  // The checkbox label
  label: 'I have read and I agree to the',
  // The label of the terms link
  termsName: 'terms',
  // The url to your terms
  termsURL: '/pages/terms',
  // Message displayed when customer tries to go on without agreeing
  errorMessage: 'Please agree to our terms before your purchase'
});

Validate contact information plugin

This plugin adds custom RegEx validators to Shopify's contact information checkout step.

Add this code to enable it.

ctx.checkout.contactInformation.load('validate-contact-information', [
  {
    selector: '#checkout_shipping_address_address1',
    pattern: /.*[a-z]+.*[0-9]+.*/i,
    errorMessage: 'Please enter streetname AND number'
  }
]);

Progress bar plugin

This plugin replaces the upper breadcrumb navigation of Shopify's checkout with a bubble progress bar. As the existing breadcrumb labels are used for displaying the single steps no additional configuration is needed.

Progress bar plugin in action

Add this code to enable it.

ctx.checkout.all.load('progress-bar');

Development

$ npm install
$ npm run dev

Open http://localhost:3000 to test the plugins.

Note

This software is not correlated to Shopify.

shopify-plugins's People

Contributors

sbstnmsch avatar sbstnmsch-zz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shopify-plugins's Issues

An in-range update of css-loader is breaking the build ๐Ÿšจ

The devDependency css-loader was updated from 1.0.0 to 1.0.1.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

css-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for v1.0.1

1.0.1 (2018-10-29)

Bug Fixes

Commits

The new version differs by 4 commits.

  • 10c3bc3 chore(release): 1.0.1
  • e6cb60e chore(package): switch from lodash.camelcase to lodash (dependencies) (#784)
  • 21fcddf fix(loader): trim unquoted import urls (#783)
  • 67b2f20 docs(readme): fix various typos (#782)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of cssnano is breaking the build ๐Ÿšจ

The devDependency cssnano was updated from 4.1.0 to 4.1.1.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

cssnano is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of webpack-cli is breaking the build ๐Ÿšจ

The devDependency webpack-cli was updated from 3.1.0 to 3.1.1.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for Webpack-cli v.3.1.1

Webpack CLI version 3.1.1 comes with minor fixes to infrastructure, fixing bugs, synchronization with webpack and updating the build system.

For a full overview of changes done, you can view it here

Monorepo packages has also been updated as patches and can be safely updated.

Commits

The new version differs by 36 commits.

  • e3119b6 v0.1.1
  • a0afc35 chore: v.3.1.1
  • 0ffede1 fix(schema): resolve references in schema (#605)
  • 6be0478 chore(fix): fix clean all script
  • 91cc499 chore(tests): added first ts test for info package (#584)
  • 1a8099c Merge pull request #604 from sendilkumarn/fix-tslint-issues
  • e425642 chore(lint): remove or replace console.log with console.error
  • db5f570 chore(lint): turn off console log warning
  • cf0bf4a chore(lint): fix tslint warnings
  • 1e0fa65 chore(ci): fix commitlint (#592)
  • b8d544b feat(types): types for packages (#578)
  • 936e7c1 chore(ci): Add a status badge for the azure pipelines CI build (#601)
  • d892b4d chore(deps): resync package-lock, upgrade major version
  • 2910645 docs(contribution): fix the setup workflow #591 (#597)
  • 2588394 chore(ci): add commitlint when trying to commit (#595)

There are 36 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of webpack is breaking the build ๐Ÿšจ

Version 4.17.3 of webpack was just published.

Branch Build failing ๐Ÿšจ
Dependency webpack
Current Version 4.17.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Release Notes v4.17.3

Bugfixes

  • Fix exit code when multiple CLIs are installed
  • No longer recommend installing webpack-command, but still support it when installed
Commits

The new version differs by 7 commits.

  • ee27d36 4.17.3
  • 4430524 Merge pull request #7966 from webpack/refactor-remove-webpack-command-from-clis
  • b717aad Show only webpack-cli in the list
  • c5eab67 Merge pull request #8001 from webpack/bugfix/exit-code
  • 943aa6b Fix exit code when multiple CLIs are installed
  • 691cc94 Spelling
  • 898462d refactor: remove webpack-command from CLIs

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of eslint is breaking the build ๐Ÿšจ

The devDependency eslint was updated from 5.13.0 to 5.14.0.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for v5.14.0
  • 85a04b3 Fix: adds conditional for separateRequires in one-var (fixes #10179) (#10980) (Scott Stern)
  • 0c02932 Upgrade: [email protected] (#11401) (Ilya Volodin)
  • 104ae88 Docs: Update governance doc with reviewers status (#11399) (Nicholas C. Zakas)
  • ab8ac6a Fix: Support boundary spread elements in sort-keys (#11158) (Jakub Roลผek)
  • a23d197 New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243) (richie3366)
  • e25e7aa Fix: comma-spacing ignore comma before closing paren (fixes #11295) (#11374) (Pig Fang)
  • a1f7c44 Docs: fix space-before-blocks correct code for "classes": "never" (#11391) (PoziWorld)
  • 14f58a2 Docs: fix grammar in object-curly-spacing docs (#11389) (PoziWorld)
  • d3e9a27 Docs: fix grammar in โ€œthose who saysโ€ (#11390) (PoziWorld)
  • ea8e804 Docs: Add note about support for object spread (fixes #11136) (#11395) (Steven Thomas)
  • 95aa3fd Docs: Update README team and sponsors (ESLint Jenkins)
  • 51c4972 Update: Behavior of --init (fixes #11105) (#11332) (Nicholas C. Zakas)
  • ad7a380 Docs: Update README team and sponsors (ESLint Jenkins)
  • 550de1e Update: use default keyword in JSON schema (fixes #9929) (#11288) (Pig Fang)
  • 983c520 Update: Use 'readonly' and 'writable' for globals (fixes #11359) (#11384) (Nicholas C. Zakas)
  • f1d3a7e Upgrade: some deps (fixes #11372) (#11373) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 3e0c417 Docs: Fix grammar in โ€œthereโ€™s nothing prevent youโ€ (#11385) (PoziWorld)
  • de988bc Docs: Fix grammar: Spacing improve -> Spacing improves (#11386) (PoziWorld)
  • 1309dfd Revert "Build: fix test failure on Node 11 (#11100)" (#11375) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 1e56897 Docs: โ€œthe function actually useโ€: use -> uses (#11380) (PoziWorld)
  • 5a71bc9 Docs: Update README team and sponsors (ESLint Jenkins)
  • 82a58ce Docs: Update README team and sponsors (ESLint Jenkins)
  • 546d355 Docs: Update README with latest sponsors/team data (#11378) (Nicholas C. Zakas)
  • c0df9fe Docs: ... is not an operator (#11232) (Felix Kling)
  • 7ecfdef Docs: update typescript parser (refs #11368) (#11369) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 3c90dd7 Update: remove prefer-spread autofix (fixes #11330) (#11365) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 5eb3121 Update: add fixer for prefer-destructuring (fixes #11151) (#11301) (golopot)
  • 173eb38 Docs: Clarify ecmaVersion doesn't imply globals (refs #9812) (#11364) (Keith Maxwell)
  • 84ce72f Fix: Remove extraneous linefeeds in one-var fixer (fixes #10741) (#10955) (st-sloth)
  • 389362a Docs: clarify motivation for no-prototype-builtins (#11356) (Teddy Katz)
  • 533d240 Update: no-shadow-restricted-names lets unassigned vars shadow undefined (#11341) (Teddy Katz)
  • d0e823a Update: Make --init run js config files through linter (fixes #9947) (#11337) (Brian Kurek)
  • 92fc2f4 Fix: CircularJSON dependency warning (fixes #11052) (#11314) (Terry)
  • 4dd19a3 Docs: mention 'prefer-spread' in docs of 'no-useless-call' (#11348) (Klaus Meinhardt)
  • 4fd83d5 Docs: fix a misleading example in one-var (#11350) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 9441ce7 Chore: update incorrect tests to fix build failing (#11354) (่–›ๅฎš่ฐ”็š„็Œซ)
Commits

The new version differs by 38 commits.

  • af9688b 5.14.0
  • 0ce3ac7 Build: changelog update for 5.14.0
  • 85a04b3 Fix: adds conditional for separateRequires in one-var (fixes #10179) (#10980)
  • 0c02932 Upgrade: [email protected] (#11401)
  • 104ae88 Docs: Update governance doc with reviewers status (#11399)
  • ab8ac6a Fix: Support boundary spread elements in sort-keys (#11158)
  • a23d197 New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243)
  • e25e7aa Fix: comma-spacing ignore comma before closing paren (fixes #11295) (#11374)
  • a1f7c44 Docs: fix space-before-blocks correct code for "classes": "never" (#11391)
  • 14f58a2 Docs: fix grammar in object-curly-spacing docs (#11389)
  • d3e9a27 Docs: fix grammar in โ€œthose who saysโ€ (#11390)
  • ea8e804 Docs: Add note about support for object spread (fixes #11136) (#11395)
  • 95aa3fd Docs: Update README team and sponsors
  • 51c4972 Update: Behavior of --init (fixes #11105) (#11332)
  • ad7a380 Docs: Update README team and sponsors

There are 38 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of eslint-plugin-prettier is breaking the build ๐Ÿšจ

The devDependency eslint-plugin-prettier was updated from 2.6.2 to 2.7.0.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 3 commits.

  • 869f56d Build: update package.json and changelog for v2.7.0
  • 38537ba Update: Support prettierignore and custom processors (#111)
  • 047dc8f Build: switch to release script package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of webpack-dev-server is breaking the build ๐Ÿšจ

The devDependency webpack-dev-server was updated from 3.1.8 to 3.1.9.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-dev-server is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 4 commits.

  • bb484ad chore(release): 3.1.9
  • 8b8b087 chore(package): update webpack-dev-middleware v3.3.0...3.4.0 (dependencies)
  • d0725c9 chore(package): update webpack-dev-middleware v3.2.0...3.3.0 (dependencies) (#1499)
  • cbe6813 refactor(package): cross-platform prepare script (scripts) (#1498)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of prettier is breaking the build ๐Ÿšจ

The devDependency prettier was updated from 1.14.2 to 1.14.3.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for 1.14.3

๐Ÿ”— Changelog

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.