Giter Site home page Giter Site logo

Add ability to list products about revbank HOT 5 CLOSED

revspace avatar revspace commented on August 30, 2024
Add ability to list products

from revbank.

Comments (5)

Juerd avatar Juerd commented on August 30, 2024 1

Don't buy a barcode scanner just yet. We are sort of drowning in them. A package with a 2D barcode scanner (and a 1D barcode scanner, because why not) is on its way to Umeå! :)

from revbank.

Juerd avatar Juerd commented on August 30, 2024

Thanks for taking the time to suggest a feature!

The lack of an advertised way of listing products is intentional. The intended way to use RevBank is to scan barcodes, not to select products from a list. Ideally, every product has a barcode on the packaging. Alternatively, a list of barcodes can be provided (e.g. on a sheet of paper), but that is very suboptimal because it imposes a much higher cognitive load on the user who now has to actually search for the right barcode and interpret how the list is sorted, and because it requires much more maintenance.

I think a command to get a list of products has two negative consequences:

  • Having a list could give the impression that things that are no longer for sale, should be removed from the list.
  • Having a list could cause people to look for the "right" product in the list, if a product does not have a barcode, or the barcode is not yet added to revbank.products. If the product wasn't intended to be sold, that has the problem of accidentally selling a product. If it was intended to be sold, it might result in botched statistics, the wrong price (new barcode often also implies a price hike!!), or wrong statiegeld identification (recently added feature) if someone uses a different barcode for it.

It's also hard to implement, because RevBank itself doesn't actually have products. Products are handled by plugins like the products plugin and the market plugin, but a space might also have a plugin that fetches products on the fly from a REST API for every barcode that is scanned. A list of products might not even be possible in that case.

And I couldn't really think of any reason to have a list. Did you have any specific workflow in mind, that requires listing the products? How should that work if there are multiple plugins for selling products, like if both products and market are enabled?

Now, there is the edit command provided by the edit plugin. This gives you an editor for the products that are known in the products plugin, and can be used for listing products. It does indeed have the problems I described earlier, we've already had those botched statistics and lost income. For this reason, I'm not inclined to advertise the edit command as a way to view the product list. Because some spaces might not want to expose this to users (either for viewing or editing), the edit command was split off from the products plugin so that it can be disabled independently.

from revbank.

Juerd avatar Juerd commented on August 30, 2024

By the way, it is quite easy to write such a plugin if I was unable to convince you that it's better not to have this feature. Basically, copy the edit plugin, and change a few things. You could use RevBank::TextEditor::pager() instead of RevBank::TextEditor::edit(), or an external pager (or even a printer :P).

from revbank.

Tjoppen avatar Tjoppen commented on August 30, 2024

Ah I didn't know a barcode reader was the typical usecase. In Umeå Hackerspace we just have product IDs like "cola" and "billys", but the topic of buying a barcode reader has come up. The thought of modifying the edit command did strike me, I just didn't get around to it, and it's been ages since I wrote any Perl

from revbank.

Tjoppen avatar Tjoppen commented on August 30, 2024

Cool!

from revbank.

Related Issues (6)

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.