Skip to content

Commit 84fea0d

Browse files
authored
Merge pull request #149 from gadget-inc/devaoc/new-wishlist
Updating wishlist template
2 parents 09342b9 + 3fba151 commit 84fea0d

File tree

149 files changed

+7878
-5844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+7878
-5844
lines changed

.github/workflows/wishlist-template.yaml renamed to .github/workflows/wishlist-public-remix-ssr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Wishlist Deployment
33
on:
44
push:
55
paths:
6-
- "shopify/wishlist-template/**"
6+
- "shopify/wishlist-public-remix-ssr/**"
77
branches:
88
- main
99
workflow_dispatch:
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout the current repository
1616
uses: actions/checkout@v4
1717
- name: Push to development environment
18-
run: npx ggt push --app=wishlist-template --env=development --force --allow-unknown-directory
19-
working-directory: shopify/wishlist-template/
18+
run: npx ggt push --app=wishlist-public-remix-ssr --env=development --force --allow-unknown-directory
19+
working-directory: shopify/wishlist-public-remix-ssr/
2020
env:
21-
GGT_TOKEN: ${{ secrets.WISHLIST_DEPLOY_TOKEN }}
21+
GGT_TOKEN: ${{ secrets.WISHLIST_PUBLIC_REMIX_SSR_DEPLOY_TOKEN }}

shopify/wishlist-template/.github/README.md renamed to shopify/wishlist-public-remix-ssr/.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This app template helps Shopify merchants manage customer wishlists and send automated emails to keep customers informed about their wishlist items.
44

5-
[![Fork template](https://img.shields.io/badge/Fork%20template-%233A0CFF?style=for-the-badge)](https://app.gadget.dev/auth/fork?domain=wishlist-template.gadget.app)
5+
[![Fork template](https://img.shields.io/badge/Fork%20template-%233A0CFF?style=for-the-badge)](https://app.gadget.dev/auth/fork?domain=wishlist-public-remix-ssr.gadget.app)
66

77
## Key Features
88

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.gadget/
2+
node_modules/
3+
**/.DS_Store
4+
.react-router/
5+
6+
# Shopify
7+
extensions/**/dist
8+
extensions/**/node_modules
9+
extensions/**/generated
10+
shopify.app.*.toml
11+
.env.*
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"version": "v1",
3+
"setup": "./setup.md",
4+
"webflow": {
5+
"title": "Product Wishlists",
6+
"description": "A complete wishlist solution for Shopify. Allows customers to create and manage multiple wishlists, and integrates seamlessly into the storefront and customer accounts.",
7+
"content": "webflow/content.md",
8+
"mainImage": "webflow/wishlist.png",
9+
"features": {
10+
"shopify": true,
11+
"frontend": true,
12+
"models": true,
13+
"actions": true
14+
}
15+
},
16+
"featuredModels": {
17+
"wishlist": {
18+
"description": "Stores a named wishlist and associates it with a specific customer and shop.",
19+
"featuredFields": ["name", "customer", "shop"]
20+
},
21+
"wishlistItem": {
22+
"description": "Acts as a join table, linking a specific product variant to a wishlist.",
23+
"featuredFields": ["variant", "wishlist", "customer"]
24+
},
25+
"shopifyCustomer": {
26+
"description": "Extends the standard shopifyCustomer model to include relationships to all wishlists and wishlist items created by that customer.",
27+
"featuredFields": ["wishlists", "wishlistItems"]
28+
}
29+
},
30+
"featuredActions": {
31+
"wishlist": {
32+
"create": {
33+
"description": "Allows a storefront customer to create a new, named wishlist for their account.",
34+
"tags": ["added"]
35+
},
36+
"delete": {
37+
"description": "Allows a storefront customer to delete one of their existing wishlists.",
38+
"tags": ["added"]
39+
}
40+
},
41+
"wishlistItem": {
42+
"create": {
43+
"description": "Adds a specific product variant to one of the customer's wishlists.",
44+
"tags": ["added"]
45+
}
46+
}
47+
},
48+
"featuredRoutes": {
49+
"api/routes/proxy/wishlist/item/POST-create.ts": {
50+
"description": "This route creates a new wishlist item, linking it to a wishlist, product variant, shop, and customer.",
51+
"tags": ["added"]
52+
},
53+
"api/routes/proxy/wishlist/item/POST-remove.ts": {
54+
"description": "This route removes a specific item from a customer's wishlist.",
55+
"tags": ["added"]
56+
},
57+
"api/routes/proxy/wishlist/POST-create.ts": {
58+
"description": "This route creates a new wishlist with a given name and automatically adds the first product variant to it.",
59+
"tags": ["added"]
60+
}
61+
},
62+
"featuredGlobalActions": {
63+
"enqueueSendWishlistEmail": {
64+
"description": "This action enqueues sendWishlistEmail actions in batches for a given list of customers.",
65+
"tags": ["added"]
66+
},
67+
"sendInStockEmail": {
68+
"description": "This action sends an email to a list of customers notifying them that a specific product variant is back in stock.",
69+
"tags": ["added"]
70+
},
71+
"sendWishlistEmail": {
72+
"description": "This action sends a summary email to a customer about their wishlist, highlighting items that are now on sale or have been removed, and schedules the next update email.",
73+
"tags": ["added"]
74+
},
75+
"startCustomerUpdates": {
76+
"description": "This scheduled action fetches all customers due for a wishlist email update and enqueues another action to send the emails in batches.",
77+
"tags": ["added"]
78+
}
79+
},
80+
"featuredAccessControls": {
81+
"shopify-storefront-customers": {
82+
"wishlist": {
83+
"description": "Grants permissions to logged-in storefront customers to fully manage their own wishlists (read, create, update, delete)."
84+
}
85+
}
86+
},
87+
"featuredFrontends": {
88+
"web/routes/_app._index.tsx": {
89+
"description": "This file is the main admin page for the Shopify app that displays a form for updating the default newsletter notification frequency for the shop.",
90+
"tags": ["edited"]
91+
},
92+
"extensions/wishlists-storefront/blocks/addToWishlist.liquid": {
93+
"description": "A Shopify theme extension block that adds an 'Add to Wishlist' button and functionality to product pages.",
94+
"tags": ["added"]
95+
},
96+
"extensions/wishlists/src/App.tsx": {
97+
"description": "The main React component for the customer account UI. It renders the interface where customers can view and manage all their wishlists and the items within them.",
98+
"tags": ["added"]
99+
}
100+
},
101+
"featuredFiles": {
102+
"api/utils/email/InStockEmail.tsx": {
103+
"description": "This file is a React component that renders an email template to notify customers that a product variant is back in stock.",
104+
"tags": ["added"]
105+
},
106+
"api/utils/email/renderEmail.tsx": {
107+
"description": "This file is a utility that renders different email templates based on the provided payload, supporting both 'wishlist' and 'inStock' email types.",
108+
"tags": ["added"]
109+
},
110+
"api/utils/email/WishlistEmail.tsx": {
111+
"description": "This file is a React component that renders an email to a customer with updates on their wishlist, including items on sale and items that are no longer available.",
112+
"tags": ["added"]
113+
},
114+
"api/utils/types.ts": {
115+
"description": "This file defines TypeScript types for email payloads, product variant data, and wishlist changes used throughout the wishlist email functionality.",
116+
"tags": ["added"]
117+
},
118+
"api/utils/updateWishlistMetafield.ts": {
119+
"description": "This file is a utility function that aggregates all wishlists and their items for a specific customer and stores them as a JSON metafield on the customer's Shopify record.",
120+
"tags": ["added"]
121+
}
122+
}
123+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Product wishlists
2+
3+
Core Purpose: This application provides a comprehensive wishlist feature for Shopify stores. It allows shoppers to create multiple wishlists, add product variants to them, and manage their selections through their customer account. This enhances the shopping experience by enabling customers to save products for future purchase, increasing engagement and potential sales.
4+
5+
Key Functionality:
6+
7+
- Multi-Wishlist Management: Customers can create, name, and manage several distinct wishlists (e.g., "Birthday List," "Holiday Gift Ideas") directly within their customer account page.
8+
- Theme app extension: An "Add to Wishlist" button is available on product pages, allowing shoppers to easily add items to their chosen wishlist without leaving the product page.
9+
- Customer account UI extension: A dedicated UI within the Shopify Customer Account page allows logged-in users to view all their wishlists, the items in each, and remove items as needed.
10+
- Email notifications: The app is equipped to send emails related to wishlists, such as sharing a wishlist or notifying a customer when a desired out-of-stock item becomes available again.
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
## Getting started
1+
# Getting started
22

33
A pre-requisite for this application is to install the [Shopify CLI](https://shopify.dev/docs/api/shopify-cli#installation) locally. A list of steps that you should follow:
44

55
1. [Connect to Shopify](https://docs.gadget.dev/guides/tutorials/connecting-to-shopify#connecting-to-shopify) using our built-in Shopify plugin. Make sure that you fill out the Protected Customer Data Access form in the Shopify Partner dashboard.
66

7-
2. Sync your application's files locally using the [Gadget CLI](https://docs.gadget.dev/guides/development-tools/cli). An example command can be found at the top left of the application's Gadget editor.
7+
2. Create a shopify app proxy that has proxy URL matching `https://<application-slug>--<env-slug>.gadget.app/proxy`. Note the subpath used in the theme app extension's JS file. Take a look at these docs if you're unsure how to do so:
88

9-
3. Add an empty `shopify.app.toml` file to the root of your application. This will be used to run the Shopify CLI.
9+
- [Shopify docs](https://shopify.dev/docs/apps/build/online-store/display-dynamic-data)
10+
- [Gadget docs](https://docs.gadget.dev/guides/plugins/shopify/advanced-topics/extensions#authenticated-requests-with-shopify-app-proxies)
1011

11-
4. Modify the CDN URL on `line 2` of `extensions/wishlists-storefront/blocks/addToWishlist.liquid` to point to the correct application and environment. Modify the application and environment on `line 2` and `5` of `extensions/wishlists/src/api.js`.
12+
3. Sync your application's files locally using the [Gadget CLI](https://docs.gadget.dev/guides/development-tools/cli). An example command can be found at the top left of the application's Gadget editor.
1213

13-
5. Run `yarn dev` to run the Shopify CLI (locally) and connect to the Shopify app created in step 1.
14+
4. Run `yarn shopify:dev` to run the Shopify CLI (locally) and connect to the Shopify app created in step 1.
1415

15-
6. Install the application on a development store and create a customer account on the online store. Once this is done, you can step through the application and test the functionality.
16+
5. Install the application on a development store and create a customer account on the online store. Once this is done, you can step through the application and test the functionality.
1617

17-
### Customer account UI extension
18+
## Customer account UI extension
1819

19-
To test the functionality of the customer account UI extension, make sure that you select a preview store on which your application is installed. Run `yarn dev` locally and type `p` once the Shopify development environment has spun up. Open the link to the customer account UI extension and test the functionality.
20+
To test the functionality of the customer account UI extension, make sure that you select a preview store on which your application is installed. Run `yarn shopify:dev` locally and type `p` once the Shopify development environment has spun up. Open the link to the customer account UI extension and test the functionality.
2021

2122
Make sure change the application and environment on `line 2` and `5` of `extensions/wishlists/src/api.js`.
2223

23-
### Theme app extension
24+
## Theme app extension
2425

2526
To test your theme app extension on a storefront, navigate to your installed development store. From there, go to the online store's admin page and click on the `Customize` button next to the theme selector. Here's navigate to a product page and add the section and save.
2627

27-
Make sure to change the value of the minified JS CDN on `line 2` of `extensions/wishlists-storefront/blocks/addToWishlist.liquid` to your application (and environment's) CDN URL.
28+
Make sure to change the value of the proxy subpaths in `extensions/wishlists-storefront/blocks/addToWishlist.js` to your application's (and environment's) URL.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Allow customers to add any product to their personal wishlists directly from your product pages.
2+
- Empower shoppers to create and manage multiple wishlists for different occasions, like birthdays or holidays.
3+
- Seamlessly integrates with the Shopify Customer Account page for a native and intuitive user experience.
4+
- Tenancy enforced: Wishlist data is unique to the store it's installed on, and each customer's wishlists are kept private.
5+
- Ready-to-Use: Comes pre-built with a Shopify connection, data models, backend logic, a storefront "Add to Wishlist" button, and a complete customer account UI for wishlist management.
Loading

0 commit comments

Comments
 (0)