File tree Expand file tree Collapse file tree 7 files changed +63
-5
lines changed
ConfigurableProduct/Test/Mftf
Test/AdminConfigurableProductUpdateTest
templates/account/dashboard Expand file tree Collapse file tree 7 files changed +63
-5
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © Magento, Inc. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+
9
+ <actionGroups xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
+ <actionGroup name =" AdminCreateConfigurationsByAttributeCodeAndNavigateToOptionsQuantityActionGroup" extends =" GenerateConfigurationsByAttributeCodeActionGroup" >
12
+ <annotations >
13
+ <description >Selects all Attribute options for the provided Attribute Code and navigates to Options quantity on the Configurable Product creation/edit page.</description >
14
+ </annotations >
15
+ <arguments >
16
+ <argument name =" price" type =" string" defaultValue =" 100" />
17
+ </arguments >
18
+
19
+ <waitForElementVisible selector =" {{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" after =" clickOnNextButton2" stepKey =" waitForNextPageOpened" />
20
+ <click selector =" {{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" after =" waitForNextPageOpened" stepKey =" clickOnApplySinglePriceToAllSkus" />
21
+ <fillField selector =" {{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput =" {{price}}" after =" clickOnApplySinglePriceToAllSkus" stepKey =" enterAttributePrice" />
22
+
23
+ <remove keyForRemoval =" clickOnApplySingleQuantityToEachSku" />
24
+ <remove keyForRemoval =" enterAttributeQuantity" />
25
+ <remove keyForRemoval =" clickOnNextButton3" />
26
+ <remove keyForRemoval =" clickOnNextButton4" />
27
+ </actionGroup >
28
+ </actionGroups >
Original file line number Diff line number Diff line change 25
25
26
26
<after >
27
27
<deleteData createDataKey =" createCategory" stepKey =" deleteCategory" />
28
+ <actionGroup ref =" DeleteProductBySkuActionGroup" stepKey =" deleteConfigurableProductFilteredBySkuAndName" >
29
+ <argument name =" sku" value =" {{_defaultProduct.sku}}" />
30
+ </actionGroup >
31
+ <actionGroup ref =" ClearFiltersAdminDataGridActionGroup" stepKey =" clearFiltersOnProductIndexPage" />
28
32
<actionGroup ref =" AdminLogoutActionGroup" stepKey =" adminLogout" />
33
+ <!-- Reindex invalidated indices after product attribute has been created/deleted -->
34
+ <magentoCron groups =" index" stepKey =" reindexInvalidatedIndices" />
29
35
</after >
30
36
31
37
<!-- Create a configurable product via the UI -->
Original file line number Diff line number Diff line change 14
14
</action >
15
15
</referenceBlock >
16
16
<referenceContainer name =" content" >
17
- <block class =" Magento\Customer\Block\Account\Dashboard\Info" name =" customer_account_dashboard_info" as =" info" template =" Magento_Customer::account/dashboard/info.phtml" cacheable =" false" />
17
+ <block class =" Magento\Customer\Block\Account\Dashboard\Info" name =" customer_account_dashboard_info" as =" info" template =" Magento_Customer::account/dashboard/info.phtml" cacheable =" false" >
18
+ <container name =" customer.account.dashboard.info.blocks" as =" additional_blocks" />
19
+ </block >
18
20
<block class =" Magento\Customer\Block\Account\Dashboard\Address" name =" customer_account_dashboard_address" as =" address" template =" Magento_Customer::account/dashboard/address.phtml" cacheable =" false" />
19
21
</referenceContainer >
20
22
</body >
Original file line number Diff line number Diff line change 29
29
</a>
30
30
</div>
31
31
</div>
32
- <?php if ($ block ->isNewsletterEnabled ()) : ?>
32
+ <?php if ($ block ->isNewsletterEnabled ()): ?>
33
33
<div class="box box-newsletter">
34
34
<strong class="box-title">
35
35
<span><?= $ block ->escapeHtml (__ ('Newsletters ' )) ?> </span>
36
36
</strong>
37
37
<div class="box-content">
38
38
<p>
39
- <?php if ($ block ->getIsSubscribed ()) : ?>
39
+ <?php if ($ block ->getIsSubscribed ()): ?>
40
40
<?= $ block ->escapeHtml (__ ('You are subscribed to "General Subscription". ' )) ?>
41
- <?php else : ?>
41
+ <?php else : ?>
42
42
<?= $ block ->escapeHtml (__ ('You aren \'t subscribed to our newsletter. ' )) ?>
43
43
<?php endif ; ?>
44
44
</p>
45
45
</div>
46
46
<div class="box-actions">
47
- <a class="action edit" href="<?= $ block ->escapeUrl ($ block ->getUrl ('newsletter/manage ' )) ?> "><span><?= $ block ->escapeHtml (__ ('Edit ' )) ?> </span></a>
47
+ <a class="action edit" href="<?= $ block ->escapeUrl ($ block ->getUrl ('newsletter/manage ' )) ?> ">
48
+ <span><?= $ block ->escapeHtml (__ ('Edit ' )) ?> </span></a>
48
49
</div>
49
50
</div>
50
51
<?php endif ; ?>
52
+ <?= $ block ->getChildHtml ('additional_blocks ' ); ?>
51
53
</div>
52
54
</div>
Original file line number Diff line number Diff line change 49
49
<data key =" used_in_product_listing" >1</data >
50
50
<data key =" used_for_sort_by" >0</data >
51
51
</entity >
52
+ <entity name =" TextSwatchProductAttributeForm" extends =" VisualSwatchProductAttributeForm" >
53
+ <data key =" frontend_label[0]" unique =" suffix" >TextSwatchAttribute-</data >
54
+ <data key =" frontend_input" >swatch_text</data >
55
+ <data key =" attribute_code" unique =" suffix" >text_swatch_attribute_</data >
56
+ </entity >
52
57
</entities >
Original file line number Diff line number Diff line change 11
11
<operation name =" CreateSwatchProductAttributeForm" dataType =" SwatchProductAttributeForm" type =" create"
12
12
auth =" adminFormKey" url =" catalog/product_attribute/save" method =" POST" successRegex =" /messages-message-success/" returnRegex =" " >
13
13
<contentType >application/x-www-form-urlencoded</contentType >
14
+ <field key =" attribute_id" >string</field >
14
15
<field key =" frontend_label[0]" >string</field >
15
16
<field key =" frontend_label[1]" >string</field >
16
17
<field key =" frontend_input" >string</field >
43
44
<field key =" used_in_product_listing" >string</field >
44
45
<field key =" used_for_sort_by" >string</field >
45
46
</operation >
47
+ <operation name =" DeleteSwatchProductAttributeForm" dataType =" SwatchProductAttributeForm" type =" delete" auth =" adminOauth" url =" /V1/products/attributes/{attribute_code}" method =" DELETE" >
48
+ <contentType >application/json</contentType >
49
+ </operation >
46
50
</operations >
Original file line number Diff line number Diff line change @@ -292,6 +292,17 @@ define([
292
292
return _ . isArray ( products ) ? products [ 0 ] : null ;
293
293
} ,
294
294
295
+ /**
296
+ * Get chosen product id
297
+ *
298
+ * @returns int|null
299
+ */
300
+ getProductId : function ( ) {
301
+ var products = this . _CalcProducts ( ) ;
302
+
303
+ return _ . isArray ( products ) && products . length === 1 ? products [ 0 ] : null ;
304
+ } ,
305
+
295
306
/**
296
307
* @private
297
308
*/
You can’t perform that action at this time.
0 commit comments