I see that there are not any relationships from sales_shipping_aggregated to the sales_flat_order table. I'm trying to determine if there is a relationship to anything other than sales_shipping_aggregated_order.

What is the purpose of these two tables (ssa and ssao) and do they relate to the individual orders at all?

Background: I'm trying to merge two different Magento stores into one instance. Needing to migrate data.

  • 1
    Those tables are use for reporting (see Admin -> report -> sales -> shipping) see Mage_Adminhtml_Block_Report_Sales_Shipping_Grid – Renon Stewart Nov 4 '14 at 20:17
  • Interesting. Does the same go for the other aggregated tables? 'sales_invoiced_aggregated';, 'sales_invoiced_aggregated_order';, 'sales_order_aggregated_created'; and 'sales_order_aggregated_updated'; – sparecycle Nov 4 '14 at 20:20
  • 1
    I have not work with report that much but to my knowledge all _aggregated_ are use for report related functionality – Renon Stewart Nov 4 '14 at 20:25
  • Awesome! That at least gives me something to go on. I appreciate it. – sparecycle Nov 4 '14 at 20:26

Those tables are use for reporting (see Admin -> report -> sales -> shipping)



class Mage_Adminhtml_Block_Report_Sales_Shipping_Grid extends Mage_Adminhtml_Block_Report_Grid_Abstract

    public function getResourceCollectionName()
        return ($this->getFilterData()->getData('report_type') == 'created_at_shipment')
            ? 'sales/report_shipping_collection_shipment'
            : 'sales/report_shipping_collection_order';


class Mage_Sales_Model_Resource_Report_Shipping_Collection_Shipment
    extends Mage_Sales_Model_Resource_Report_Shipping_Collection_Order
     * Initialize custom resource model
    public function __construct()
        $this->_resource = Mage::getResourceModel('sales/report')->init('sales/shipping_aggregated');



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.