Comments (5)
I made the fix and released 1.4.1.
from product-import.
Hello,
I am sorry you had this trouble with this problem. I hope I can explain this a bit.
Basically, the importer is a product importer. It is not intended to import categories. The only thing the importer does is to create a basic entry in the category tables, for the categories that did not yet exist, so that the products can be linked to it. So it's just a quick initial population of categories.
The reason why the categories are created at the admin-level is that the category's name serves as an identifier in the import. It is important that it remains unchanged. This is not a problem because the name of the category can be set at the store view level, and changing it later at this level will not interfere with the importer.
Once the categories are created, the importer uses the admin name to look up the id. Categories are not updated.
As to the url_rewrite table. I am looking at the code and I see that an entry is written to the url_rewrite table at store view 0 (admin). This was just silly of me. It doesn't do anything. url_rewrite entries are not inherited, an entry needs to exist for each store view.
You are correct to change the store_id to 1 to make it work for your (only) store view. This works well for the initial population of the categories.
I hope this helps you to understand why things work as they do. Let me know your thoughts.
greetings,
Patrick
from product-import.
Ah this was a great explanation, it's been awhile since I worked with Magento so it's all a beccome a bit foreign to me. So I guess it's safe to hard code the store_id's myself. I don't have any intentions on having multiple stores just yet, but I was under the presumption that although there are no other categories with store_id > 0, everything would just default to that category?
from product-import.
Thanks. Yes changing the store id's to 1 is fine. The value of normal attributes defaults to the admin level. Not so for the url_rewrite table.
from product-import.
I will change the importer in a few days so that it generates url_rewrites for the existing store views, in stead of the store view 0 (which has no use).
from product-import.
Related Issues (20)
- website_codes restapi HOT 4
- How to use the programming library to import products HOT 3
- Restapi update url issue HOT 15
- Category flat url structure HOT 9
- Image import creates hardlinks HOT 9
- Please provide example of how to use post method with webapi? HOT 11
- Saving product on storeview scope overwrites storeview attribute values with global values HOT 4
- How to set salable quantity ? HOT 5
- Export category attribute values HOT 2
- Trying to get property 'path' of non-object in Model/Resource/Storage/UrlRewriteStorage.php on line 376 HOT 1
- How to set out of stock threshold for backorders ? HOT 4
- Importing library fails after clearing all products HOT 1
- The setSelectAttribute method does not fill swatch input on Text Swatch HOT 3
- Module shouldn't rely on magento2-base package to exist HOT 3
- Fetching Magento configurations isn't working as expected HOT 3
- Generated Url key already exists HOT 1
- Clear Cache after change per product ID HOT 1
- PHP 8 Compatibility HOT 1
- Choose Affected Attribute Set prompt when saving configurable product
- Can't set is_in_stock = 0 HOT 1
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 product-import.