All threads / How would i go with making an inventory for products?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How would i go with making an inventory for products?

Wesly Mezarina asked in General

I'm not sure if i'm saying it right but how can i manage inventory for my products? What are some steps that i have to take to get started?

This probably depends on a lot of things. Are you getting in shipments of new items? Are the products being consumed? (sometimes this might not be the case if you're talking like inventory of trucks for example)

More details on what you're shooting for would be helpful but I'm sure we can come up with a fairly straightforward solution to it.

I'm getting more into products in a ecommerce store. Say i have shirts for sale and i want to keep track of how many i have and of how many i sell and ship. How would i keep a count of that?

I assume you'll be using Rails, so you might want to check out SpreeCommerce. I haven't used it myself yet, but it looks very promising.

If you YouTube SpreeCommerce, some pretty detailed videos should come up.

Spree is one approach if you want to use something premade.

As far as keeping inventory of things like shirts, you can probably do two separate things:

  1. You keep track of new additions to our inventory, maybe call them new stock or something. Record the amount of tshirts added each time you get more inventory added in stock.
  2. Keep track of the orders and the quantity of shirts leaving each time.

The total "in stock" inventory will simply be summing up all the times you added new stock and subtracting the sum of all the quantity ordered. You can cache a copy of the current value in stock and update each time you add inventory or have new orders.

You can then get a history of the inventory over time in your store and what's leaving. This will be helpful for seeing and predicting how much inventory it makes sense to keep on hand and can be useful for other things as well.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 35,699+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.