Git Product home page Git Product logo

commerce_stock_'s People

Contributors

bbguy avatar iaugur avatar joachim-n avatar rfay avatar steveoliver avatar

Watchers

 avatar  avatar  avatar

Forkers

olafkarsten

commerce_stock_'s Issues

Where to store backorder availability setting

Just to follow up on the #drupal-commerce discussion:

Right now, when the stock_level field is added to an entity (typically a commerce_product_variation) it creates a DB table that is never used (e.g. commerce_product_variation__stock_level). Actual stock value is stored in cs_inventory_location_level. Clearly it needs to be stored in cs_inventory_location_level in order to be location-aware, but still its illogical to have a DB table created to hold nothing. But maybe it could be used to hold the backorder availability value? Strictly speaking, I think it could hold it now by using $entity->set('stock_level', $value) with 0 or 1. The nomenclature is wrong, but we could just call the field "stock" or "stock availability" instead of stock level, and the stock api could store the backorder availability as a bool in this field. You could change it from a decimal to a tinyint to hold a boolean.

From the point of view of my project and its custom StockFormatter (which displays stock level and availability in the product view display), it would be trivial to change from using a custom field on the entity to represent backorder availability, to using the value stock field provided by commerce_stock.

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.