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

Example done, now what? #548

Open
idc77 opened this issue Mar 5, 2024 · 4 comments
Open

Example done, now what? #548

idc77 opened this issue Mar 5, 2024 · 4 comments

Comments

@idc77
Copy link

idc77 commented Mar 5, 2024

How do I configure the storage / database?

I see there's a csvcommerce module, in fact I'm trying to build a shop that acts as a dropshipping frontend.

There is no documentation beside the initial "check it out" bit.

Is this a "open source but pay us for the manual" type of gig?

@tessig
Copy link
Member

tessig commented Mar 7, 2024

Hi,

Thank you for reaching out and for your interest in Flamingo Commerce!

No, Flamingo Commerce is not a "pay us for the manual" type of project. It is fully open source, and we aim to support the community of users and developers around it.

Regarding documentation, we're sorry for any confusion. We strive to provide comprehensive documentation for all aspects of Flamingo Commerce. We'll work on improving the documentation to make it more accessible and informative.

What we try to explain here is that Flamingo Commerce operates as a framework defining domain models and ports. As such, the implementation of adapters for the ports is required to configure storage/database according to your specific needs.

The CSV Module is an example implementation which you can use as a guide to write your own module for a connection to a storage of your choice.

@mishop
Copy link

mishop commented Mar 12, 2024

I haven't programmed in a long time, so it will take me some time, but I could hang out here.

  1. If I were to link the product database with the available product quantity, how would I update the product availability in the application?
  2. I am currently struggling to read redis gob orders. My idea is for flamingo to be a web shop, but to process everything further in some ERP software.

@tessig
Copy link
Member

tessig commented Mar 12, 2024

  1. Stock is handled on product attributes in productBasics.go. Your product implementation should set this field.
    To make sure that nobody can buy products that are out of stock, you will need an implementation of itemValidator.go and cartValidator.go to check for stock in checkout. Stock deduction should then happen in the place order service below.
  2. For processing orders outside you need to implement placeorder.Service interface in placeorder.go. Your adapter will then do the communication with the ERP. This calls would then also update the product stock data.

@mishop
Copy link

mishop commented Mar 12, 2024

Thank you for your prompt response.

  1. I will try to build only while I prepare the repository and its API
  2. I thought I was reading and push from the redis database. A separate microservice redis <=> ERPNext.
    I'm having a decoding problem right now. I can't find the structure gob in redis key (can't decode).
    Would you be so kind as to help me with that?
    Thank You

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

No branches or pull requests

3 participants