Skip to content

Commit

Permalink
Merge pull request #75 from magento-firedrakes/bugfixes
Browse files Browse the repository at this point in the history
[Firedrakes] Bugfixes. Sprint 36
  • Loading branch information
Michael Logvin committed Feb 3, 2015
2 parents f905eba + 00c378f commit daa5103
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 104 deletions.
8 changes: 2 additions & 6 deletions app/code/Magento/Customer/Model/Resource/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,8 @@ protected function _saveAddresses(\Magento\Customer\Model\Customer $customer)
}
}
}
if ($customer->dataHasChangedFor('default_billing')) {
$this->saveAttribute($customer, 'default_billing');
}
if ($customer->dataHasChangedFor('default_shipping')) {
$this->saveAttribute($customer, 'default_shipping');
}
$this->saveAttribute($customer, 'default_billing');
$this->saveAttribute($customer, 'default_shipping');

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-quote",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta6",
"magento/module-catalog": "0.42.0-beta6",
"magento/module-customer": "0.42.0-beta6",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Magento_Sales" schema_version="2.0.0">
<module name="Magento_Sales" schema_version="2.0.1">
<sequence>
<module name="Magento_Rule"/>
<module name="Magento_Catalog"/>
Expand Down
13 changes: 0 additions & 13 deletions app/code/Magento/Sales/sql/sales_setup/update-2.0.1.php

This file was deleted.

42 changes: 42 additions & 0 deletions app/code/Magento/Sales/sql/sales_setup/upgrade-2.0.0-2.0.1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/

use Magento\Framework\DB\Ddl\Table;

/**
* update columns created_at and updated_at in sales entities tables
*/

$tables = [
'sales_creditmemo',
'sales_creditmemo_comment',
'sales_invoice',
'sales_invoice_comment',
'sales_order',
'sales_order_item',
'sales_order_status_history',
'sales_payment_transaction',
'sales_shipment',
'sales_shipment_comment',
'sales_shipment_track'
];
/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */
$connection = $this->getConnection();
foreach ($tables as $table) {
$columns = $connection->describeTable($this->getTable($table));
if (isset($columns['created_at'])) {
$createdAt = $columns['created_at'];
$createdAt['DEFAULT'] = Table::TIMESTAMP_INIT;
$createdAt['TYPE'] = Table::TYPE_TIMESTAMP;
$connection->modifyColumn($this->getTable($table), 'created_at', $createdAt);
}
if (isset($columns['updated_at'])) {
$updatedAt = $columns['updated_at'];
$updatedAt['DEFAULT'] = Table::TIMESTAMP_UPDATE;
$updatedAt['TYPE'] = Table::TYPE_TIMESTAMP;
$connection->modifyColumn($this->getTable($table), 'updated_at', $updatedAt);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</div>

<script>
require(['prototype'], function(){
require(['jquery', 'prototype'], function($){

//<![CDATA[
var submitButtons = $$('.submit-button');
Expand All @@ -129,7 +129,7 @@ var fields = $$('.qty-input');
updateButtons.each(function (elem) {elem.disabled=true;elem.addClassName('disabled');});

for(var i=0;i<fields.length;i++){
fields[i].observe('change', checkButtonsRelation)
$(fields[i]).on('keyup', checkButtonsRelation);
fields[i].baseValue = fields[i].value;
}

Expand Down
66 changes: 33 additions & 33 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit daa5103

Please sign in to comment.