Skip to content

Commit

Permalink
Merge pull request #760 from Nosto/bug/fix-availability-building-for-…
Browse files Browse the repository at this point in the history
…oos-threshold

Hotfix 5.4.1: Fix availaibility building for products
  • Loading branch information
Dair Baidauletov authored Dec 21, 2021
2 parents 2461ae8 + 3ec9c45 commit f0a58e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

### 5.4.1
* Fix product availability building for products with OOS threshold

### 5.4.0
* Add functionality to send disabled products to Nosto
* Add ttl for nosto_product_cache
Expand Down
3 changes: 2 additions & 1 deletion Model/Product/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

use Exception;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
use Magento\Catalog\Model\Product\Gallery\ReadHandler as GalleryReadHandler;
use Magento\Framework\Event\ManagerInterface;
use Magento\Store\Model\Store;
Expand Down Expand Up @@ -405,7 +406,7 @@ private function buildAvailability(Product $product, Store $store)
$isInStock = $this->availabilityService->isInStock($product, $store);
if (!$product->isVisibleInSiteVisibility()
|| (!$this->availabilityService->isAvailableInStore($product, $store) && $isInStock)
|| !$product->isSalable()
|| ($product->getStatus() == ProductStatus::STATUS_DISABLED)
) {
$availability = ProductInterface::INVISIBLE;
} elseif ($isInStock
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nosto/module-nostotagging",
"description": "Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.",
"type": "magento2-module",
"version": "5.4.0",
"version": "5.4.1",
"require-dev": {
"phpmd/phpmd": "^2.5",
"sebastian/phpcpd": "*",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
<!--suppress XmlUnboundNsPrefix -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Nosto_Tagging" setup_version="5.4.0"/>
<module name="Nosto_Tagging" setup_version="5.4.1"/>
</config>

0 comments on commit f0a58e3

Please sign in to comment.