Ejemplo n.º 1
0
 private static function getRelatedProductsSetFilter(Product $product, $type)
 {
     $filter = new ARSelectFilter();
     $filter->joinTable('ProductRelationshipGroup', 'ProductRelationship', 'ID', 'productRelationshipGroupID');
     $filter->setOrder(new ARFieldHandle("ProductRelationshipGroup", "position"), 'ASC');
     $filter->setOrder(new ARFieldHandle(__CLASS__, "position"), 'ASC');
     $filter->setCondition(new EqualsCond(new ARFieldHandle(__CLASS__, "productID"), $product->getID()));
     $filter->mergeCOndition(new EqualsCond(new ARFieldHandle(__CLASS__, "type"), $type));
     return $filter;
 }