This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In rails console: | |
include FactoryBot::Syntax::Methods | |
#From: https://github.com/thoughtbot/factory_bot/issues/397#issuecomment-6662051 | |
FactoryBot.define do | |
to_create do |instance| | |
unless instance.save | |
raise "Invalid record: " + instance.errors.messages.to_s | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/lib/spree/core/controller_helpers/auth.rb b/core/lib/spree/core/controller_helpers/auth.rb | |
index 3f21ebb7c6..2112505391 100644 | |
--- a/core/lib/spree/core/controller_helpers/auth.rb | |
+++ b/core/lib/spree/core/controller_helpers/auth.rb | |
@@ -54,6 +54,11 @@ module Spree | |
Spree::UserLastUrlStorer.new(self).store_location | |
end | |
+ # Auth extensions are expected to define it, otherwise it's a no-op | |
+ def spree_current_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/gatsby-starter-autonomy/package.json b/packages/gatsby-starter-autonomy/package.json | |
index de49216..1e29395 100644 | |
--- a/packages/gatsby-starter-autonomy/package.json | |
+++ b/packages/gatsby-starter-autonomy/package.json | |
@@ -16,6 +16,8 @@ | |
"dependencies": { | |
"@chordcommerce/chord-magic": "^1.0.0", | |
"@chordcommerce/gatsby-theme-autonomy": "^1.0.0", | |
+ "@stripe/react-stripe-js": "^1.4.1", | |
+ "@stripe/stripe-js": "^1.16.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sku": "bundle-variant-1", | |
"quantity": 1, | |
"options": { | |
"parts": [ | |
{ | |
"sku": "normal-variant-1", | |
"quantity": 4 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location --request PUT 'http://localhost:3000/api/orders/CHORD-579656375/line_items/41' \ | |
--header 'X-Spree-Order-Token: QDpqfwxE2eaUr7oo41B6Zw' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"sku": "product-6", | |
"quantity": 3, | |
"dynamic_promotions_attributes": [ | |
{ | |
"code": "existing_code_to_destroy", | |
"_destroy": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/nextjs-starter-autonomy/src/redux/actions/cart/add-to-cart.js b/packages/nextjs-starter-autonomy/src/redux/actions/cart/add-to-cart.js | |
index e1733c3..eab6c7d 100644 | |
--- a/packages/nextjs-starter-autonomy/src/redux/actions/cart/add-to-cart.js | |
+++ b/packages/nextjs-starter-autonomy/src/redux/actions/cart/add-to-cart.js | |
@@ -12,12 +12,18 @@ export const addToCartRequest = sku => { | |
} | |
} | |
-export const addToCartSuccess = (cart, variant, quantity) => { | |
+export const addToCartSuccess = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/package.json b/package.json | |
index 4b6438c..55622ef 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -22,6 +22,7 @@ | |
"@stripe/terminal-js": "^0.9.0", | |
"babel-plugin-styled-components": "^1.10.7", | |
"copy-to-clipboard": "^3.3.1", | |
+ "date-fns": "^2.28.0", | |
"dotenv": "^10.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"order": { | |
"line_items_attributes": [ | |
{ | |
"sku": "product-1", | |
"quantity": 2, | |
"subscription_line_items_attributes": [ | |
{ | |
"interval_length": 3, | |
"interval_units": "month" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<wrapper class="header"> | |
<container> | |
<row> | |
<columns> | |
<h3 class="text-center"> Hey {{ship_address.firstname}}, </h3> | |
<p class="text-center"> We've updated your order to include your recently purchased items. </p> | |
</columns> | |
</row> | |
</container> | |
</wrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/graphql-cms/queries/catalog.js b/graphql-cms/queries/catalog.js | |
index 75d1f9d..db89a42 100644 | |
--- a/graphql-cms/queries/catalog.js | |
+++ b/graphql-cms/queries/catalog.js | |
@@ -1,6 +1,7 @@ | |
import { fetchGraphQL } from '../api' | |
import { COLLECTION_FRAGMENT } from 'graphql-cms/fragments' | |
import placeholder from 'graphql-cms/utils/placeholder' | |
+import { bootstrapReduxStore } from './redux' | |
NewerOlder