Skip to content

Update stock when shop owner adds or removes items #9

@bjorn-out

Description

@bjorn-out

Currently, stock counts in the database are not updated when the shop owner adds or removes items. This can create a bit of a chicken/egg problem, where nobody visits shops that are shown as empty, which means there aren’t any transactions, which means the stock counts never get updated, etc.

ChestShop currently doesn’t have an event for stock updates. So I’m looking to add a new event for that to ChestShop (have asked the dev if it would be okay with them). Otherwise likely the only way to implement this is by listening to InventoryMoveItemEvent, which is computationally expensive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions