Git Product home page Git Product logo

pimcore-data-definitions's People

Contributors

aarongerig avatar acldeveloper avatar blankse avatar brainsbucket avatar bramstroker avatar cruiser13 avatar damijank avatar davidhoeck avatar dkarlovi avatar dpfaffenbauer avatar fffab avatar itspirit avatar ivanmerta avatar josh-palan avatar kkirsz avatar kubaplas avatar marekgach avatar mbolka avatar michalfilik avatar miragepresent avatar mischief24 avatar prugala avatar ramundomario avatar roynilsson avatar sigere avatar slri avatar solverat avatar t-zilla avatar wpeisert avatar zavodyanka 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pimcore-data-definitions's Issues

Import via file upload - works?

It doesn't works for me so far. This is the error i'm receiving:

<br />
<b>Fatal error</b>:  Uncaught Zend_Json_Exception: Decoding failed: Syntax error in /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Json.php:97
Stack trace:
#0 /var/www/pimcore-live/plugins/ImportDefinitions/controllers/Admin/DefinitionController.php(191): Zend_Json::decode('&quot;model&quot;,&quot;price&quot;...')
#1 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): ImportDefinitions_Admin_DefinitionController-&gt;importAction()
#2 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action-&gt;dispatch('importAction')
#3 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#4 /var/www/pimcore-live/pimcore/lib/Pimcore.php(159): Zend_Controller_Front-&gt;dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#5 /var/ww in <b>/var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Json.php</b> on line <b>97</b><br />

Error: Document requires key, generated key automatically

Good Evening!

I have a problem importing the productCategory.

I'm using a simple CSV file composed like this:

id;parent;codice_settore;settore
1;49;15;PESCHERIA
2;49;13;ORTOFRUTTA
3;49;1;BEVANDE
4;49;2;ALIMENTARI

the separator is ";".

In the mapping i made this modifications:

screenshot 2017-04-21 19 41 42

Then, when i run the import the script tells me this

screenshot 2017-04-21 19 42 49

Which field i have to select like primary ?

Thanks!

Graziano

Unable to install the plugin.

I followed the steps described in the installation, updating minimum stability in the composer.json and the resource bundles in AppKernel.php section but system gives error as below.

Problem 1
- w-vision/import-definitions 2.0.x-dev requires coreshop/resource-bundle ^2.0 -> no matching package found.
- w-vision/import-definitions 2.0.0-alpha.4 requires coreshop/resource-bundle ^2.0 -> no matching package found.
- w-vision/import-definitions 2.0.0-alpha.3 requires coreshop/resource-bundle ^2.0-dev@dev -> no matching package found.
- w-vision/import-definitions 2.0.0-alpha.2 requires coreshop/resource-bundle ^2.0-dev -> no matching package found.
- w-vision/import-definitions 2.0.0-alpha.1 requires coreshop/resource-bundle ^2.0-dev -> no matching package found.
- Installation request for w-vision/import-definitions ^2.0-dev -> satisfiable by w-vision/import-definitions[2.0.0-alpha.1, 2.0.0-alpha.2, 2.0.0-alpha.3, 2.0.0-alpha.4, 2.0.x-dev].

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Can you help me solve this?

Support metadata (for example, for "Multihref advanced")

If you need to create a relation with additional metadata (for example, bill of material would have a relation and a Quantity), you need to be able to specify the relation metadata directly from the interpreter.

The way I see it, this means:

  1. being able to specify the mapping of the metadata fields
  2. wrapping the relation in the ElementMetadata instance and setting all the mapped metadata on the instance

Maybe some of this is already possible? WDYT?

Key set

Hi,

There is an error with the last update.

Not Key set, please check your import-data in /var/www/pimcore/vendor/w-vision/import-definitions/src/ImportDefinitionsBundle/Importer/Importer.php:416

I don't need to set a Key

How to fix this.

Thanks

dependent Column mapping configuration

Sometimes it is important to import a value before another cause they depend on each other. Therefore, find a way to prioritize columns or mark them as dependent.

Maintenance Fails

When running maintenance, I get the following error:

Deprecated: call_user_func_array() expects parameter 1 to be a valid callback, non-static method ImportDefinitions\Maintenance::cleanupLogFiles() should not be called statically in /var/www/html/pimcore/models/Schedule/Maintenance/Job.php on line 69

Making the cleanupLogFiles function static resolves the error.

Warning: include_once(ProcessManager/Model/Process.php)

Hello

I'm trying to run my first Import definition profile and getting this error:
Warning: include_once(ProcessManager/Model/Process.php)
The include path is correct - it includes path to ImportDefinitions lib folder:
/var/www/pimcore-live/plugins/ImportDefinitions/lib, but there is no ProcessManager/Model/Process.php class in that folder.

What am I missing?

Installation issue

Installing with Pimcore 5.0.2 seems to lead to an error:

Fatal error: Class CoreShop\Bundle\ResourceBundle\Pimcore\PimcoreRepository cannot implement previously implemented interface CoreShop\Component\Resource\Repository\RepositoryInterface in .../web/vendor/coreshop/resource-bundle/Pimcore/PimcoreRepository.php on line 21

It seems there are some incompatibility between the 2 bundles for now.

Bug: ucfisrt missing on some class call.

Hello,

I tested your plugin ImportDefinitions, and it is really great, well thinked, good coding quality and nice features : )
Thanks a lot for sharing it.

I got some problem to make it work (on linux so case is sensitive), here are the changes i had to do to make it work, i think you could changed it on the source code so other users don't get any problem:

There is ucfirst needed on the following lines:

https://github.com/w-vision/ImportDefinitions/blob/master/lib/ImportDefinitions/Model/AbstractProvider.php#L347
https://github.com/w-vision/ImportDefinitions/blob/master/lib/ImportDefinitions/Model/AbstractProvider.php#L348
https://github.com/w-vision/ImportDefinitions/blob/master/lib/ImportDefinitions/Model/Setter/Objectbrick.php#L56
https://github.com/w-vision/ImportDefinitions/blob/master/lib/ImportDefinitions/Model/Setter/Objectbrick.php#L56

I tested only with normal class with Objectbricks, but maybe the same problem is on some other files.

Thanks a lot.

Manufacturer and categories to coreshop

Hi,

I'm trying to import data to coreshope but I cannot assign the manufacturer and categories from my CSV file, the categories remain empty without any error and for the manufacturer I have the following error:
Invalid href relation fieldname=manufacturer

In my CSV file column I have:

object:/kategorien/Elektrowerkzeuge/Zubehor/Akkus

And

object:/Hersteller/Bosch/Bosch

In ImportDefinitions I have tried with different setting without any success.

Thanks

Custom provider creation

Good morning!

I saw you pimcore extension, and i need it badly for a project involving data import.

I need to create my custom provider because i need to find a way to import a fixed with file.

How can i do it ?

I'm trying to enable my custom provider, which are the steps to create it ?

Thank you!

Graziano

Improvement: install/unsinstall and db table name.

I think install (in the Pimcore GUI) could send a nicer message than "true" (like: "Installation has been done").

There is no uninstall script, actually it just send "true" popin but do nothning.
Maybe it could send a nice message, and make some clean up. From what i have understand it could be:

  • delete the table importdefinitions_log
  • delete the file /var/config/importdefintions.php
  • delete the directory /plugins/ImportDefinitions

By the way, maybe prefix the table name with "plugins_" (so it will be plugins_importdefinitions_log) could be better (it seems to be the Pimcore way good pratice, and will ensure no collision later on future Pimcore updates wich use the same name).

Thanks!

Delete ColumnMappings doesn't work.

Something weird now is in config:

[
    "fromColumn" => "extModel341-1",
    "toColumn" => "images",
    "primaryIdentifier" => FALSE,
    "config" => [
        "interpreter" => "Images",
        "setter" => NULL
    ],
    "interpreterConfig" => [
        "path" => "/security/products/%Text(ean);"
    ],
    "setterConfig" => NULL
],

[UX] improve command line experience

Here are two simple ideas which might significantly improve the developer/user experience:

  1. allow to also set definition by name, like --definition ProductTree instead of just --definition 1, much more readable
  2. allow to pass only the source file as a separate param, not (only) via --params, for example --source path/to/file.csv, reason is your shell completion works again and it's easier than constructing the JSON params

Pimcore does not work after Update

After updating Pimcore from v4.4.1 to v4.4.3 and updating ImportsDefinitions, Pimcore does not work anymore. ImportsDefinitions Configs are not correctly showing up and after removing a custom runner from my startup.php file, pimcore now works.

Screenshot of configs

[DATABASE] Clean up log records, when object doesn't exist anymore

The cleaner tries to clean objects with ID's that don't even exist anymore. Pimcore throws a warning. ID's should be removed from import_definitions_log table, if they don't exist anymore.

Here's the log:

[2017-12-12 13:49:09] doctrine.DEBUG: SELECT id, (CASE WHEN expire IS NULL OR expire > ? THEN data ELSE NULL END) as data FROM cache WHERE id IN (?) [1513082949,["object_834"]] []
[2017-12-12 13:49:09] cache.DEBUG: Key object_834 doesn't exist in cache {"key":"object_834"} []
[2017-12-12 13:49:09] doctrine.DEBUG: SELECT o_type,o_className,o_classId FROM objects WHERE o_id = ? [834] []
[2017-12-12 13:49:09] pimcore.WARNING: No entry for object id 834 [] []

Can't import href: Error invalid href relation fieldname=xxx

Hello,
We have an issue with the href import

We are trying to import a class GROUPS related with "href" to a class FAMILIES
We have tried many settings but we still have the same alert in logs when we execute the CLI import:

Error invalid href relation fieldname=famille

Our import file contains two columns with fields "groups" and "famille"
Can you tell us how settings should be (interpreters, setters, keys are not clear for us)
Our version: pimcore 4.6
A standard import is working well if in the column " famille" we setup the import file with path like /Catalog/Famille/xxx

We would like to avoid "/Catalog/Famille/" string in the import as the Import should recognize xxx as a href without writing all the path.
Best regards

Alexandre

SQL error

Hi,

Column not fount in SQL with localizedfield.

I have many inputs under localizedfields and when a run my definition I have the following error:


1/1 [=] 100% (< 1 sec/< 1 sec) Error: An exception occurred while executing 'SELECT object_localized_10_de.o_id as o_id, object_localized_10_de.o_type FROM object_localized_10_de WHERE (idmachine~de = ? AND object_localized_10_de.o_type IN ('variant','object','folder'))' with params ["250"]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'idmachine~de' in 'where clause'
Import finished!

Is ImportDefinition working with multi language?

Thank you for any help.

Iterator Interpreter

As we discussed, the idea is to allow having another interpreter repeat its operation for each value in the array. This would mean any interpreter can be used as assets_url currently (which would make that one obsolete, probably).

Update existing objects. Not create new

Hello

Thanks for your awesome work on this plug-in. I'm trying to create import definition to update price for existing objects (products).
Here is an example of my csv file

"model","price"
"ADN120X24","2345"
"ADN120X30","2345678"

My object has sku field which is not listed in csv. This is by design, I want just to be able to update prices of products by model number, not by the sku.
Is that possible with your plugin?

Let me know. Thanks!

Nested Interpreter

Would be a nice feature to nest Interpreter similar to CoreShop Nested Price Rules.

How to pass a file for import

Hi, could explain how to upload/pass a file for import? I read your documentation but didn't find how to do it.
I want to create a few import definitions for each supplier and then import stock by cron. Thank you

Extra fields in the mappig config

interpreterConfig / setterConfig forms contain extra fields from time to time. It causes error during saving.

screenshot from 2018-01-22 16-23-59

fromColumn: Iternational PID is a checkbox, interpreterConfig should be empty for it (see screenshot)

The main issue that it doesn't show in which row of the grid that error appeared.

Error in 'key' field usage

When I mark field 'key' as primary, erroneous SQL is generated.
Instead of 'o_key' field 'key' is used.

SELECT object_1.o_id as o_id, object_1.o_type FROM object_1 WHERE (key = '489119900' AND object_1.o_type IN ('variant','object','folder'));

Error: An exception occurred while executing 'SELECT object_1.o_id as o_id, object_1.o_type FROM object_1 WHERE (key = ? AND object_1.o_type IN ('variant','object','folder'))' with params ["4891199007996"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = '489119900' AND object_1.o_type IN ('variant','object','folder'))' at line 1

Can you possibly create a tutorial video, from the basics?

Hi there,

I was hoping you wouldn't mind creating video tutorial?
Where you run through all the different steps to getting a parsed XML file into a product feed.

If you just turn on a screen recorder and go through the steps, that would be awesome.

Thank you!

Alter/modify key field before import

In my CSV I have the SKU field with values like: 1, 2, 3
In PIMCore I have SKU with values: prefix-1, prefix-2, prefix-3 so it actually prefix-[sku_from_csv]
So I want to be able to preprocess values from csv and append prefix to each sku value before search for objects in PIMCore.

I guess it is possible with your module. Please, push me in right direction.
Thanks!

Large classification store key definitions support

When dealing with classes which have a classification store field, plugin will try to load all key definitions from classification store.

On large stores this will cause timeouts on server side or make browser unresponsive.

Possible sollution: use mechanism similar to one used when adding cs field into standard Pimcore grid.

Create automatically a folder

Hi,

How can I create automatically a folder in Data Objects using an input name so I can create categories when i'm importing a CSV?

Thanks

asset_url don't work

Importing image directly from link doesn't work. interpreter is set to asset_url and path is set as well.

In my class image is set with the same upload path folder as the asset_url.

When I run the CLI command I have the following error:
08:05:01 ERROR [import_definition] Exception: unable to resolve asset implementation with type: in /var/www/pimcore/pimcore/models/Asset.php:477

How to make work fieldcollection

Hello,

I am trying to make your fieldcollection setter with no luck : (

First it seems there is a bug. You make a foreach by reference and update the reference inside the loop. It is dangerous from my experience and can lead to strange problem. Actually it leads to.
On this line https://github.com/w-vision/ImportDefinitions/blob/master/lib/ImportDefinitions/Model/Setter/Fieldcollection.php#L55 the problem dispear my making an unset($key); (so just after the loop). It is a good pratice.
If it is not done, making:
foreach ($keys as $key) print_r($data[$key['from']]);
send the same values... (and there was 2 differents values in the data). You can easily check it i think.

Second, I didn't manage to make it working:
Here is the field collection making of just two field: sku (input string) and stock (number).
Here is my csv exemple:

"sku1";"sku2";"stock1";"stock2"
"00001";"00002";88;99

sku1 and sku2 can be considered the primary.

I didn't get the point to configure the setter on the GUI... For "Keys" (from:to,from:to,from:to,...) I set:
sku1:sku,sku2:sku on both sku and stock in their config by choosing the "fieldcollection" setter. But how do I set that stock1 is linked to ref1 ?
Could you please give me some hints about please ?

Thanks a lot.

Relocate assets

With the new "deduplicate by URL" feature for assets, it's possible for them to be in the system already, just not be at the path we expect tp place them.

We should add support to relocate them, similar to what's done for objects.

Chained Import-Definitions

Sometimes its necessary to chain Definitions. For example

  • Category
    • Products

or

  • Product
    • FieldCollection

It would be nice to have the ability to chain different kind of definitions with an getter/setter or special function.

ImportDefinitions does not ignore non-mandatory fields

I'm trying to import a CSV as objects using the importer. One of the object fields is missing in the CSV.
It's a number field with the following settings:
{ "fieldtype":"numeric", "width":"", "defaultValue":null, "queryColumnType":"double", "columnType":"double", "phpdocType":"float", "integer":true, "unsigned":true, "minValue":1, "maxValue":99999, "decimalPrecision":null, "name":"postal", "title":"Postleitzahl", "tooltip":"", "mandatory":false, "noteditable":false, "index":false, "locked":false, "style":"", "permissions":null, "datatype":"data", "relationType":false, "invisible":false, "visibleGridView":false, "visibleSearch":false },

Importer error message is "[Pimcore\Model\Element\ValidationException] Value in field [ postal ] is not at least 1 fieldname=postal".

The error itself is correct but I believe it should still import the data because the field postal is not mandatory and does not even exist in CSV.

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.