File tree 1 file changed +1
-25
lines changed
app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column 1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change 14
14
*/
15
15
class Cart extends \Magento \Wishlist \Block \Customer \Wishlist \Item \Column
16
16
{
17
- /**
18
- * @var View
19
- */
20
- private $ productView ;
21
-
22
- /**
23
- * @param \Magento\Catalog\Block\Product\Context $context
24
- * @param \Magento\Framework\App\Http\Context $httpContext
25
- * @param \Magento\Catalog\Block\Product\View $productView
26
- * @param array $data
27
- */
28
- public function __construct (
29
- \Magento \Catalog \Block \Product \Context $ context ,
30
- \Magento \Framework \App \Http \Context $ httpContext ,
31
- array $ data = [],
32
- \Magento \Catalog \Block \Product \View $ productView = null
33
- ) {
34
- $ this ->productView = $ productView ?:
35
- \Magento \Framework \App \ObjectManager::getInstance ()->get (\Magento \Catalog \Block \Product \View::class);
36
- parent ::__construct ($ context , $ httpContext , $ data );
37
- }
38
-
39
17
/**
40
18
* Returns qty to show visually to user
41
19
*
@@ -45,9 +23,7 @@ public function __construct(
45
23
public function getAddToCartQty (\Magento \Wishlist \Model \Item $ item )
46
24
{
47
25
$ qty = $ item ->getQty ();
48
- $ qty = $ qty < $ this ->productView ->getProductDefaultQty ($ this ->getProductItem ())
49
- ? $ this ->productView ->getProductDefaultQty ($ this ->getProductItem ()) : $ qty ;
50
- return $ qty ?: 1 ;
26
+ return $ qty ? $ qty : 1 ;
51
27
}
52
28
53
29
/**
You can’t perform that action at this time.
0 commit comments