Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 2.48 KB

README.md

File metadata and controls

57 lines (39 loc) · 2.48 KB

Shopify Crypto Wallet Integration

Project Components

  1. NextJS Frontend:

    • Admin dashboard for shop owner to configure eligible contract holders for discounts/custom merch.
  2. NextJS Backend:

    • Server to store data.
    • Dynamically create promo codes for discounts using Shopify API (research needed).
  3. Widget:

    • Connects with crypto wallet.
    • Verifies user eligibility for discounts/custom merch.
    • Fetches and applies promo code to user's cart.

Requirements

Development Steps

  1. Clone the project and run npm install.
  2. Create .env from .env.example.
  3. Add SHOPIFY_API_KEY=<your API key> from your Shopify App settings.
  4. Add SHOPIFY_API_SECRET=<your API secret>.
  5. Add SHOP=<your shop>.myshopify.com.
  6. Leave SCOPES as in the example for now.
  7. Start NGROK and replace HOST with your NGROK URL.

Shopify App Settings

Update NGROK URL every time it changes.

  1. Run npm run dev.
  2. Click Select store under Test your app in Shopify App settings.
  3. Install the app in your development store and open it in the admin dashboard.

Common error: The redirect URI is not whitelisted. Update NGROK URL in Allowed redirection URL(s).

Theme App Extension

Example: Theme App Extension

  1. Navigate to theme-app-extension and run shopify extension register, choose THEME_APP_EXTENSION type.
  2. Run npm run create-extension-js-bundle to bundle crypto-wallet.js and place it in theme-app-extension/assets.
  3. Run shopify extension push and follow instructions to install the extension on the Shopify theme.

Demo: Loom Video

WIP: [Loom Video](https://www.loom.com/share/9cb9caccd1494387937ae