magmodules / magento2-channable

Channable Connect for Magento® 2
https://marketplace.magento.com/magmodules-magento2-channable.html
BSD 2-Clause "Simplified" License
28 stars 40 forks source link

The feed purges the Category Name #206

Closed MarianNapi closed 10 months ago

MarianNapi commented 1 year ago

So line 845 $category has properties name, level and path. Line 847 implodes path into a new array (why?). Line 851 and onwards sorts the new array by level and returns this new array.

-> Property name is purged.

https://github.com/magmodules/magento2-channable/blob/cdcc4d8d3c1eded2c473c7e5ab0286b60aae4bd8/Helper/Source.php#L843-L858

Expected result:

['categories' => ['name' => 'CategoryName', 'level' => 'CategoryLevel', 'path' => 'Category > Path']]

Result in reality:

['categories' => ['level' => 'CategoryLevel', 'path' => 'Category > Path']]

Marvin-Magmodules commented 1 year ago

Hi @MarianNapi, we only push the complete category paths to Channable, not the actual category name, as this is a requirement from Channable side where we sort them on level. Can you explain what you are trying to accomplish?

MarianNapi commented 1 year ago

So what I try to accomplish is to send a list to channable with category names and paths. And looking into the code I saw, that the attribute 'name' is loaded and given to Source.php but then purged.

I understand that it's not a requirement by Channable - even tho i do not see a reason for that - but then you might want to remove following line:

https://github.com/magmodules/magento2-channable/blob/cdcc4d8d3c1eded2c473c7e5ab0286b60aae4bd8/Helper/Category.php#L116

The parameter 'name' is not needed in the object and will just consume resources.

Marvin-Magmodules commented 1 year ago

Channable processes these paths back to categories in their tool. You will see 'categories' and 'category_paths' when you navigate to 'items' on app.channable.com and preview the data.

Frank-Magmodules commented 10 months ago

Hello @MarianNapi , I'm happy to inform you that we've recently released version 1.16.0, with the modification you requested. I'm marking this issue as closed, but please don't hesitate to reopen it if you have any additional questions