Giter Club home page Giter Club logo

Comments (39)

michaldshefing avatar michaldshefing commented on September 16, 2024 2

@acidlake if you have anything to share in a fork please share , it will be really appreciated - thank you

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024 1

@acidlake Please do the PR. I will try to merge it as fast as possible, we are looking for such contribution towards medusajs integration. With litekart backend svelte-commerce is working excellent. Our next target is to finish up MedusaJs.

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024 1

@itswadesh o thanks a lot, my bad, dint't notice that you are the creator of the repo, il do the PR once im done!!, very great product!

from svelte-commerce.

saimyst avatar saimyst commented on September 16, 2024 1

@acidlake Can you please share?

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024 1

@acidlake if you can share we can try to give a hand there

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024 1

Hello guys, sorry for the time, at first i as doing the changes for my project, however i did a lot of changes to the project that break the other integrations, such as woocomerce, bigcommerce etc, my suggesstion is to create some sort of adapters, that we can plug in for medusaje, woocomerce, bigcommerce etc, we may need to abstract and refactor the project, so the storefront should work with any adapter that we add, again, the modifications that i made as for my project, and since i was just using medusajs, it broke the other integrations, so an adaptar should work. or separate the project for medusajs only but that would created more work

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024 1

@tsemachh @acidlake Merged the pull request to the master. I had to take down 1-2 commits just the keep the dev experience upto the mark.

from svelte-commerce.

ashok-cse avatar ashok-cse commented on September 16, 2024

Can you please screenshot or video for that issue?

from svelte-commerce.

StevenChege avatar StevenChege commented on September 16, 2024

20230519_223224_mfnr.jpg

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

I have the same error

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

EDIT: Looks like this was made for an old version of Medusajs or is not finish the implementation
Found the error, going to add a try catch on utils/server.ts ,Here are some pictures, looks like it needs some modification for medusajs @StevenChege take a look to this,
Screenshot 2023-06-07 at 9 20 30 AM
Screenshot 2023-06-07 at 9 23 37 AM

from svelte-commerce.

StevenChege avatar StevenChege commented on September 16, 2024

Thanks @acidlake, but i still can't make it work. I found the issue stems from my medusa server, with ProductCategory id missing or mismatch . What ProductCategory schema is compatible?
Here is a screenshot.
aa

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

@StevenChege i'm doing modifications to the source code for medusa, since it looks like its using an older version, for the categories id it should be something like: pcat_shirts, also add http://localhost:3000 to your medusa backend store cors, i manage to show some products, but still lot of work to do, i'm changing the code to take into consideration the current medusa version, at least you can login, logout, singup, but still needs to change more stuff
Screenshot 2023-06-07 at 10 42 11 AM

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

@StevenChege this is an screen from my medusa server
Screenshot 2023-06-07 at 10 57 53 AM

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

@acidlake The categories from medusa server looks fine. Is svelte-commerce working fine your side?

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

@itswadesh so far is a mixbag, but i manage to successfully connect, i'm doing changes on svelte-commerce source code to make it work as expected, search don't work, homepage don't show anything, categories are working, but product details is not, still lot of things to fix, once im done il see if i can do a PR, and check if the owner of svelte-commerce accept it, if no il share a repo

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

Ok guys, quick update, so far good progress, here is how the product page looks, i also created a basic image gallery for the product detail page, so far working great with medusa, il continue with the other fixes.

Screenshot 2023-06-07 at 3 39 06 PM

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

Hi, thanks for the update. Can you please push it to a different branch, so that we can have a look and make necessary changes to keep other services working and eventually merge it into master.

We though of making a adaptor for each of those services, where as it would make the developer experience difficult, like F12 key won't work to navigate to the exact method.

Ideas are welcome.

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

Thank you @acidlake and congrats for the new member.
As for the right way to decouple , I think we will be smarter once we see the actual changes.
As long as we stick with having all adaptors in same repo and uncommenting the implementation we want
, the files navigation works on both IJ and Code.
If we keep it all in monorepo with dependencies to the adaptors it may help with the navigation issue , and maybe in general will be good evolution.

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

@acidlake and @itswadesh
I started reviewing the current Medusa APIs , most of them are not working as expected ,
While medusa BE expects mainly Ids , APIs are working with slug(Or handle in mesua terms)
There's a need to call other APIs to accomplish that.
(Sometimes more than one , unless we change the call to pass both slug and Id)
Also I noticed that APIs called are not calling the exact API needed for example getting category products returns all products.
I guess there are more to follow.
One more thing , sometimes the APIs are called from the UI , sometimes from from the server.js ,
I would expect some consistency , as my knowledge in sveltekit preparing the data to the page should be in server.js
(This alone can solve CORS issue we may have with the BE)
@acidlake if you can make the branch I think I can take it from there

Tsemach

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

Thank you @acidlake and congrats for the new member. As for the right way to decouple , I think we will be smarter once we see the actual changes. As long as we stick with having all adaptors in same repo and uncommenting the implementation we want , the files navigation works on both IJ and Code. If we keep it all in monorepo with dependencies to the adaptors it may help with the navigation issue , and maybe in general will be good evolution.

@tsemachh thank you so much for taking time studying the under laying structure and the suggestion. If it solves the file navigations issue, surely mono repo will be a good idea. Would it be possible to setup the file structure, while @acidlake push the changes to a new branch or raise a pull request.

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

@itswadesh I do prefer to get @acidlake PR first so I will have full view of the changes made .
What I can say in general 2 things:

  1. In some point if this project evolves to something big it's better to have API and Themes available as plugins
  2. As for APIs - APIs called to prepare the page should be in the relevant server.js/ts calls , other APIs can be either invoked from the page itself or call API end points on the server which will perform the actual call.
    In other project I did I also had the retrieve APIs using API endpoints , this really helped when I used partial SSG for the API calls
    in our case , categories and product pages data can be pre generated as an API and updated on changes

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

@tsemachh This is interesting, and will give a lot of performance improvements. However I have following questions.

  1. Do we need to rebuild the repo each time the category or product info changes
  2. What if I have a million products, will it be a good idea?

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

Basically in order to support incremental SSG there's a case opened ,
And Vercel has support for it if you run there - https://vercel.com/docs/concepts/incremental-static-regeneration.
Since this is the case , what I did in other project is to generate just the changes and deploy them into the site.
You can define when you generate the changes which routes to re-generate , this way you can have better control of what's generated without waiting for case resolution.
BTW: I did saw that the project does not support product variants which is basic for our case in MedusaJs so we may choose another StoreFront (Unless @acidlake provided decent support for it)

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

Hello Guys, i'm working on the PR at this moment, since originally i fixing the project for my own storefront with different requirements etc, and i was removing everything related to the other backends, since i was keeping medusajs, i created a new fork, and im uploading my changes.

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

Ok guys quick update, there's still a lot of work todo, but at least now the products are being show, categories, product detail page. so you guys can take a look tot he PR, download the branch and take a look.

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

Started looking into all the pull requests. Let's connect on discord before merging so that we can discuss all the aspects to it

I will be available 11:00-19:00 GMT

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

i see some comments regardles break of SaaS, when i checked this project i was testing medusajs, but since the storefront needs a loot of work and medusajs still lacks some features, i switched to Saleor, but i decided to create a storefront from scratch, that's why i took to long to upload the changes, since i was already finish with the testings in this project and medusa and i deleted that repo, but didn't know that this project was part of a SaaS, my suggest is to focus on one storefront at the time, for example, i see the project is very harcoded to support litekart, which i asume is your SaaS, in order to support more backends and have better customization, better DX, is better to create a generic solution, with adapters, or services that can be easy switch, and customized for that spesific project, i added an option to switch from one service to other very easy, but like i say, the project is too heavy on litekart, so it would be better to drop the support for medusajs, and be focus on litekart

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

We are committed to integrate as many storefronts we can, and this repo has that capability.

Medusa is still under heavy development. To make the storefront fully functional we 1st tried to integrate with Litekart which is working 100%. Next step is to integrate Medusajs.

Regarding SaaS compatibility, there is only 1 line that has to be changed.

Regarding Medusajs compatibility we are also working on it in sync with Medusa development, and have completed a lot of integration, its just matter of cleanup and some branch merger.

We are keeping it all together just for simplicity and developer experience.

@acidlake if you can create a pull request on the feat/medusajs-api-integration branch instead of master, I will have a look how can we make it compatible with both the ecommerce platforms.

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

Got it, i switched the pr to the feat/medusajs-api-integration branch
@itswadesh

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

@itswadesh
From my experience it's very hard to maintain customizable UI.
If you want to make it work with various APIs , you need maybe in UI/Store level to control display of elements on the store.
I agree the storefront can be used with various APIs but there's still work need to be done.
I would start with:

  • Going other all places which swallow exceptions and at least console.error them
  • Having some config for the storefront of which functionalities are relevant , because even in store level you may take some of the extensions
    In general it looks like a project with great potential and integration with medusajs is blessed.

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

@tsemachh Thank you so much for your insights.

I am trying my best to accommodate different store api without breaking each other.

from svelte-commerce.

acidlake avatar acidlake commented on September 16, 2024

nice, should we close this issue, since the Unhandled promise rejection get solved with the PR merged to master

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

@itswadesh and @acidlake - thank you very much for pushing it forward.
@itswadesh is there any branch which has medusajs API changes ? we still see gaps and would like to add our insights there.

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

@tsemachh Medusa is merged into master, can be activated from services/index.ts file.
Can you please specify the exact error

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

Many of the APIs are not functioning properly:

  • Getting products of category - brings all products
  • The search products API is not written in the right way should pass query in the body of the post API
  • Adding product to cart produces Undefined , something is not correlated to the right structure
  • Price is not coming the right way , should be processed
  • No dedicated code for Variants and their options
    We didn't check all APIs but I think besides not failing , the basic should integrated with seeded medusa BE

from svelte-commerce.

itswadesh avatar itswadesh commented on September 16, 2024

Thanks @tsemachh for letting us know, the issues are fixed now

  1. Products of categories
  2. Search products api
  3. Add to cart
  4. Price coming now
  5. Variants introduced
  6. Basic checkout flow is working.

from svelte-commerce.

tsemachh avatar tsemachh commented on September 16, 2024

Thank you @itswadesh it looks better from first view I still see the API:
fetchProductsOfCategory
res = await getMedusajsApi(products?category_id[]=${categorySlug})
category_id != categorySlug
You will need to get the id first and then use it in the API
Good luck though

from svelte-commerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.