연관된 단순 제품의 속성을 기반으로 그룹화 된 제품 목록을 표시하려고합니다. 지금 내가단순 제품과 그룹 제품 간의 내부 결합 (단순 제품 (Magento)의 속성 별 필터)
- Create a collection of simple products and add attribute filters like color,brand etc., like below
$productCollection = Mage::getModel('catalog/product')->getCollection()
->addStoreFilter(Mage::app()->getStore())
->addAttributeToFilter($aname,$avalue)
->addAttributeToFilter('type_id', array('eq' => 'simple'))
->addAttributeToFilter(ATTRIBUTE_CODE,ATTRIBUTE_VALUE_ID);
(->addAttributeToFilter('color',5))
- Obtain all resultant ids and get its parent ids using the below
Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($productCollection->getAllIds());
- Read the parent ids from above object and show the result in a custom grid that i created
- Created a paging logic for parent ids and do paging in view file
이 논리가 정말 더 많은 시간을 소비 아래처럼 뭐하는 거지, 내가 하나의 컬렉션이 모든 작업을 수행 할 수있는 방법은 무엇입니까? 단순한 제품과 그룹화 된 제품 간의 내부 조인 방식 일 수 있습니다!
좋습니다.
감사합니다, 그것은 당신이 필터링 할 속성으로 따라 발안