diff --git a/Controller/ObjectsWithCsvController.php b/Controller/ObjectsWithCsvController.php
index 120714a..9aaf7c6 100755
--- a/Controller/ObjectsWithCsvController.php
+++ b/Controller/ObjectsWithCsvController.php
@@ -127,6 +127,7 @@ protected function bakeSearchData($csvData, $searchValues)
protected function retrieveDataObjects($allowedClasses, $key, $searchValues)
{
$dataObjectsArray = [];
+ $retrievedObjectsIdentifiers = [];
foreach ($allowedClasses as $class) {
if (class_exists($className = "\\Pimcore\\Model\\DataObject\\" . ucfirst($class))) {
diff --git a/Docs/images/data-type.png b/Docs/images/data-type.png
index 34938ea..ff4803c 100644
Binary files a/Docs/images/data-type.png and b/Docs/images/data-type.png differ
diff --git a/Docs/images/form.png b/Docs/images/form.png
index be67c9e..e15d52b 100644
Binary files a/Docs/images/form.png and b/Docs/images/form.png differ
diff --git a/Model/DataObject/ClassDefinition/Data/ObjectsWithCsv.php b/Model/DataObject/ClassDefinition/Data/ObjectsWithCsv.php
index 394279d..1b72c02 100755
--- a/Model/DataObject/ClassDefinition/Data/ObjectsWithCsv.php
+++ b/Model/DataObject/ClassDefinition/Data/ObjectsWithCsv.php
@@ -8,9 +8,9 @@
namespace ObjectsWithCsvBundle\Model\DataObject\ClassDefinition\Data;
-use Pimcore\Model\DataObject\ClassDefinition\Data\Objects;
+use Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyObjectRelation;
-class ObjectsWithCsv extends Objects
+class ObjectsWithCsv extends ManyToManyObjectRelation
{
public $fieldtype = 'objectsWithCsv';
}
\ No newline at end of file
diff --git a/ObjectsWithCsvBundle.php b/ObjectsWithCsvBundle.php
index c5fe51d..d0f90a8 100755
--- a/ObjectsWithCsvBundle.php
+++ b/ObjectsWithCsvBundle.php
@@ -28,6 +28,22 @@ public function getDescription()
*/
public function getVersion()
{
- return '1.0.2';
+ return '2.0.0';
+ }
+
+ /**
+ * Returns the bundle name that this bundle overrides.
+ *
+ * Despite its name, this method does not imply any parent/child relationship
+ * between the bundles, just a way to extend and override an existing
+ * bundle.
+ *
+ * @return string The Bundle name it overrides or null if no parent
+ *
+ * @deprecated This method is deprecated as of 3.4 and will be removed in 4.0.
+ */
+ public function getParent()
+ {
+ // TODO: Implement getParent() method.
}
}
diff --git a/README.md b/README.md
index dadf7e7..7049a5e 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,15 @@
Facilitates user to upload csv file for bulk attaching to objects datatype using csv upload functionality.
-![DataObject Edit Form](/Docs/images/form.png "Dataobject Edit Form")
+![DataObject Edit Form](Docs/images/form.png "Dataobject Edit Form")
-![CSV Upload](/Docs/images/upload-modal.png "CSV Upload")
+![CSV Upload](Docs/images/upload-modal.png "CSV Upload")
# Installation
## Prerequisite
-Requires **pimcore > 5.0** and **pimcore < 5.6**
+Requires **pimcore > 5.6**
### Step 1
@@ -28,7 +28,7 @@ Requires **pimcore > 5.0** and **pimcore < 5.6**
- Then `objectWithCsv` would be available in field selector under Relations (Add Data Component -> Relation -> objectsWithCsv)
-![objectWithCsv](/Docs/images/data-type.png "objectWithCsv")
+![objectWithCsv](Docs/images/data-type.png "objectWithCsv")
# Sample CSV
@@ -38,21 +38,21 @@ Multiple products are to be attached to category in pimcore.
**Product** Dataobject
-![product-dataobject](/Docs/images/product.png "Product DataObject")
+![product-dataobject](Docs/images/product.png "Product DataObject")
where `sku` is the unique identifier to identify the `product` objects.
**Category** Dataobject
-![product-dataobject](/Docs/images/category.png "Category DataObject")
+![product-dataobject](Docs/images/category.png "Category DataObject")
and the Edit form for Category Objects
-![DataObject Edit Form](/Docs/images/form.png "Dataobject Edit Form")
+![DataObject Edit Form](Docs/images/form.png "Dataobject Edit Form")
-![CSV Upload](/Docs/images/upload-modal.png "CSV Upload")
+![CSV Upload](Docs/images/upload-modal.png "CSV Upload")
-So, In our case. the [sample csv](/Docs/csv/bulk-upload.csv "Sample CSV") be would be like the below :
+So, In our case. the [sample csv](Docs/csv/bulk-upload.csv "Sample CSV") be would be like the below :
```
sku
diff --git a/Resources/public/img/csv-import.svg b/Resources/public/img/csv-import.svg
deleted file mode 100755
index 81ab806..0000000
--- a/Resources/public/img/csv-import.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Resources/public/img/upload.svg b/Resources/public/img/upload.svg
new file mode 100644
index 0000000..d9dda50
--- /dev/null
+++ b/Resources/public/img/upload.svg
@@ -0,0 +1,7 @@
+
+
+
diff --git a/Resources/public/js/pimcore/helpers.js b/Resources/public/js/pimcore/helpers.js
index e63458f..8e9b460 100644
--- a/Resources/public/js/pimcore/helpers.js
+++ b/Resources/public/js/pimcore/helpers.js
@@ -24,80 +24,55 @@ pimcore.objectsWithCsv.helpers.listify = function (data, textTobeAttached = null
return response
};
-pimcore.objectsWithCsv.helpers.showPrettyMessage = function (type, title, text, errorText, stack, code) {
+pimcore.objectsWithCsv.helpers.showPrettyMessage = function (type, title, text, errorText, detailText) {
// types: info,error,success
- if (errorText != null && errorText != undefined) {
- if (t(errorText) != "~" + errorText + "~") {
- errorText = t(errorText);
- }
-
- text = text + '
' + + detailText + + ""; } - if (code) { - title = title + " " + code; - } var errWin = new Ext.Window({ modal: true, - iconCls: 'pimcore_icon_' + type, + iconCls: "pimcore_icon_" + type, title: title, - width: 600, - - layout: 'vbox', - items: [ - { - xtype: 'panel', - html: text, - width: '100%' - }, - detailedInfo - ], + width: 700, + maxHeight: 500, + html: text + '