algolia_after_create_product_object
event with a custom observer.
This tutorial assumes knowledge of writing a custom observer.
For more information, see Create a custom extension.
Create observer
Create theObserver/TransformAttribute.php
file, and add a new Observer class in it.
PHP
execute
block as needed.
In this example, the clothing sizes are transformed into numeric values.
Register the observer
To register your observer, add the following snippet to theetc/events.xml
file:
XML