5
Problem z użyciem „posiadania” w kolekcji Magento
Próbuję zbudować niestandardową kolekcję dla siatki w module administracyjnym Magento. Utworzyłem nową metodę kolekcji o nazwie „addAttributeHaving”, która wykonuje następujące czynności: public function addAttributeHaving($value) { $this->getSelect()->having($value); return $this; } Zobacz kod kolekcji: $collection->addFieldToSelect( array( 'entity_id', 'created_at', 'increment_id', 'customer_email', 'customer_firstname', 'customer_lastname', 'grand_total', 'status' ) ); $collection->getSelect()->joinLeft(array('sfop' => 'sales_flat_order_payment'), 'main_table.entity_id = sfop.parent_id', …