Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento #749

Open
wants to merge 410 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
410 commits
Select commit Hold shift + click to select a range
de0651e
fix(magento): return extend
aka-sacci-ccr Jun 6, 2024
f8e29f2
Merge branch 'magento' of github.com:deco-cx/apps into magento-feat-r…
aka-sacci-ccr Jun 6, 2024
784126a
fix(magento): optional stale in extend
aka-sacci-ccr Jun 6, 2024
d5af451
fix(magento): structured data
aka-sacci-ccr Jun 7, 2024
f5810b6
fix(magento): extend props
aka-sacci-ccr Jun 7, 2024
597dc90
Merge branch 'magento' into magento-wishlist
gabrielMatosBoubee Jun 7, 2024
dbff898
Merge pull request #637 from gabrielMatosBoubee/magento-wishlist
JonasJesus42 Jun 7, 2024
fbf97f2
Merge branch 'magento' into phpsessid
gabrielMatosBoubee Jun 7, 2024
5c18600
Merge pull request #636 from gabrielMatosBoubee/phpsessid
JonasJesus42 Jun 7, 2024
7195790
Merge branch 'magento' of github.com:deco-cx/apps into magento-feat-r…
aka-sacci-ccr Jun 7, 2024
b1902e5
fix: Add the correct image to the image and return the error message
JonasJesus42 Jun 7, 2024
3ce5c60
Merge branch 'magento' into magento-bugfix/add-coupon
JonasJesus42 Jun 7, 2024
59e5fff
Merge pull request #642 from deco-cx/magento-bugfix/add-coupon
JonasJesus42 Jun 7, 2024
d3a96c9
fix: erros types
JonasJesus42 Jun 7, 2024
310f694
fix: changing the import file
JonasJesus42 Jun 7, 2024
4adb0b8
fix: add error object type
JonasJesus42 Jun 7, 2024
b252909
feat(magento): extend in PLP and shelves
aka-sacci-ccr Jun 7, 2024
0c9ea7a
Merge branch 'magento' into magento-feat-reviews
aka-sacci-ccr Jun 7, 2024
1f0e13c
Merge pull request #640 from deco-cx/magento-feat-reviews
aka-sacci-ccr Jun 7, 2024
b4086e9
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 7, 2024
4d51600
feat: adding option to create card to add item
JonasJesus42 Jun 9, 2024
16654c8
feat(magento) - cart fallback
aka-sacci-ccr Jun 10, 2024
a9f5e4e
fix(magento): minor fixes
aka-sacci-ccr Jun 11, 2024
7ac6e73
Merge pull request #652 from deco-cx/magento-fix-cart-fallback
aka-sacci-ccr Jun 11, 2024
bc82baa
fix(magento): coupon in cart
aka-sacci-ccr Jun 11, 2024
bd90f3e
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 11, 2024
9f12796
fix(cart): type on cart with image
aka-sacci-ccr Jun 11, 2024
5f7e0a8
fix(newsletter): subscribe minor fix
aka-sacci-ccr Jun 11, 2024
168449e
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 11, 2024
eae8c01
first commit
aka-sacci-ccr Jun 12, 2024
7c5258b
merge
JonasJesus42 Jun 12, 2024
8446ef4
fix(cart): catch now works on frontend
aka-sacci-ccr Jun 12, 2024
610f433
fix: writing error adjustment
JonasJesus42 Jun 12, 2024
720b58a
Merge pull request #648 from deco-cx/magento-feature/option-create-ca…
JonasJesus42 Jun 12, 2024
b07e52e
fix(mangeto): cart type
aka-sacci-ccr Jun 12, 2024
e44e19b
fix(cart): fix started
aka-sacci-ccr Jun 12, 2024
5c2d8e7
fix: setting the cookie and correct way
JonasJesus42 Jun 13, 2024
e674d08
fix: remove hardcode values
JonasJesus42 Jun 13, 2024
3bc38b1
feat(magento) - graphQL queue estructured
aka-sacci-ccr Jun 13, 2024
d991a39
fix(cart): cart gen logic
aka-sacci-ccr Jun 13, 2024
d4a4d64
Merge branch 'magento' of github.com:deco-cx/apps into magento-cart-fix
aka-sacci-ccr Jun 13, 2024
ff0ee77
Merge pull request #657 from deco-cx/magento-cart-fix
aka-sacci-ccr Jun 13, 2024
58ab6cd
feat(magento): cart fallback
aka-sacci-ccr Jun 13, 2024
22295f6
fix(magento): addItem spread
aka-sacci-ccr Jun 13, 2024
25f7eff
Merge pull request #659 from deco-cx/magento-cart-error
aka-sacci-ccr Jun 14, 2024
2f80287
Merge branch 'magento' of github.com:deco-cx/apps into magento-pdp-gr…
aka-sacci-ccr Jun 14, 2024
3d25fb1
feat(magento): pdp typing
aka-sacci-ccr Jun 14, 2024
c14167d
fix(proxies) - x-forwarded-for on proxy
aka-sacci-ccr Jun 14, 2024
06bac79
fix(mangeto): proxies
aka-sacci-ccr Jun 14, 2024
406ba74
feat(magento): middleware added
aka-sacci-ccr Jun 14, 2024
bedb938
fix: add priceSpecification in transform and additionalProperty
gabrielMatosBoubee Jun 14, 2024
348f60e
fix(proxies): PHPSSID removed
aka-sacci-ccr Jun 14, 2024
66115eb
fix(magento): cookie fix
aka-sacci-ccr Jun 15, 2024
2119b8c
feat: form_key as unique value
carcara-gustavo Jun 15, 2024
b7c2179
Update transform.ts
aka-sacci-ccr Jun 15, 2024
c1d38d7
fix: resolve ascii chars in cookie
carcara-gustavo Jun 15, 2024
1207c78
fix: remove expires from form_key
carcara-gustavo Jun 15, 2024
748d73e
Merge pull request #661 from gabrielMatosBoubee/magento-pdp-graph-boubee
carcara-gustavo Jun 15, 2024
6439061
fix: form key expires and cookie ein creation
carcara-gustavo Jun 15, 2024
5cbe0c4
style: auto format code
carcara-gustavo Jun 15, 2024
e75e261
Merge branch 'magento' of github.com-carcara:deco-cx/apps into magent…
carcara-gustavo Jun 15, 2024
ff812ad
fix(magento): PDP graphql loader
aka-sacci-ccr Jun 15, 2024
64b2ab8
Merge branch 'magento' of github.com:deco-cx/apps into magento-fix-pr…
aka-sacci-ccr Jun 15, 2024
a374746
fix(magento): product url
aka-sacci-ccr Jun 15, 2024
51d1f89
Merge branch 'magento' of github.com:deco-cx/apps into magento-fix-pr…
aka-sacci-ccr Jun 15, 2024
16b1870
chore: create old version of addItem
carcara-gustavo Jun 16, 2024
3469b06
chore: auto format files
carcara-gustavo Jun 16, 2024
be4c86a
feat: communicate cart with Checkout
carcara-gustavo Jun 16, 2024
30241f6
style: auto format files
carcara-gustavo Jun 16, 2024
155e704
chore(magento): setSimulation await
aka-sacci-ccr Jun 17, 2024
13d1c67
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 17, 2024
5d6c389
chore(magento): log removed
aka-sacci-ccr Jun 17, 2024
4bc67b9
fix: adding api to add item after having cart id
JonasJesus42 Jun 19, 2024
aa1b847
fix: analytics magento (#670)
igorbrasileiro Jun 19, 2024
200fdce
chore(temp): putting it right away to understand the error that occur…
JonasJesus42 Jun 19, 2024
cc22bdf
fix(magento): props reordered
aka-sacci-ccr Jun 19, 2024
d75c070
fix(magento): API key to secret
aka-sacci-ccr Jun 19, 2024
841e1eb
fix(magento): proxies logic
aka-sacci-ccr Jun 19, 2024
6313069
Merge pull request #673 from deco-cx/magento-fix-proxies
aka-sacci-ccr Jun 19, 2024
9b6f63c
chore(temp): add log before trow error
JonasJesus42 Jun 20, 2024
363b8ce
Merge branch 'magento' of github.com:deco-cx/apps into magento
JonasJesus42 Jun 20, 2024
62e5b7a
fix: changing loading to false when errors occur
JonasJesus42 Jun 20, 2024
d16bffb
chore: logs tests
JonasJesus42 Jun 20, 2024
b31f254
chore: logs tests
JonasJesus42 Jun 20, 2024
3de937e
fix(magento) - added optional redirect
aka-sacci-ccr Jun 20, 2024
7cd3d61
Merge branch 'magento' of github.com:deco-cx/apps into magento-fix-re…
aka-sacci-ccr Jun 20, 2024
0018ed4
Merge pull request #676 from deco-cx/magento-fix-redirects
aka-sacci-ccr Jun 20, 2024
c558826
Merge branch 'main' into magento
JonasJesus42 Jun 20, 2024
90a522a
chore: logs tests
JonasJesus42 Jun 20, 2024
05b002a
chore: add trow error
JonasJesus42 Jun 20, 2024
55b020d
chore: testing different API to add item
JonasJesus42 Jun 20, 2024
3bb4092
chore: testing fatch to add item
JonasJesus42 Jun 20, 2024
758534e
chore: return response fetch
JonasJesus42 Jun 20, 2024
c1427da
chore: return response adminClient
JonasJesus42 Jun 20, 2024
062a7c2
fix(magento): redirects
aka-sacci-ccr Jun 20, 2024
d4afb7a
Merge branch 'magento' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 20, 2024
dedab2a
feat: adding option to update cartId if checkout changes cartid
JonasJesus42 Jun 20, 2024
263d43f
fix: removing log and rollback additem code
JonasJesus42 Jun 20, 2024
b7a7f8a
fix: removing the if ( , ) and replacing it with &&
JonasJesus42 Jun 20, 2024
641d5e0
fix: add return next()
JonasJesus42 Jun 20, 2024
dfa0126
fix: validating undefined value problems
JonasJesus42 Jun 20, 2024
4c72d75
chore(temp): logs
JonasJesus42 Jun 21, 2024
aa036a3
fix: remove is logged in
JonasJesus42 Jun 21, 2024
15aac88
fix: add all cookies on headers
JonasJesus42 Jun 21, 2024
4a9fc49
chore: lint
JonasJesus42 Jun 21, 2024
2b8efe9
fix: remove quote_id on if
JonasJesus42 Jun 21, 2024
dda9e42
fix: chang for Number.isNaN
JonasJesus42 Jun 21, 2024
1f50791
chore: add logs on middleware
carcara-gustavo Jun 21, 2024
b2b8aaa
fix: treating null values
JonasJesus42 Jun 21, 2024
c9d0886
fix: treating null values
JonasJesus42 Jun 21, 2024
fe087e6
fix: add optional operator on canonical_url
JonasJesus42 Jun 21, 2024
334a084
fix: changed router /V1 to /granado/customer/section/load/?sections=c…
JonasJesus42 Jun 21, 2024
547d0b4
fix: add optional operator on products items name
JonasJesus42 Jun 21, 2024
c350a50
fix: solve intermitent bug on global sections
carcara-gustavo Jun 21, 2024
5979978
Merge branch 'magento' of github.com:deco-cx/apps into magento
carcara-gustavo Jun 21, 2024
680a455
fix: sintax bug
carcara-gustavo Jun 21, 2024
93516e3
add all proxies
carcara-gustavo Jun 21, 2024
a92e6cb
fix: set cookies only if there are no value
carcara-gustavo Jun 21, 2024
281be66
fix(magento): several fixes
aka-sacci-ccr Jun 21, 2024
7327cfa
feat: add priority high in cart cookie
carcara-gustavo Jun 21, 2024
2e4a54f
Merge branch 'magento' of github.com:deco-cx/apps into magento
carcara-gustavo Jun 21, 2024
23cf73e
Merge branch 'main' of github.com:deco-cx/apps into magento
carcara-gustavo Jun 21, 2024
5594e9d
fix: use always addItem flow
carcara-gustavo Jun 21, 2024
4740de7
chore: loggin cart on logger
aka-sacci-ccr Jun 22, 2024
1862e78
chore(temp): add logger cart loader
JonasJesus42 Jun 22, 2024
fd76a0f
Merge branch 'magento' of github.com:deco-cx/apps into magento
JonasJesus42 Jun 22, 2024
0c2485d
chore(temp): add logger cart loader
JonasJesus42 Jun 22, 2024
d1fd632
chore(temp): chang log error to info
JonasJesus42 Jun 22, 2024
8b4af89
chore: logging with info
aka-sacci-ccr Jun 22, 2024
6859a65
Merge branch 'magento' of github.com:deco-cx/apps into magento-fix-se…
aka-sacci-ccr Jun 22, 2024
a7d62af
fix: adding high priority to PHPSESSID cookies
JonasJesus42 Jun 22, 2024
29f66d9
feat(magento): cart images in gql
aka-sacci-ccr Jun 22, 2024
1fe1935
Merge pull request #678 from deco-cx/cookie-priority-high
JonasJesus42 Jun 22, 2024
68db6a9
fix: using parallelization and decreasing loops
JonasJesus42 Jun 22, 2024
6a57333
fix: changing the search from url_path to url_key
JonasJesus42 Jun 23, 2024
36fa306
fix: removing function with duplicate use in the same variable
JonasJesus42 Jun 23, 2024
d77f46f
Merge pull request #680 from deco-cx/get-category-url-key
JonasJesus42 Jun 23, 2024
f5761aa
Merge pull request #679 from deco-cx/optimizing-the-add-item
JonasJesus42 Jun 23, 2024
4f76c23
Merge branch 'magento' of github.com:deco-cx/apps into magento-poc-gr…
aka-sacci-ccr Jun 24, 2024
d4b9fb8
feat(magento): gql images in cart
aka-sacci-ccr Jun 24, 2024
33d2550
feat(magento): cart images stale
aka-sacci-ccr Jun 24, 2024
c9921b7
fix(magento): promise.all in totalizers
aka-sacci-ccr Jun 24, 2024
a627bc7
Merge pull request #682 from deco-cx/magento-poc-graphql-cart-images
aka-sacci-ccr Jun 24, 2024
8e17c01
feat(magento): idle action
aka-sacci-ccr Jun 24, 2024
a873b2c
fix(magento): PLP cache
aka-sacci-ccr Jun 25, 2024
54c077a
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 25, 2024
63292b8
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 25, 2024
08b4521
fix: add await (#664)
gabrielMatosBoubee Jun 25, 2024
207e295
fix(magento): plp url
aka-sacci-ccr Jun 26, 2024
29233a6
Merge pull request #684 from deco-cx/magento-fix-plp-url
aka-sacci-ccr Jun 26, 2024
77d305e
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 26, 2024
821ef5d
fix(magento): urlkey
aka-sacci-ccr Jun 26, 2024
a5eeed8
prop added
aka-sacci-ccr Jun 26, 2024
1bb38d2
Merge pull request #685 from deco-cx/magento-fix-urlkey
aka-sacci-ccr Jun 26, 2024
6336f7b
Merge branch 'magento' of github.com:deco-cx/apps into magento-option…
aka-sacci-ccr Jun 26, 2024
c47574d
feat(magento): return cart is optional in actions
aka-sacci-ccr Jun 26, 2024
c71f5d0
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 26, 2024
f40988e
Merge branch 'magento' of github.com:deco-cx/apps into magento-option…
aka-sacci-ccr Jun 26, 2024
52f2004
chrore(magento): cart after action blocked
aka-sacci-ccr Jun 26, 2024
5a3f049
fix(magento): pdp in uses only gql
aka-sacci-ccr Jun 27, 2024
84bbfa2
Merge pull request #688 from deco-cx/magento-fix-pdp-gql
aka-sacci-ccr Jun 27, 2024
ec71a40
feat(magento): onLoad refresh is optional
aka-sacci-ccr Jun 27, 2024
53c8444
Merge branch 'magento' of github.com:deco-cx/apps into magento-option…
aka-sacci-ccr Jun 27, 2024
e178bc0
quick fix
aka-sacci-ccr Jun 28, 2024
6ac6d73
fix(magento): dangerously name
aka-sacci-ccr Jun 28, 2024
5234070
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jun 28, 2024
982760e
Merge branch 'magento' of github.com:deco-cx/apps into magento-option…
aka-sacci-ccr Jun 28, 2024
d2c50be
Merge pull request #696 from deco-cx/magento-optional-cart-return
aka-sacci-ccr Jul 1, 2024
804e2a5
feat(magento): livelo added
aka-sacci-ccr Jul 2, 2024
c6dafb7
fix(magento): pdp extension logic
aka-sacci-ccr Jul 2, 2024
d7f0724
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 2, 2024
ec77d18
Merge branch 'magento' of https://github.com/deco-cx/apps into feat-m…
aka-sacci-ccr Jul 2, 2024
d20f382
fix(magento): extension fix
aka-sacci-ccr Jul 3, 2024
d672044
fix(magento): breacrumb pdp
aka-sacci-ccr Jul 3, 2024
9e8d039
Merge branch 'magento' of https://github.com/deco-cx/apps into feat-m…
aka-sacci-ccr Jul 3, 2024
00f58c2
fix(magento): createCartOnAddItem removed
aka-sacci-ccr Jul 3, 2024
1c5ad9e
Merge branch 'magento' of https://github.com/deco-cx/apps into feat-m…
aka-sacci-ccr Jul 3, 2024
09d09ea
Merge pull request #698 from deco-cx/feat-magento-livelo
aka-sacci-ccr Jul 4, 2024
ddbea98
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 4, 2024
ecad329
feat: disable wishlist
carcara-gustavo Jul 6, 2024
4653ef3
style: auto format
carcara-gustavo Jul 6, 2024
3ee7f21
chore: remove console.log
carcara-gustavo Jul 6, 2024
9028aa2
style: auto format
carcara-gustavo Jul 6, 2024
86fddab
feat: remove load call from setSimulation
carcara-gustavo Jul 6, 2024
d5489a1
chore: add log
carcara-gustavo Jul 6, 2024
c2c8c0b
chore: add log
carcara-gustavo Jul 6, 2024
6454ce7
chore: add headers
carcara-gustavo Jul 6, 2024
ebbe958
chore: try to get cookies
carcara-gustavo Jul 6, 2024
eeadf2e
chore: reset middleware
carcara-gustavo Jul 6, 2024
0bfa281
Merge branch 'magento' of https://github.com/deco-cx/apps into magent…
aka-sacci-ccr Jul 8, 2024
a507126
Merge pull request #672 from deco-cx/magento-fix-secret
aka-sacci-ccr Jul 8, 2024
e802844
log mangeto key in logger
aka-sacci-ccr Jul 8, 2024
9901f65
remove key loggin from magento
aka-sacci-ccr Jul 8, 2024
20e7cba
magento(fix): images on cart
aka-sacci-ccr Jul 8, 2024
92bcb5d
chore(magento): handleNonCachedImages
aka-sacci-ccr Jul 10, 2024
001a81b
feat(magento): cart extension
aka-sacci-ccr Jul 10, 2024
286f1d4
feat(magento): doc started
aka-sacci-ccr Jul 10, 2024
b506ac1
chore(magento): docs added
aka-sacci-ccr Jul 10, 2024
306b573
Merge pull request #708 from deco-cx/magento-doc
aka-sacci-ccr Jul 10, 2024
bae3a3d
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 10, 2024
811c72d
Merge branch 'magento' of https://github.com/deco-cx/apps into magent…
aka-sacci-ccr Jul 10, 2024
c0073d3
chore(magento): cart extension updated
aka-sacci-ccr Jul 10, 2024
a100a28
Merge pull request #707 from deco-cx/magento-extension-cart
aka-sacci-ccr Jul 10, 2024
1e5c5f0
fix(magento): sort option
aka-sacci-ccr Jul 10, 2024
95bc842
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 10, 2024
fcad203
Merge branch 'magento' of https://github.com/deco-cx/apps into magent…
aka-sacci-ccr Jul 10, 2024
92f36cc
fix: set cart_id as httpOnly
carcara-gustavo Jul 10, 2024
08212db
Merge branch 'magento' of github.com:deco-cx/apps into magento
carcara-gustavo Jul 10, 2024
8f13eb4
Merge branch 'magento' of https://github.com/deco-cx/apps into magent…
aka-sacci-ccr Jul 11, 2024
0ab00f5
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 11, 2024
ab3be7e
Merge branch 'magento' of https://github.com/deco-cx/apps into magent…
aka-sacci-ccr Jul 11, 2024
916ad95
chore(magento): cached images
aka-sacci-ccr Jul 11, 2024
2dfd29f
Merge pull request #705 from deco-cx/magento-fix-cart-imgs
aka-sacci-ccr Jul 11, 2024
4483789
fix(magento): remove hard coded
aka-sacci-ccr Jul 11, 2024
00cfd81
chore(magento): updated forms and remove non-used loaders
aka-sacci-ccr Jul 11, 2024
cbb08c8
chore(magento): docs updated
aka-sacci-ccr Jul 12, 2024
81eca84
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 15, 2024
e0b70d9
fix(magento): extension on cart
aka-sacci-ccr Jul 15, 2024
9002535
fix(magento): pdp extensions
aka-sacci-ccr Jul 16, 2024
c749eda
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 18, 2024
d810f8c
Merge branch 'magento' of https://github.com/deco-cx/apps into fix-ma…
aka-sacci-ccr Jul 18, 2024
9ed5b5c
Merge branch 'main' of https://github.com/deco-cx/apps into magento
aka-sacci-ccr Jul 23, 2024
87ca199
Merge branch 'magento' of https://github.com/deco-cx/apps into fix-ma…
aka-sacci-ccr Jul 23, 2024
bf22b63
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jul 25, 2024
79c0c46
Merge branch 'magento' of github.com:deco-cx/apps into fix-magento-ex…
aka-sacci-ccr Jul 25, 2024
26c8958
linting
aka-sacci-ccr Jul 25, 2024
61547b1
fix(magento): using invoke in extensions (pdp) + removed non used code
aka-sacci-ccr Jul 25, 2024
92c5757
feat(magento): extensions cached
aka-sacci-ccr Jul 25, 2024
851be32
chore(magento) - remove the old ways of extending
aka-sacci-ccr Jul 26, 2024
f24844d
Merge pull request #746 from deco-cx/fix-magento-extension-cache
aka-sacci-ccr Jul 26, 2024
7a1dbc9
chore(magento): docs updated
aka-sacci-ccr Jul 26, 2024
95fc62f
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Jul 26, 2024
e9e1ad3
Merge branch 'main' of github.com:deco-cx/apps into magento
aka-sacci-ccr Aug 1, 2024
7efc594
feat(magento): site store header
aka-sacci-ccr Aug 1, 2024
6aa264d
fix(magento): fix in title
aka-sacci-ccr Aug 1, 2024
63bd5ae
remove middleware
carcara-gustavo Aug 15, 2024
58f886d
Merge branch 'main' of github.com:deco-cx/apps into magento
carcara-gustavo Aug 16, 2024
d4a4d09
add replaces on proxy
guitavano Aug 22, 2024
4e5cae5
fmt
guitavano Aug 22, 2024
bf38c84
feat: support deno 2.0
vitoUwu Oct 17, 2024
0d52e33
sync main
Dec 3, 2024
0e86a21
magento change product image query to search
IncognitaDev Dec 18, 2024
2eab4d3
magento cart authenticated
IncognitaDev Dec 19, 2024
577aa36
fix: wishlist actions
IncognitaDev Jan 8, 2025
72c4237
magento: add missing form_key in wishlist
IncognitaDev Jan 9, 2025
c221f56
fix: add referer header to fix user req
IncognitaDev Jan 24, 2025
5b4c881
fix: user loader
IncognitaDev Jan 24, 2025
6b00b80
feat: related product loader
IncognitaDev Feb 19, 2025
8adeb89
fix: magento category
IncognitaDev Feb 19, 2025
c7090fe
fix: remove wishlist missing header
IncognitaDev Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const config = {
app("linx"),
app("linx-impulse"),
app("shopify"),
app("magento"),
app("nuvemshop"),
app("website"),
app("commerce"),
Expand Down
19 changes: 19 additions & 0 deletions decohub/apps/magento.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { AppRuntime } from "deco/mod.ts";
import { Markdown } from "../components/Markdown.tsx";
import { PreviewMagento } from "../../magento/preview/Preview.tsx";

export { default } from "../../magento/mod.ts";

export const preview = async (props: AppRuntime) => {
const markdownContent = await Markdown(
new URL("../../magento/README.md", import.meta.url).href,
);

return {
Component: PreviewMagento,
props: {
...props,
markdownContent,
},
};
};
70 changes: 36 additions & 34 deletions decohub/manifest.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@ import * as $$$$$$$$$$$9 from "./apps/implementation.ts";
import * as $$$$$$$$$$$10 from "./apps/konfidency.ts";
import * as $$$$$$$$$$$11 from "./apps/linx-impulse.ts";
import * as $$$$$$$$$$$12 from "./apps/linx.ts";
import * as $$$$$$$$$$$13 from "./apps/mailchimp.ts";
import * as $$$$$$$$$$$14 from "./apps/nuvemshop.ts";
import * as $$$$$$$$$$$15 from "./apps/posthog.ts";
import * as $$$$$$$$$$$16 from "./apps/power-reviews.ts";
import * as $$$$$$$$$$$17 from "./apps/ra-trustvox.ts";
import * as $$$$$$$$$$$18 from "./apps/resend.ts";
import * as $$$$$$$$$$$19 from "./apps/shopify.ts";
import * as $$$$$$$$$$$20 from "./apps/smarthint.ts";
import * as $$$$$$$$$$$21 from "./apps/sourei.ts";
import * as $$$$$$$$$$$22 from "./apps/typesense.ts";
import * as $$$$$$$$$$$23 from "./apps/verified-reviews.ts";
import * as $$$$$$$$$$$24 from "./apps/vnda.ts";
import * as $$$$$$$$$$$25 from "./apps/vtex.ts";
import * as $$$$$$$$$$$26 from "./apps/wake.ts";
import * as $$$$$$$$$$$27 from "./apps/wap.ts";
import * as $$$$$$$$$$$28 from "./apps/weather.ts";
import * as $$$$$$$$$$$29 from "./apps/workflows.ts";
import * as $$$$$$$$$$$13 from "./apps/magento.ts";
import * as $$$$$$$$$$$14 from "./apps/mailchimp.ts";
import * as $$$$$$$$$$$15 from "./apps/nuvemshop.ts";
import * as $$$$$$$$$$$16 from "./apps/posthog.ts";
import * as $$$$$$$$$$$17 from "./apps/power-reviews.ts";
import * as $$$$$$$$$$$18 from "./apps/ra-trustvox.ts";
import * as $$$$$$$$$$$19 from "./apps/resend.ts";
import * as $$$$$$$$$$$20 from "./apps/shopify.ts";
import * as $$$$$$$$$$$21 from "./apps/smarthint.ts";
import * as $$$$$$$$$$$22 from "./apps/sourei.ts";
import * as $$$$$$$$$$$23 from "./apps/typesense.ts";
import * as $$$$$$$$$$$24 from "./apps/verified-reviews.ts";
import * as $$$$$$$$$$$25 from "./apps/vnda.ts";
import * as $$$$$$$$$$$26 from "./apps/vtex.ts";
import * as $$$$$$$$$$$27 from "./apps/wake.ts";
import * as $$$$$$$$$$$28 from "./apps/wap.ts";
import * as $$$$$$$$$$$29 from "./apps/weather.ts";
import * as $$$$$$$$$$$30 from "./apps/workflows.ts";

const manifest = {
"apps": {
Expand All @@ -48,23 +49,24 @@ const manifest = {
"decohub/apps/konfidency.ts": $$$$$$$$$$$10,
"decohub/apps/linx-impulse.ts": $$$$$$$$$$$11,
"decohub/apps/linx.ts": $$$$$$$$$$$12,
"decohub/apps/mailchimp.ts": $$$$$$$$$$$13,
"decohub/apps/nuvemshop.ts": $$$$$$$$$$$14,
"decohub/apps/posthog.ts": $$$$$$$$$$$15,
"decohub/apps/power-reviews.ts": $$$$$$$$$$$16,
"decohub/apps/ra-trustvox.ts": $$$$$$$$$$$17,
"decohub/apps/resend.ts": $$$$$$$$$$$18,
"decohub/apps/shopify.ts": $$$$$$$$$$$19,
"decohub/apps/smarthint.ts": $$$$$$$$$$$20,
"decohub/apps/sourei.ts": $$$$$$$$$$$21,
"decohub/apps/typesense.ts": $$$$$$$$$$$22,
"decohub/apps/verified-reviews.ts": $$$$$$$$$$$23,
"decohub/apps/vnda.ts": $$$$$$$$$$$24,
"decohub/apps/vtex.ts": $$$$$$$$$$$25,
"decohub/apps/wake.ts": $$$$$$$$$$$26,
"decohub/apps/wap.ts": $$$$$$$$$$$27,
"decohub/apps/weather.ts": $$$$$$$$$$$28,
"decohub/apps/workflows.ts": $$$$$$$$$$$29,
"decohub/apps/magento.ts": $$$$$$$$$$$13,
"decohub/apps/mailchimp.ts": $$$$$$$$$$$14,
"decohub/apps/nuvemshop.ts": $$$$$$$$$$$15,
"decohub/apps/posthog.ts": $$$$$$$$$$$16,
"decohub/apps/power-reviews.ts": $$$$$$$$$$$17,
"decohub/apps/ra-trustvox.ts": $$$$$$$$$$$18,
"decohub/apps/resend.ts": $$$$$$$$$$$19,
"decohub/apps/shopify.ts": $$$$$$$$$$$20,
"decohub/apps/smarthint.ts": $$$$$$$$$$$21,
"decohub/apps/sourei.ts": $$$$$$$$$$$22,
"decohub/apps/typesense.ts": $$$$$$$$$$$23,
"decohub/apps/verified-reviews.ts": $$$$$$$$$$$24,
"decohub/apps/vnda.ts": $$$$$$$$$$$25,
"decohub/apps/vtex.ts": $$$$$$$$$$$26,
"decohub/apps/wake.ts": $$$$$$$$$$$27,
"decohub/apps/wap.ts": $$$$$$$$$$$28,
"decohub/apps/weather.ts": $$$$$$$$$$$29,
"decohub/apps/workflows.ts": $$$$$$$$$$$30,
},
"name": "decohub",
"baseUrl": import.meta.url,
Expand Down
48 changes: 48 additions & 0 deletions magento/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<h1>
<p align="center">
<a href="https://developer.adobe.com/commerce/docs/">
Magento Platform Ecommerce Solution
</a>
</p>
</h1>

<p align="center">
<strong>
Start and grow your e-commerce business
</strong>
</p>
<p align="justify">
Loaders, actions and workflows for adding Magento Commerce Platform to your deco.cx website.
</p>

<p align="justify">
Magento, by Adobe, is a PHP-based eCommerce platform offering robust customization and scalability. It features extensive API integrations and flexible product and order management. Magento supports multiple languages and currencies.
</p>

# Installation

- Install via decohub
- Fill the necessary fields
- Only fill the "dangerously" fields (located on "Features" section) if you REALLY SURE about what are you doing.

# Settings in Magento

<p align="center"><strong>To ensure the proper functioning of the loaders, follow this instructions in Magento Admin:</strong></p>

<h3><a href="https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/products/">Products Query (GraphQL)</a></h3>

- Enable "<strong>Use in Search</strong>", at least, on the following attributes: <a href="https://github.com/magento/magento2/issues/27518">See more</a>
<ul>
<li><strong>url_key</strong></li>
<li><strong>sku</strong></li>
<li><strong>category_uid</strong></li>
<li><strong>category_id</strong></li>
</ul>

- Enable "<strong>Used in Sorting in Product Listing</strong>" on the "<strong>Custom Filters</strong>" attributes. <a href="https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/products/#sort-attribute">See more</a>

<h3><a href="https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/categories/">Categories Query (GraphQL)</a></h3>

- Enable "<strong>Use in Search</strong>" on the "<strong>url_key</strong>" attribute. <a href="https://github.com/magento/magento2/issues/27518">See more</a>

<p align="center">🎉 Your Magento setup is complete.</p>
57 changes: 57 additions & 0 deletions magento/actions/amasty/submitReview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { AppContext } from "../../mod.ts";
import { SubmitReviewAmastyAPI } from "../../utils/client/types.ts";
import { Ratings as RatingsAPI } from "../../utils/client/types.ts";

export interface Props {
/**
* @title Path of the REST API
* @description The partial path of the API. ex: /all/V1/custom/review
*/
path: string;
product_id: number;
customer_id: number;
nickname: string;
title: string;
detail: string;
ratings: Array<Ratings>;
}

interface Ratings {
key: string;
value: string;
}

/**
* @title Magento Integration - Submit review
* @description Submit review action
*/
const loader = async (
props: Props,
_req: Request,
ctx: AppContext,
): Promise<SubmitReviewAmastyAPI> => {
const { clientAdmin } = ctx;
const ratings = props.ratings.reduce<RatingsAPI>((acc, rating) => {
acc[`${rating.key}`] = rating.value;
return acc;
}, {});

return await clientAdmin["POST /rest/:reviewUrl"](
{
reviewUrl: props.path.replace(/^\/?(rest\/)?/, ""),
},
{
body: {
product_id: props.product_id,
customer_id: props.customer_id,
nickname: props.nickname,
title: props.title,
detail: props.detail,
ratings,
store_id: `${ctx.storeId}`,
},
},
).then((r) => r.json());
};

export default loader;
50 changes: 50 additions & 0 deletions magento/actions/cart/addCoupon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { Cart } from "../../loaders/cart.ts";
import type { AppContext } from "../../mod.ts";
import { getCartCookie, handleCartActions } from "../../utils/cart.ts";
import { OverrideFeatures } from "../../utils/client/types.ts";

export interface Props extends OverrideFeatures {
couponCode: string;
}

interface ErrorAddCoupon {
message: string;
status: number;
}

/**
* @title Magento Integration - Add coupon
* @description Add coupon action
*/
const action = async (
props: Props,
req: Request,
ctx: AppContext,
): Promise<Cart | ErrorAddCoupon | null> => {
const { couponCode, dangerouslyOverrideReturnNull } = props;
const { clientAdmin, features } = ctx;
const dontReturnCart = dangerouslyOverrideReturnNull ??
features.dangerouslyReturnNullAfterAction;

const cartId = getCartCookie(req.headers);
try {
await clientAdmin["PUT /rest/:site/V1/carts/:cartId/coupons/:couponCode"]({
cartId,
site: ctx.site,
couponCode: couponCode,
});
} catch (error) {
console.error(error);
return handleCartActions(dontReturnCart, {
req,
ctx,
error,
});
}

return handleCartActions(dontReturnCart, {
req,
ctx,
});
};
export default action;
108 changes: 108 additions & 0 deletions magento/actions/cart/addItem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { getCookies, setCookie } from "std/http/cookie.ts";
import { Cart } from "../../loaders/cart.ts";
import { parseCookieString } from "../../middleware.ts";
import type { AppContext } from "../../mod.ts";
import { handleCartActions } from "../../utils/cart.ts";
import { FORM_KEY_COOKIE } from "../../utils/constants.ts";
import { HttpError } from "../../../utils/http.ts";
import { OverrideFeatures } from "../../utils/client/types.ts";

export interface Props extends OverrideFeatures {
qty: number;
sku: string;
productId: string;
}

/**
* @title Magento Integration - Add item to cart
* @description Add item action
*/
const action = async (
props: Props,
req: Request,
ctx: AppContext,
): Promise<Cart | null> => {
const { qty, productId, dangerouslyOverrideReturnNull } = props;
const { headers, url } = req;
const { site, baseUrl, features } = ctx;
const dontReturnCart = dangerouslyOverrideReturnNull ??
features.dangerouslyReturnNullAfterAction;

const formKey = getCookies(headers)[FORM_KEY_COOKIE] ?? "";

const newHeaders = new Headers();

const requestCookies = headers.get("Cookie");

if (requestCookies) {
newHeaders.append("Cookie", requestCookies);
}
newHeaders.append("Origin", baseUrl);
newHeaders.append("Referer", url);
newHeaders.append("X-Requested-With", "XMLHttpRequest");
newHeaders.append("Content-Type", "application/x-www-form-urlencoded");

const urlencoded = new URLSearchParams();
urlencoded.append("product", productId);
urlencoded.append("form_key", formKey);
urlencoded.append("qty", String(qty));

try {
const fetchResult = await fetch(
`${baseUrl}/${site}/checkout/cart/add/uenc/${
btoa(baseUrl).replace(/=/g, "~")
}/product/${productId}`,
{
method: "POST",
headers: newHeaders,
body: urlencoded,
},
);

if (fetchResult.status != 200) {
throw new HttpError(
fetchResult.status,
JSON.stringify({ message: fetchResult.statusText }),
);
}
const fetchHeaders = fetchResult.headers;

let cartId;
const cookies = fetchHeaders.getSetCookie();
cookies.forEach((cookie) => {
const parsed = parseCookieString(cookie, url.includes("localhost"));

if (parsed.name === "dataservices_cart_id") {
cartId = parsed.value.replace(/%22/g, "");
setCookie(ctx.response.headers, {
...parsed,
httpOnly: true,
secure: true,
path: "/",
unparsed: ["Priority=High"],
});
return;
}

setCookie(ctx.response.headers, {
...parsed,
path: "/",
});
});

return handleCartActions(dontReturnCart, {
req,
ctx,
cartId,
});
} catch (error) {
console.error(error);
return handleCartActions(dontReturnCart, {
req,
ctx,
error,
});
}
};

export default action;
Loading