2011-03-25 7 views
2

제품 목록 페이지에서 가격별로 제품을 정렬 할 수 없습니다.Magento 제품 목록에서 가격이 정렬되지 않음

이름으로 정렬하면 잘 작동합니다.

아무 생각 없나요?

Google 검색을 시도했지만 일부 해결책을 시도했지만 문제가 해결되지 않았습니다.

내가 시도 : 시스템 -> 캐시 관리 -> 계층 탐색 Indices-> 또한이 링크를 시도

지금 새로 고침 : http://www.miromedia.co.uk/blog/300/fixing-the-magento-price-sort-issue.htm

젠토 버전 : 1.3.2.4

+0

귀하의 마젠타 버전은 무엇입니까? –

답변

3

이 Magento 버전에는 제품 카탈로그 색인 가격이 제품 저장시 업데이트되지 않는 버그가있는 것 같습니다. 그래서 당신이 할 수있는 것은 아래에 설명 된 가격 조건을 통과시키는 것입니다.

업데이트 addAttributeToSort 기능은 Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection 클래스입니다.

을 주석 다음 코드 : -

//  if ($attribute == 'price' && $storeId != 0) { 
//   $websiteId = Mage::app()->getStore()->getWebsiteId(); 
//   $customerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId(); 
// 
//   if ($this->isEnabledFlat()) { 
//    $priceColumn = 'e.display_price_group_' . $customerGroup; 
//    $this->getSelect()->order("{$priceColumn} {$dir}"); 
//   } 
//   else { 
//    $priceAttributeId = $this->getAttribute('price')->getId(); 
// 
//    $entityCondition = '_price_order_table.entity_id = e.entity_id'; 
//    $storeCondition = $this->getConnection()->quoteInto(
//     '_price_order_table.website_id = ?', 
//     $websiteId 
//    ); 
//    $groupCondition = $this->getConnection()->quoteInto(
//     '_price_order_table.customer_group_id = ?', 
//     $customerGroup 
//    ); 
//    $attributeCondition = $this->getConnection()->quoteInto(
//     '_price_order_table.attribute_id = ?', 
//     $priceAttributeId 
//    ); 
// 
//    $this->getSelect()->joinLeft(
//     array('_price_order_table'=>$this->getTable('catalogindex/price')), 
//     "{$entityCondition} AND {$storeCondition} AND {$groupCondition} AND {$attributeCondition}", 
//     array() 
//    ); 
//    $this->getSelect()->order('_price_order_table.value ' . $dir); 
// 
//    /** 
//     * Distinct we are using for remove duplicates of products which have 
//     * several rows in price index (like grouped products) 
//     */ 
//    $this->getSelect()->distinct(true); 
//   } 
// 
//   return $this; 
//  } 

당신은 핵심 코드를 주석 이외의 젠토 표준적인 방법으로이 작업을 수행 할 수 있습니다. 희망이 도움이됩니다.

+0

감사합니다. Subesh. 제 경우에는 도움이되었습니다. –

+0

@subesh : 고마워요. 내 버전 1.5.1.0에서 동일한 문제가 발생했습니다. – Gowri

+0

@subesh : 죄송합니다. 제조 이름과 같은 다른 정렬을 유발합니다. 다른 사람을 찾아 주시기 바랍니다. – Gowri

1

당신은 필요를 Magento admin에서 price 속성을 올바르게 구성하십시오.

이동, 관리 속성 가격 속성을 발견하고 "프론트 엔드에 정렬"에 당신을 위해이 문제를 해결해야

을 확인란을 선택하는지 확인합니다.