app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.28-0.9.29.php File Reference

Go to the source code of this file.

Packages

package  Mage_Sales

Variables

 $installer = $this
$installer getConnection ()->addColumn($this->getTable('sales/order')
 $sql
 $ordersEntity = $installer->getEntityType('order')
 $ordersTable = $installer->getTable($ordersEntity['entity_table'])
 $entityTypeId = $installer->getEntityTypeId('creditmemo')
 $orderAttributeId = $installer->getAttributeId($entityTypeId, 'order_id')
 $orderAttributeTable = $installer->getAttributeTable($entityTypeId, 'order_id')
 $discountAttributeId = $installer->getAttributeId($entityTypeId, 'discount_amount')
 $discountAttributeTable = $installer->getAttributeTable($entityTypeId, 'discount_amount')
 $baseDiscountAttributeId = $installer->getAttributeId($entityTypeId, 'base_discount_amount')
 $baseDiscountAttributeTable = $installer->getAttributeTable($entityTypeId, 'base_discount_amount')
 $preparedSql
 $stmt = $installer->getConnection()->query($preparedSql)
while($row=$stmt->fetch()) $statusAttributeId = $installer->getAttributeId($ordersEntity['entity_type_id'], 'status')
 $statusAttributeTable = $installer->getAttributeTable($ordersEntity['entity_type_id'], 'status')
 $select


Variable Documentation

$baseDiscountAttributeId = $installer->getAttributeId($entityTypeId, 'base_discount_amount')

Definition at line 66 of file mysql4-upgrade-0.9.28-0.9.29.php.

$baseDiscountAttributeTable = $installer->getAttributeTable($entityTypeId, 'base_discount_amount')

Definition at line 67 of file mysql4-upgrade-0.9.28-0.9.29.php.

$discountAttributeId = $installer->getAttributeId($entityTypeId, 'discount_amount')

Definition at line 64 of file mysql4-upgrade-0.9.28-0.9.29.php.

$discountAttributeTable = $installer->getAttributeTable($entityTypeId, 'discount_amount')

Definition at line 65 of file mysql4-upgrade-0.9.28-0.9.29.php.

while ($row=$stmt->fetch()) $entityTypeId = $installer->getEntityTypeId('creditmemo')

Definition at line 61 of file mysql4-upgrade-0.9.28-0.9.29.php.

$installer = $this

Definition at line 27 of file mysql4-upgrade-0.9.28-0.9.29.php.

$orderAttributeId = $installer->getAttributeId($entityTypeId, 'order_id')

Definition at line 62 of file mysql4-upgrade-0.9.28-0.9.29.php.

$orderAttributeTable = $installer->getAttributeTable($entityTypeId, 'order_id')

Definition at line 63 of file mysql4-upgrade-0.9.28-0.9.29.php.

$ordersEntity = $installer->getEntityType('order')

Definition at line 57 of file mysql4-upgrade-0.9.28-0.9.29.php.

$ordersTable = $installer->getTable($ordersEntity['entity_table'])

Definition at line 58 of file mysql4-upgrade-0.9.28-0.9.29.php.

$preparedSql

$select

Initial value:

 $installer->getConnection()->select()
    ->from(
        array('s' => $statusAttributeTable),
        array('order_id' => 's.entity_id')
    )
    ->where('s.attribute_id=?', $statusAttributeId)
    ->where('s.entity_type_id=?', $ordersEntity['entity_type_id'])
    ->where('s.value=?', Mage_Sales_Model_Order::STATE_CANCELED)

Definition at line 127 of file mysql4-upgrade-0.9.28-0.9.29.php.

$sql

Initial value:

 "
    SELECT `e_int`.`value` AS `order_id`,
        SUM(e_decimal.value) AS `order_discount`,
        SUM(e_decimal_base.value) AS `order_base_discount`
    FROM `%s` AS `e_int`
        INNER JOIN `%s` AS `e_decimal`
            ON e_int.entity_id=e_decimal.entity_id AND e_decimal.attribute_id='%d'
        INNER JOIN `%s` AS `e_decimal_base`
            ON e_int.entity_id=e_decimal_base.entity_id AND e_decimal_base.attribute_id='%d'
    WHERE e_int.entity_type_id='%d' AND e_int.attribute_id='%d'
    GROUP BY `e_int`.`value`
"

Definition at line 44 of file mysql4-upgrade-0.9.28-0.9.29.php.

while ($row=$stmt->fetch()) $statusAttributeId = $installer->getAttributeId($ordersEntity['entity_type_id'], 'status')

Definition at line 125 of file mysql4-upgrade-0.9.28-0.9.29.php.

$statusAttributeTable = $installer->getAttributeTable($ordersEntity['entity_type_id'], 'status')

Definition at line 126 of file mysql4-upgrade-0.9.28-0.9.29.php.

$stmt = $installer->getConnection()->query($preparedSql)

Definition at line 79 of file mysql4-upgrade-0.9.28-0.9.29.php.

$installer $installer $installer $installer $installer $installer getConnection()->addColumn($this->getTable('sales/order')

Definition at line 30 of file mysql4-upgrade-0.9.28-0.9.29.php.


Generated on Sat Jul 4 17:22:32 2009 for Magento by  doxygen 1.5.8