steveoliver / commerce_stock_ Goto Github PK
View Code? Open in Web Editor NEWA clone of Drupal commerce_stock module by guy_schneerson from drupal.org/project/commerce_stock
A clone of Drupal commerce_stock module by guy_schneerson from drupal.org/project/commerce_stock
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.