Got this error while trying to install:

Fatal error: Class Drupal\commerce_sell_once\SellOnceChecker contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\commerce_stock\StockCheckInterface::getTotalAvailableStockLevel) in C:\xampp\htdocs\fabricremnants_dev\drupal8\web\modules\contrib\commerce_sell_once\src\SellOnceChecker.php on line 11

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jdcllns created an issue. See original summary.

  • KarlShea committed 2afab87 on 1.0.x
    Issue #3272045 by KarlShea: Fix missing method added in commerce_stock 1...
karlshea’s picture

Title: Fatal Error during installation » SellOnceChecker missing method added in commerce_stock 1.0
Version: 1.0.0-beta1 » 1.0.x-dev
Status: Active » Needs review
Issue tags: -fatal error

Can you see if the 1.0.x-dev version works for you? I haven't updated the site I'm using this module on to commerce_stock 1.0 yet.

jdcllns’s picture

1.0.x-dev Seems to work fine. Once installed, I used Views Bulk Operations to update the products' Sold value to False. I was able to use the Sold value in various Views. Once I purchased an item, its "Add to cart" button changed to "Out of stock". I did get it to crash by going back into the purchased item, bumping its Stock Level back up to 1, then hitting Save. My opinion is that the module should gracefully handle this situation. But if I switch to this module, I'll remove the Stove Level widget from the form.

This is a very useful module that I would very much like to put into production ASAP.

I'm also concerned that "This project is not covered by Drupal’s security advisory policy." Can that be corrected?

karlshea’s picture

> bumping its Stock Level back up to 1

This doesn't use stock levels. It's either sold (commerce_sell_once_sold field is true) or not (false). For the site I'm using this module on, the default stock service is "Always in stock", and the service for the particular product variation is "Sell Once".

> I'm also concerned that "This project is not covered by Drupal’s security advisory policy." Can that be corrected?

I've opted-in to security coverage, but there isn't a stable release yet. If having a stable covered release is a requirement for you, I could tag something since the module has been working in production for me.

jdcllns’s picture

I can use it the way it is. Thanks.

karlshea’s picture

Status: Needs review » Fixed

Good luck with your build!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

voviko made their first commit to this issue’s fork.