Comments (6)
I forgot to post my solution (more hack than workaround) to this. I overwrote the method getValue()
in TechDivision\Import\Category\Observers\CategoryUrlRewriteObserver
by the following implementation:
public function getValue($name, $default = null, callable $callback = null)
{
if ($name === ColumnKeys::PATH)
{
$pathArray = explode('/', parent::getValue($name, $default, $callback));
$pathArray[count($pathArray) - 1] = parent::getValue(ColumnKeys::NAME);
return implode('/', $pathArray);
}
return parent::getValue($name, $default, $callback);
}
from import-category.
@ktruehl Am i correct, when i assume, that you ONLY changed the value in the column name
, not the value in the column path
? The value path
is comparable with the SKU of a product, which means when the path changes a new product will be created.
from import-category.
@ktruehl I think the issue has been closed with 3.1.0-beta13. If not, or my assumption in the comment above has been wrong, please re-open the issue.
from import-category.
Yeah, I do see the point about uniqueness of path. In the end it's a philosophical question. My workaround works and is simple enough, so that should be fine.
Concerning the major changes you did: Does that mean that I now have to provide the name path in the correct language for each store view? Currently I'm simply using the name path from the admin store to identify a category for each store view.
from import-category.
Hi, especially in the case of categories it is. I think Magento knows why they didn't implement a category import ;)
The path
column is the unique identifier and the name
column is used to be render the category tree in backend and the categories in frontend, for example the file i've tested it with looks like the following
from import-category.
Great. Thanks for the info. Then it should still work for me.
from import-category.
Related Issues (13)
- Invalid access to `is_autogenerated` and `redirect_type` fields
- Installation HOT 1
- import creates URL rewrites for store views that don't contain the category HOT 4
- 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
- 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.