Giter VIP home page Giter VIP logo

Comments (6)

ktruehl avatar ktruehl commented on June 12, 2024

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.

wagnert avatar wagnert commented on June 12, 2024

@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.

wagnert avatar wagnert commented on June 12, 2024

@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.

ktruehl avatar ktruehl commented on June 12, 2024

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.

wagnert avatar wagnert commented on June 12, 2024

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

category-csv

from import-category.

ktruehl avatar ktruehl commented on June 12, 2024

Great. Thanks for the info. Then it should still work for me.

from import-category.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.