Skip to content

Commit b23a905

Browse files
author
Cari Spruiell
committed
Merge remote-tracking branch 'remotes/classyllama/MAGETWO-37843-responsive-email-templates-in-blank-theme' into MAGETWO-37843-responsive-email-templates-in-blank-theme
# Conflicts: # dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
2 parents 5112550 + c30f2d2 commit b23a905

File tree

73 files changed

+972
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+972
-134
lines changed

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,4 +898,26 @@ protected function addStatusCommentOnUpdate(
898898
}
899899
return $this;
900900
}
901+
902+
/**
903+
* Sets method code
904+
*
905+
* @param string $methodCode
906+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
907+
* @return void
908+
*/
909+
public function setMethodCode($methodCode)
910+
{
911+
}
912+
913+
/**
914+
* Sets path pattern
915+
*
916+
* @param string $pathPattern
917+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
918+
* @return void
919+
*/
920+
public function setPathPattern($pathPattern)
921+
{
922+
}
901923
}

app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,21 @@
4545
<?php endif; ?>
4646
<button type="submit"
4747
name="update_cart_action"
48+
data-cart-empty=""
4849
value="empty_cart"
4950
title="<?php echo $block->escapeHtml(__('Clear Shopping Cart')); ?>"
5051
class="action clear" id="empty_cart_button">
5152
<span><?php echo __('Clear Shopping Cart'); ?></span>
5253
</button>
5354
<button type="submit"
5455
name="update_cart_action"
56+
data-cart-item-update=""
5557
value="update_qty"
5658
title="<?php echo $block->escapeHtml(__('Update Shopping Cart')); ?>"
5759
class="action update">
5860
<span><?php echo __('Update Shopping Cart'); ?></span>
5961
</button>
60-
<input type="hidden" value="" id="update_cart_action_container" />
62+
<input type="hidden" value="" id="update_cart_action_container" data-cart-item-update=""/>
6163
</div>
6264
</form>
6365
<?php echo $block->getChildHtml('checkout.cart.order.actions') ?>

app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
9393
<div class="control qty">
9494
<input id="cart-<?php echo $_item->getId() ?>-qty"
9595
name="cart[<?php echo $_item->getId() ?>][qty]"
96+
data-cart-item-id="<?php echo $_item->getSku() ?>"
9697
value="<?php echo $block->getQty() ?>"
9798
type="number"
9899
size="4"

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
use Magento\Customer\Api\CustomerRepositoryInterface;
1515
use Magento\Customer\Api\Data\AddressInterface;
1616
use Magento\Customer\Api\Data\CustomerInterface;
17+
use Magento\Customer\Api\Data\ValidationResultsInterfaceFactory;
1718
use Magento\Customer\Helper\View as CustomerViewHelper;
1819
use Magento\Customer\Model\Config\Share as ConfigShare;
1920
use Magento\Customer\Model\Customer as CustomerModel;
2021
use Magento\Customer\Model\Metadata\Validator;
22+
use Magento\Framework\Api\ExtensibleDataObjectConverter;
2123
use Magento\Framework\App\Config\ScopeConfigInterface;
2224
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
2325
use Magento\Framework\Event\ManagerInterface;
@@ -30,6 +32,8 @@
3032
use Magento\Framework\Exception\State\ExpiredException;
3133
use Magento\Framework\Exception\State\InputMismatchException;
3234
use Magento\Framework\Exception\State\InvalidTransitionException;
35+
use Magento\Framework\ObjectFactory;
36+
use Magento\Framework\Registry;
3337
use Psr\Log\LoggerInterface as PsrLogger;
3438
use Magento\Framework\Exception\MailException;
3539
use Magento\Framework\Mail\Template\TransportBuilder;
@@ -205,11 +209,10 @@ class AccountManagement implements AccountManagementInterface
205209
* @param StoreManagerInterface $storeManager
206210
* @param Random $mathRandom
207211
* @param Validator $validator
208-
* @param \Magento\Customer\Api\Data\ValidationResultsInterfaceFactory $validationResultsDataFactory
212+
* @param ValidationResultsInterfaceFactory $validationResultsDataFactory
209213
* @param AddressRepositoryInterface $addressRepository
210214
* @param CustomerMetadataInterface $customerMetadataService
211215
* @param CustomerRegistry $customerRegistry
212-
* @param \Magento\Framework\Url $url
213216
* @param PsrLogger $logger
214217
* @param Encryptor $encryptor
215218
* @param ConfigShare $configShare
@@ -218,12 +221,12 @@ class AccountManagement implements AccountManagementInterface
218221
* @param ScopeConfigInterface $scopeConfig
219222
* @param TransportBuilder $transportBuilder
220223
* @param DataObjectProcessor $dataProcessor
221-
* @param \Magento\Framework\Registry $registry
224+
* @param Registry $registry
222225
* @param CustomerViewHelper $customerViewHelper
223226
* @param DateTime $dateTime
224227
* @param CustomerModel $customerModel
225-
* @param \Magento\Framework\ObjectFactory $objectFactory
226-
* @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter
228+
* @param ObjectFactory $objectFactory
229+
* @param ExtensibleDataObjectConverter $extensibleDataObjectConverter
227230
*
228231
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
229232
*/
@@ -233,11 +236,10 @@ public function __construct(
233236
StoreManagerInterface $storeManager,
234237
Random $mathRandom,
235238
Validator $validator,
236-
\Magento\Customer\Api\Data\ValidationResultsInterfaceFactory $validationResultsDataFactory,
239+
ValidationResultsInterfaceFactory $validationResultsDataFactory,
237240
AddressRepositoryInterface $addressRepository,
238241
CustomerMetadataInterface $customerMetadataService,
239242
CustomerRegistry $customerRegistry,
240-
\Magento\Framework\Url $url,
241243
PsrLogger $logger,
242244
Encryptor $encryptor,
243245
ConfigShare $configShare,
@@ -246,12 +248,12 @@ public function __construct(
246248
ScopeConfigInterface $scopeConfig,
247249
TransportBuilder $transportBuilder,
248250
DataObjectProcessor $dataProcessor,
249-
\Magento\Framework\Registry $registry,
251+
Registry $registry,
250252
CustomerViewHelper $customerViewHelper,
251253
DateTime $dateTime,
252254
CustomerModel $customerModel,
253-
\Magento\Framework\ObjectFactory $objectFactory,
254-
\Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter
255+
ObjectFactory $objectFactory,
256+
ExtensibleDataObjectConverter $extensibleDataObjectConverter
255257
) {
256258
$this->customerFactory = $customerFactory;
257259
$this->eventManager = $eventManager;
@@ -614,18 +616,19 @@ public function changePasswordById($customerId, $currentPassword, $newPassword)
614616
/**
615617
* Change customer password.
616618
*
617-
* @param string $email
619+
* @param CustomerModel $customer
618620
* @param string $currentPassword
619621
* @param string $newPassword
620622
* @return bool true on success
623+
* @throws InputException
624+
* @throws InvalidEmailOrPasswordException
621625
*/
622626
private function changePasswordForCustomer($customer, $currentPassword, $newPassword)
623627
{
624628
$customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
625629
$hash = $customerSecure->getPasswordHash();
626630
if (!$this->encryptor->validateHash($currentPassword, $hash)) {
627-
throw new InvalidEmailOrPasswordException(
628-
__('The password doesn\'t match this account.'));
631+
throw new InvalidEmailOrPasswordException(__('The password doesn\'t match this account.'));
629632
}
630633
$customerSecure->setRpToken(null);
631634
$customerSecure->setRpTokenCreatedAt(null);

app/code/Magento/Customer/view/frontend/email/account_new_confirmed.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"var store.getUrl('customer/account/')":"Customer Account URL",
1010
"var customer.email":"Customer Email",
1111
"var customer.name":"Customer Name"
12-
@-->
12+
} @-->
1313
{{template config_path="design/email/header_template"}}
1414

1515
<p class="greeting">{{trans "%name," name=$customer.name}}</p>

app/code/Magento/Customer/view/frontend/email/password_new.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!--@vars {
99
"var store.getUrl('customer/account/')":"Customer Account URL",
1010
"var customer.name":"Customer Name"
11-
@-->
11+
} @-->
1212
{{template config_path="design/email/header_template"}}
1313

1414
<p class="greeting">{{trans "%name," name=$customer.name}}</p>

app/code/Magento/Customer/view/frontend/email/password_reset.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!--@subject Your {{var store.getFrontendName()}} password has been changed @-->
88
<!--@vars {
99
"var customer.name":"Customer Name"
10-
@-->
10+
} @-->
1111
{{template config_path="design/email/header_template"}}
1212

1313
<p class="greeting">{{trans "%name," name=$customer.name}}</p>

app/code/Magento/Customer/view/frontend/email/password_reset_confirmation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!--@vars {
99
"var customer.name":"Customer Name",
1010
"var store.getUrl('customer/account/createPassword/', [_query:[id:$customer.id, token:$customer.rp_token]])":"Reset Password URL"
11-
@-->
11+
} @-->
1212
{{template config_path="design/email/header_template"}}
1313

1414
<p class="greeting">{{trans "%name," name=$customer.name}}</p>

app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
8787
<?php endif; ?>
8888
<td class="col qty" data-th="<?php echo $block->escapeHtml(__('Qty')); ?>">
8989
<div class="control qty">
90-
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $block->getQty() ?>" type="number" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{'required-number':true,'validate-greater-than-zero':true}" data-role="cart-item-qty"/>
90+
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $block->getQty() ?>" type="number" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" data-cart-item-id="<?php echo $block->escapeHtml(__($_item->getSku())) ?>" maxlength="12" data-validate="{'required-number':true,'validate-greater-than-zero':true}" data-role="cart-item-qty"/>
9191
</div>
9292
<?php $cols++; ?>
9393
</td>

app/code/Magento/Email/Controller/Adminhtml/Email/Template/DefaultTemplate.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ public function execute()
4141
$parts = $this->emailConfig->parseTemplateIdParts($templateId);
4242
$templateId = $parts['templateId'];
4343
$theme = $parts['theme'];
44+
4445
if ($theme) {
45-
// If loading template from a theme folder, set theme so that appropriate template gets loaded
4646
$template->setForcedTheme($templateId, $theme);
4747
}
48-
49-
// Since the $template model doesn't have its area set, set it so that theme loads from appropriate area
5048
$template->setForcedArea($templateId);
49+
5150
$template->loadDefault($templateId);
5251
$template->setData('orig_template_code', $templateId);
5352
$template->setData('template_variables', \Zend_Json::encode($template->getVariablesOptionArray(true)));

0 commit comments

Comments
 (0)