Configure product availability to be published on product amount changes
Edit on GitHubBy default, AvailabilityStorage is configured to trigger a P&S event when product status changes from available
to not available
and the other way around.
To configure the events to be triggered when product amount, follow the steps:
- In
src/Pyz/Zed/Availability/Persistence/Propel/Schema/spy_availability.schema.xml
, removevalue="0"
andoperator="==="
from the line<parameter name="spy_availability_abstract_quantity" column="quantity" value="0" operator="==="/>
:
<table name="spy_availability_abstract">
<behavior name="event>
<parameter name="spy_availability_abstract_quantity" column="quantity"/>
</behavior>
</table>
- Run the commands:
console propel:schema:copy
console propel:model:build
Thank you!
For submitting the form