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

Missing "fetch" #32

Closed
camposcristian opened this issue Oct 31, 2019 · 18 comments
Closed

Missing "fetch" #32

camposcristian opened this issue Oct 31, 2019 · 18 comments

Comments

@camposcristian
Copy link
Contributor

Error in Website Frontend

ReferenceError in components/shop/cartContainer.js:27
Can't find variable: fetch

View on Bugsnag

Stacktrace

components/shop/cartContainer.js:27 - 
index.js:18 - 

View full stacktrace

Created by Rin Raeuber via Bugsnag

@rin
Copy link

rin commented Oct 31, 2019

This looks like a real error – first I though it's because fetch is not supported in mobile safari <10.3 and IE.
https://caniuse.com/#feat=fetch
… but it seems we are using a polyfill, or at least we try to (whatwg-fetch) – so either the error is something else or our polyfills are not working as expected. Further investigation is needed! 🕵️‍♀️

@mischacolley
Copy link
Contributor

@kbardi is this one on your radar?

@lulen11
Copy link
Contributor

lulen11 commented Dec 19, 2019

@kbardi roughly estimates 4h or less. We have included it to be done within #4 EPIC

@kbardi
Copy link
Contributor

kbardi commented Dec 21, 2019

That is quite weird, I cannot reproduce it...it seems like shopify library has some errors...maybe we can upgrade shopify version, because fetch is inside shopify, and I checked on production and shopifyClient.checkout.fetch is a function

@kbardi
Copy link
Contributor

kbardi commented Dec 21, 2019

Maybe it is in a different browser or OS, but I tried on Chrome and Safari, and when I write window.shopify.checkout.fetch, it does exist

@camposcristian
Copy link
Contributor Author

camposcristian commented Dec 23, 2019

In #4 we have this issue :

  • Close the PR of Apparel from website-v4 and transfer the structural work we did @davidpaley

Maybe we can take this opportunity to transfer those tweaks of using shopify with a cache? @davidpaley @mischacolley what do you think?

@kbardi
Copy link
Contributor

kbardi commented Jan 8, 2020

@camposcristianeze @davidpaley is it still an issue? Have we created an issue for Shopify? Can I close this issue?

@camposcristian
Copy link
Contributor Author

Surely as this still an issue in v4 so it will be here until we transfer the work on this PR --> https://github.com/aimementoring/website-v4/pull/797 . @kbardi maybe you can close this, and create a new one referencing this one to transfer that PR as it is. Then when @charliemckenzie 's designs for "The Mentor Page" and anything else Shopify related is ready we can finish the rest.

@kbardi
Copy link
Contributor

kbardi commented Jan 9, 2020

Are we going to migrate Shopify to the new architecture? I understood we are going to open shopify page...I think we can create an issue on shopify because for me it seems to be a problem with the library we are using...the thing is sometimes it doesn't load correctly the functionwindow.shopify.checkout.fetch, which is internal from shopify...we can add some validations, but if it doesn't exists and we validate if exists or not, we will disable checkout fetch action when it does not exists, which is not a good idea

@camposcristian
Copy link
Contributor Author

Are we going to migrate Shopify to the new architecture? I understood we are going to open shopify page..

I was under the impression that we will for pages like https://aimementoring.com/products/the-mentor but it's true that if that's all we have we don't really need a full cart management workflow + an integration with Shopify with all the issues this brings. Especially after Jack mentioning Apparel being completely separate from AIME.

@charliemckenzie @lulen11 @mischacolley maybe you can provide more context on this?

@mischacolley
Copy link
Contributor

Hmm my initial thought was as @camposcristianeze said ... I'd like to keep the Shopify cart functionality around for products like the Book etc. But given we are trying to simplify logic directly on the website I'm also open to discussion if there is a way we could essentially keep the same feel for the user minus the maintenance cost discussed above.

i.e. I have considered a few causes where using the below well could be ok:

@charliemckenzie @lulen11 @kbardi @camposcristianeze @bronz3beard open to discussion ...

@camposcristian
Copy link
Contributor Author

I like this but with a slightly different approach...

I would say remove all the "shop-like" integration (all the scripts querying to Shopify, /products, etc) and just leave one/two products that are not in shop.aimementoring.com with custom "Campaign" pages coming straight from Contentful.

This might also need a Blueprint Component so then can use it in other contexts :) but the groundwork could be made here and then transferred 👍

@kbardi
Copy link
Contributor

kbardi commented Jan 16, 2020

I think getting products from Contentful is the best approach, because I would like to simplify and reduce errors and maintenance time on the website related to this...I'll talk to @bronz3beard to get some ideas and we can implement it in a different and better way

@camposcristian
Copy link
Contributor Author

Great! some other issues linked to this --> #46 and #37

@kbardi
Copy link
Contributor

kbardi commented Jan 29, 2020

@lulen11 @camposcristianeze could we check if it is still happening in the new architecture? Because I think we can close this issue probably...

@lulen11
Copy link
Contributor

lulen11 commented Feb 18, 2020

@kbardi could we talk about how to check this? Would love to tie this one off.

@kbardi
Copy link
Contributor

kbardi commented Mar 9, 2020

Hey @lulen11 , I think the only way is using a page with Shopify...the only one right now it the book, so using it and checking in the console there is no error with fetch should be enough...I tried and I couldn't reproduce it

@mischacolley
Copy link
Contributor

Closing as to be covered in #284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants