10
10
use Magento \Framework \App \Helper \Context ;
11
11
use Magento \Framework \Exception \NoSuchEntityException ;
12
12
use Magento \Store \Model \StoreManagerInterface ;
13
- use Magento \Catalog \Model \Product \Visibility ;
14
13
use Magento \Framework \Exception \LocalizedException ;
15
14
use Magmodules \Channable \Service \Product \InventorySource ;
16
15
@@ -87,10 +86,6 @@ class Source extends AbstractHelper
87
86
* @var Item
88
87
*/
89
88
private $ itemHelper ;
90
- /**
91
- * @var Category
92
- */
93
- private $ categoryHelper ;
94
89
/**
95
90
* @var StoreManagerInterface
96
91
*/
@@ -104,30 +99,17 @@ class Source extends AbstractHelper
104
99
*/
105
100
private $ storeId = null ;
106
101
107
- /**
108
- * Source constructor.
109
- *
110
- * @param Context $context
111
- * @param StoreManagerInterface $storeManager
112
- * @param General $generalHelper
113
- * @param Category $categoryHelper
114
- * @param Product $productHelper
115
- * @param InventorySource $inventorySource
116
- * @param Item $itemHelper
117
- */
118
102
public function __construct (
119
103
Context $ context ,
120
104
StoreManagerInterface $ storeManager ,
121
105
General $ generalHelper ,
122
- Category $ categoryHelper ,
123
106
Product $ productHelper ,
124
107
InventorySource $ inventorySource ,
125
108
Item $ itemHelper
126
109
) {
127
110
$ this ->generalHelper = $ generalHelper ;
128
111
$ this ->productHelper = $ productHelper ;
129
112
$ this ->itemHelper = $ itemHelper ;
130
- $ this ->categoryHelper = $ categoryHelper ;
131
113
$ this ->storeManager = $ storeManager ;
132
114
$ this ->inventorySource = $ inventorySource ;
133
115
parent ::__construct ($ context );
@@ -163,12 +145,6 @@ public function getConfig(int $storeId, ?string $type = 'feed', ?string $currenc
163
145
$ config += [
164
146
'base_url ' => $ this ->storeManager ->getStore ()->getBaseUrl (),
165
147
'weight_unit ' => ' ' . $ this ->getStoreValue (self ::XPATH_WEIGHT_UNIT ),
166
- 'categories ' => $ this ->categoryHelper ->getCollection (
167
- $ storeId ,
168
- '' ,
169
- '' ,
170
- 'channable_cat_disable_export '
171
- ),
172
148
'item_updates ' => $ this ->itemHelper ->isEnabled ($ storeId ),
173
149
'delivery ' => $ this ->getStoreValue (self ::XPATH_DELIVERY_TIME )
174
150
];
@@ -631,6 +607,7 @@ public function getAttributes($type, $filters = [], $storeId = null)
631
607
$ attributes ['item_group_id ' ] = [
632
608
'label ' => 'item_group_id ' ,
633
609
'source ' => $ attributes ['id ' ]['source ' ],
610
+ 'parent_selection_disabled ' => 1 ,
634
611
'parent ' => 2
635
612
];
636
613
$ attributes ['is_bundle ' ] = [
@@ -857,7 +834,8 @@ public function getCategoryData($product, $parent, $categories)
857
834
$ path [] = [
858
835
'level ' => $ category ['level ' ],
859
836
'id ' => $ catId ,
860
- 'path ' => implode (' > ' , $ category ['path ' ])
837
+ 'path ' => $ category ['path ' ],
838
+ 'url ' => $ category ['url ' ],
861
839
];
862
840
}
863
841
}
0 commit comments