File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed
view/frontend/web/template/minicart/item
blank/Magento_Checkout/web/css/source/module
luma/Magento_Checkout/web/css/source/module Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Catalog \Model \Product \Configuration \Item \ItemResolverInterface ;
11
11
12
12
/**
13
- * Default item
13
+ * Default cart item
14
14
*/
15
15
class DefaultItem extends AbstractItem
16
16
{
@@ -78,7 +78,7 @@ public function __construct(
78
78
}
79
79
80
80
/**
81
- * { @inheritdoc}
81
+ * @inheritdoc
82
82
*/
83
83
protected function doGetItemData ()
84
84
{
@@ -106,6 +106,7 @@ protected function doGetItemData()
106
106
],
107
107
'canApplyMsrp ' => $ this ->msrpHelper ->isShowBeforeOrderConfirm ($ this ->item ->getProduct ())
108
108
&& $ this ->msrpHelper ->isMinimalPriceLessMsrp ($ this ->item ->getProduct ()),
109
+ 'message ' => $ this ->item ->getMessage (),
109
110
];
110
111
}
111
112
@@ -121,6 +122,8 @@ protected function getOptionList()
121
122
}
122
123
123
124
/**
125
+ * Returns product for thumbnail.
126
+ *
124
127
* @return \Magento\Catalog\Model\Product
125
128
* @codeCoverageIgnore
126
129
*/
@@ -130,6 +133,8 @@ protected function getProductForThumbnail()
130
133
}
131
134
132
135
/**
136
+ * Returns product.
137
+ *
133
138
* @return \Magento\Catalog\Model\Product
134
139
* @codeCoverageIgnore
135
140
*/
Original file line number Diff line number Diff line change 6
6
namespace Magento \Checkout \Test \Unit \CustomerData ;
7
7
8
8
use Magento \Catalog \Model \Product \Configuration \Item \ItemResolverInterface ;
9
+ use PHPUnit \Framework \MockObject \MockObject ;
9
10
10
11
class DefaultItemTest extends \PHPUnit \Framework \TestCase
11
12
{
@@ -25,7 +26,7 @@ class DefaultItemTest extends \PHPUnit\Framework\TestCase
25
26
private $ configurationPool ;
26
27
27
28
/**
28
- * @var ItemResolverInterface|\PHPUnit_Framework_MockObject_MockObject
29
+ * @var ItemResolverInterface|MockObject
29
30
*/
30
31
private $ itemResolver ;
31
32
@@ -102,5 +103,6 @@ public function testGetItemData()
102
103
$ this ->assertArrayHasKey ('product_price_value ' , $ itemData );
103
104
$ this ->assertArrayHasKey ('product_image ' , $ itemData );
104
105
$ this ->assertArrayHasKey ('canApplyMsrp ' , $ itemData );
106
+ $ this ->assertArrayHasKey ('message ' , $ itemData );
105
107
}
106
108
}
Original file line number Diff line number Diff line change 112
112
</ div >
113
113
</ div >
114
114
</ div >
115
+ < div class ="message notice " if ="message ">
116
+ < div data-bind ="text: message "> </ div >
117
+ </ div >
115
118
</ li >
Original file line number Diff line number Diff line change 246
246
margin-bottom : @indent__xs ;
247
247
}
248
248
249
+ .message {
250
+ margin-bottom : 0 ;
251
+ margin-top : 10px ;
252
+ }
253
+
249
254
.product {
250
255
> .product-item-photo ,
251
256
> .product-image-container {
Original file line number Diff line number Diff line change 264
264
margin-bottom : @indent__xs ;
265
265
}
266
266
267
+ .message {
268
+ margin-bottom : 0 ;
269
+ margin-top : 10px ;
270
+ }
271
+
267
272
.product-item-name {
268
273
font-weight : @font-weight__regular ;
269
274
margin : 0 0 @indent__s ;
You can’t perform that action at this time.
0 commit comments