이 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;
// }
당신은 핵심 코드를 주석 이외의 젠토 표준적인 방법으로이 작업을 수행 할 수 있습니다. 희망이 도움이됩니다.
귀하의 마젠타 버전은 무엇입니까? –