Magento 2.4.5 類別頁面缺貨產品未顯示。
甚至 magento 管理員 -> 商店 -> 配置 -> 目錄 -> 庫存設定已啟用?
我嘗試使用默認的 magento,但沒有找到任何解決方案。任何人都可以面臨同樣的問題并有解決方案嗎?
uj5u.com熱心網友回復:
除錯了很多,終于找到了2.4.5的主要bug。
供應商/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php
只需更改應用功能,如 2.4.4
public function apply()
{
if (empty($this->searchResult->getItems())) {
$this->collection->getSelect()->where('NULL');
return;
}
//$ids = $this->getProductIdsBySaleability();
//if (count($ids) == 0) {
$items = $this->sliceItems($this->searchResult->getItems(), $this->size, $this->currentPage);
foreach ($items as $item) {
$ids[] = (int)$item->getId();
}
//}
$orderList = implode(',', $ids);
$this->collection->getSelect()
->where('e.entity_id IN (?)', $ids)
->reset(\Magento\Framework\DB\Select::ORDER)
->order(new \Zend_Db_Expr("FIELD(e.entity_id,$orderList)"));
}
uj5u.com熱心網友回復:
必須在您的產品或 Magento Elasticsearch 配置中發布。您需要執行步驟以重現顯示缺貨產品。
要從管理員顯示缺貨產品:請按照以下步驟操作:
1:商店>配置>目錄>庫存 2:打開庫存選項下拉選單。3:在顯示缺貨產品選項中設定是
如果這不起作用,請檢查您的 Elasticsearch 版本。同時清除快取:系統->快取管理
如果配置了 Memcached 或 Redis 快取,請先清除快取。最后,還要檢查您的主題以顯示缺貨,這也可能會產生問題。
而已
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/516748.html
上一篇:產品視頻未在前端播放
