Giter VIP home page Giter VIP logo

categoryimporter's Introduction

CategoryImporter module for Magento 2 >= 2.1.x

Simple category importer from CSV file. Allows to import / update categories not only from Magento shops (use old shop category ID)

Features

  • adds attribute to category 'Old category ID'
  • adds possibility to add custom attribute codes by command option
  • adds links between parent and child categories (by 'Old category ID')
  • work only for admin store (multi stores are not implemented yet)

Install module

  • add module via composer or download and copy files to app/code/Macopedia/CategoryImporter
  • run bin/magento module:enable Macopedia_CategoryImporter in command line

Usage

NOTICES:

  • please add parent categories before children in file
  • use semicolon (';') as delimiter in file

Attributes supported by default:

  • Required attributes:

    • id
    • name
    • parent_id
  • Optional attributes with predefined values:

    • is_active - default value: 1
    • is_anchor - default value: 1
    • include_in_menu - default value: 1
    • custom_use_parent_settings - default value: 1
  • Base additional attributes:

    • description
    • meta_title
    • meta_keywords
    • meta_description
    • url_key
    • url_path
    • position

Base usage examples

bin/magento import:categories [--path|-p <path to file in Magento dir>] [--additional|-a <additional attributes separated by comma>]

bin/magento import:categories -p var/import/categories-example.csv 
	
bin/magento import:categories -p var/import/categories-example.csv -a my_custom_attribute1,my_custom_attribute2,my_custom_attribute3

Simple CSV file to import categories

id;name;parent_id
10;Category name 1;null
11;Category name 2;null
20;First child of cat 1;10
21;First child of cat 2;11
22;Second child of cat 2;11

categoryimporter's People

Contributors

idziakjakub avatar oviliz avatar tmotyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

categoryimporter's Issues

Undefined offset: 2 in CategoriesCommand.php

Hi.

When I run

bin/magento import:categories -p var/catimport/test.csv

I get the following error:

Notice: Undefined offset: 2 in /app/code/Macopedia/CategoryImporter/Console/Command/CategoriesCommand.php on line 167

My CSV looks like:

id;name;parent_id;is_active;is_anchor;include_in_menu;custom_use_parent_settings;description;meta_title;meta_keywords;meta_description

1111;New Category;594;1;0;1;0;;;;

Install

How can I install and enable module?

InstallData::$entityType is deprecated

I'm getting the following (Magento 2.4.6 PHP 8.2):
Deprecated Functionality: Creation of dynamic property Macopedia\CategoryImporter\Setup\InstallData::$entityType is deprecated in vendor/macopedia/magento2-categoryimporter/Setup/InstallData.php on line 29

Considering the lack of recent commits, I suppose this extensions is abandoned? :(

expects parameter 2 to be array

Hi,

I have installed it on Magento 2.2.7 store.

When I run bin/magento import:categories -p catalog_product.csv then I am getting below error

Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/html/mage/app/code/Macopedia/CategoryImporter/Console/Command/CategoriesCommand.php on line 159

My CSV file is having the columns as id, name, parent_id

category image

Hello,
it is possible to add also category image with the additional attributes?
Thanks

Import category csv store id

hi,

i want to import csv categories for specific store id.
Please help me to make modification or developer this features! its more important

regards,
Luca

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.