Comments (4)
I'll try to get to it as soon as possible.
from import-category.
So. I have become a bit more familiar with the M2IF framework, and I have written my own workaround for this. The crucial point is to return the right store view codes for the current category.
I extended the EeBuchProcessor
class EeBunchSubject extends \TechDivision\Import\Category\Ee\Subjects\EeBunchSubject
{
/**
* returns the store view codes relevant to the category represented by the current row
*
* @return array
* @throws \Exception
*/
public function getRootCategoryStoreViewCodes()
{
$path = $this->getValue(\TechDivision\Import\Category\Utils\ColumnKeys::PATH);
$rootCategoryPath = explode('/', $path)[0];
$rootCategory = $this->getCategoryByPath($rootCategoryPath);
$storeCodes = [];
foreach ($this->rootCategories as $storeCode => $category)
{
if ($category['entity_id'] == $rootCategory['entity_id'])
$storeCodes[] = $storeCode;
}
return $storeCodes;
}
}
and then the CategoryUrlRewriteObserver
:
class CategoryUrlRewriteObserver extends \TechDivision\Import\Category\Observers\CategoryUrlRewriteObserver
{
/**
* @inheritdoc
*
* makes sure only the relevant store view codes are returned
*
* @return array
* @throws \Exception
*/
protected function getStoreViewCodes()
{
$subject = $this->getSubject();
/* @var \Lehner\PimCategoriesImport\Import\Subjects\EeBunchSubject $subject */
return $subject->getRootCategoryStoreViewCodes();
}
}
from import-category.
Hi, it would be really nice if you would create a PR with your workaround/bugfix ... is that possible?
from import-category.
Voilà the pull request. I didn't test it outside the context of our client's setup. Just copied over the code.
from import-category.
Related Issues (13)
- Invalid access to `is_autogenerated` and `redirect_type` fields
- Installation HOT 1
- UrlRewriteUpdateObserver uses wrong delete method on bunch processor HOT 2
- Import of Category URL rewrites does not work HOT 12
- UrlKeyAndPathObserver creates wrong URL path for non-admin store views HOT 7
- CategoryUrlRewriteObserver can't handle renamed categories HOT 6
- Incorrect rename of url_key HOT 1
- Position is set to 0 HOT 8
- Overriding category with subcategory position
- Use defaults value for include_in_menu to avoid inconsistencies in add_update mode HOT 17
- getAttributeSetNameById called on null HOT 5
- Undefined index: techdivision_import_utils_entityStatus_memberName (4.0.0-alpha.2) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from import-category.