diff --git a/src/services/AlgoliaSyncService.php b/src/services/AlgoliaSyncService.php index 88dc8a2..dc900f6 100644 --- a/src/services/AlgoliaSyncService.php +++ b/src/services/AlgoliaSyncService.php @@ -542,6 +542,7 @@ public function prepareAlgoliaSyncElement($element, $action = 'save', $algoliaMe if (!empty($element->ProductType)) { $recordUpdate['attributes']['ProductType'] = $element->ProductType; } + $recordUpdate['attributes']['availableForPurchase'] = (bool)$myProduct->availableForPurchase; $recordUpdate['attributes']['isDefault'] = (bool)$element->isDefault; $recordUpdate['attributes']['price'] = (float)$element->price; $recordUpdate['attributes']['salePrice'] = (float)$element->salePrice; @@ -554,7 +555,7 @@ public function prepareAlgoliaSyncElement($element, $action = 'save', $algoliaMe $recordUpdate['attributes']['hasUnlimitedStock'] = (bool)$element->hasUnlimitedStock; $recordUpdate['attributes']['minQty'] = (float)$element->minQty; $recordUpdate['attributes']['maxQty'] = (float)$element->maxQty; - + break; }