문제

제품 목록 페이지에서 제품을 필터링하고 구성 가능한 제품 유형 만 표시하고 싶습니다.

카탈로그 / Product / list.phtml 파일

$_productCollection=$this->getLoadedProductCollection();

를 추가하고 있습니다.
 // First make a copy, otherwise the rest of the page might be affected!
$_productCollection = clone $this->getLoadedProductCollection();

// Unset the current products and filter before loading the next.

$_productCollection->clear()
                   ->addAttributeToFilter('type_id', 'configurable')
                   ->load();
.

제품 목록 페이지에서는 Column not found: 1054 Unknown column 'e.type_id' in 'where clause' 오류가 발생합니다.

참고 : 나는 amasty 제품 필터 확장을 사용하고 있습니다.

도움이 되었습니까?

해결책

아니오 아니오.

all 페이지 에서이 작업을 수행하려면 웹 사이트에서 모든 샘플을 비활성화하거나 제거하십시오.

특정 페이지에 대해서만 수행하려는 경우 catalog_block_product_list_collection에 연결하고 필터를 추가하는 옵저버를 구현해야합니다.

제품 목록을 다시로드하지 않습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top