instride-ch / pimcore-data-definitions Goto Github PK
View Code? Open in Web Editor NEWData Definitions Plugin for Pimcore
License: Other
Data Definitions Plugin for Pimcore
License: Other
Provide different kind of handle "options":
Hello,
The link on Link on the Pimcore 5 curated list is broken is broken:
https://github.com/w-vision/ImportDefinitions/tree/import-definitions-2
Maybe the link could be updated on the forum.
In the mapping the settings for "System Colums" are not getting saved.
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('"model","price"...')
#1 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): ImportDefinitions_Admin_DefinitionController->importAction()
#2 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('importAction')
#3 /var/www/pimcore-live/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#4 /var/www/pimcore-live/pimcore/lib/Pimcore.php(159): Zend_Controller_Front->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 />
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:
Then, when i run the import the script tells me this
Which field i have to select like primary ?
Thanks!
Graziano
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?
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:
ElementMetadata
instance and setting all the mapped metadata on the instanceMaybe some of this is already possible? WDYT?
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
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.
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.
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?
Add Option to link a "Fail"/"Success" Notification E-Mail
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.
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.
Create a nice GUI to start imports.
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
Enhance Logging of the plugin
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
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:
importdefinitions_log
/var/config/importdefintions.php
/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!
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
],
Here are two simple ideas which might significantly improve the developer/user experience:
--definition ProductTree
instead of just --definition 1
, much more readable--params
, for example --source path/to/file.csv
, reason is your shell completion works again and it's easier than constructing the JSON paramsThe 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 [] []
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
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"]:
Is ImportDefinition working with multi language?
Thank you for any help.
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).
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!
Would be a nice feature to nest Interpreter similar to CoreShop Nested Price Rules.
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
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
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!
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!
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.
Hello
Is it possible to get a list of errors/unprocessed records during import process?
I writing small cron script and want to send an email to administrator when import process finishes with errors.
Possible?
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
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
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.
Attempting to use a CSV with no headline causes all sorts of issues.
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.
Sometimes its necessary to chain Definitions. For example
or
It would be nice to have the ability to chain different kind of definitions with an getter/setter or special function.
At least in database or in other places?
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.
Should be $filterClass = '\ImportDefinitions\Model\Filter\\' . $definition->getFilter();
Notice the missing s in definitions. This was causing me errors with my filter classes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.