Post by maki » Fri Sep 10, 2021 7:27 am

Good day, I am wondering if there is a developer who would be interested in developing a very specific extension for Stock Photography related stores. This can be either a one off project for me in exchange for payment or a module to be listed in the marketplace. There currently isn't a module that does this and I have searched all over.

The premise is to either automate complete product addition based on uploaded JPEGS and the data they contain OR the much easier implementation is to have it semi automated:

1) User uploads images in JPEG with EXIF and IPTC data, 2) User links the JPEG as a download 3) your script checks the file for the following and inputs it in as a Product Attribute to preset fields.

For example:
EXIF Copyright > Product Attribute Field named "Photographer"
EXIF Dimensions: Width and Height > Product Attributes named Width & Height

Even more complex would be using the PHP IPTC parser to pull keywords and titles and to populate the fields in the Product title and keyword fields.

I would need this for 3.0.3.7 but I am sure it could be useful for all supported versions.

Newbie

Posts

Joined
Fri Sep 10, 2021 7:13 am

Post by straightlight » Fri Sep 10, 2021 10:14 pm

Use a Google extension script to do this. Streamline data is kind of deprecated these days from PHP so better to use one from JS or jQuery.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by maki » Fri Sep 10, 2021 10:46 pm

Thought about it after you mentioned it but it would be either a whole lot more work for the user or the developer. I tried a few of the existing EXIF tools on Chrome just now and no go in my opinion, but I am not versed in extension development so please point me in the right direction if you think it's truly a better option.

The way I see it:

PHP has the necessary functions even in the newst version so as to pull the EXIF "exif_read_data" and IPTC "iptcparse" straight from a JPEG.

Using the broswer extension would require the file to be loaded into the broswer for reading which does not happen with any of the download extensions not even the built in one meaning that would have to be created from scratch.

I am using this extension for download management https://www.opencart.com/index.php?rout ... on_id=4968 It has a batch add function that just looks to a folder and adds all files in it. The EXIF reading and attribute writing step would be next in the process preferably PHP reading the download folder in the backend and applying new products like a bulk Import/Export extension would do from a CVS only in this case its all PHP/MYSQL in the back end. What the developer would need to to do to make it function for the front end is beyond my understanding or scope, but I presume it would be JS/Jquery or similar.

Newbie

Posts

Joined
Fri Sep 10, 2021 7:13 am

Post by straightlight » Sat Sep 11, 2021 2:47 am

maki wrote:
Fri Sep 10, 2021 10:46 pm
Thought about it after you mentioned it but it would be either a whole lot more work for the user or the developer. I tried a few of the existing EXIF tools on Chrome just now and no go in my opinion, but I am not versed in extension development so please point me in the right direction if you think it's truly a better option.

The way I see it:

PHP has the necessary functions even in the newst version so as to pull the EXIF "exif_read_data" and IPTC "iptcparse" straight from a JPEG.

Using the broswer extension would require the file to be loaded into the broswer for reading which does not happen with any of the download extensions not even the built in one meaning that would have to be created from scratch.

I am using this extension for download management https://www.opencart.com/index.php?rout ... on_id=4968 It has a batch add function that just looks to a folder and adds all files in it. The EXIF reading and attribute writing step would be next in the process preferably PHP reading the download folder in the backend and applying new products like a bulk Import/Export extension would do from a CVS only in this case its all PHP/MYSQL in the back end. What the developer would need to to do to make it function for the front end is beyond my understanding or scope, but I presume it would be JS/Jquery or similar.
Had the necessary functions. APP0 is the only key pulled from the data nowadays. What you are referring about is the APP13 index from the returned array from the exif_read_data where back in the days it used to be quite useful.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by maki » Sat Sep 11, 2021 6:35 am

I just checked again and the only way it can be done in terms of a step by step solution that works by using the existing download extension is with PHP.

"iptcparse" still has access to APP13, I just checked that as well as it spits out a nice array of keywords exactly when called using APP13 and field "2#025" which is the key for keywords in the APP13 section. 25 is the key for JS to pull the same field so I know it can do it just not without preloading the file.
https://www.php.net/manual/en/function.iptcparse.php

So if someone was to build this they would need to eiher reinvent the wheel to have a download extension that preloads the download (sometimes 50MB/file) or just use PHP and pass that to MYSQL where something like AJAX can then pull from MYSQL and populate the fields on the front end.

By the way APP13 Only works if you write the file using Adobe Photoshop or Lightroom, if an Adobe product or something capable of imitating it hasn't written to APP 13 it will always return an error.

Newbie

Posts

Joined
Fri Sep 10, 2021 7:13 am

Post by straightlight » Sat Sep 11, 2021 6:13 pm

maki wrote:
Sat Sep 11, 2021 6:35 am
I just checked again and the only way it can be done in terms of a step by step solution that works by using the existing download extension is with PHP.

"iptcparse" still has access to APP13, I just checked that as well as it spits out a nice array of keywords exactly when called using APP13 and field "2#025" which is the key for keywords in the APP13 section. 25 is the key for JS to pull the same field so I know it can do it just not without preloading the file.
https://www.php.net/manual/en/function.iptcparse.php

So if someone was to build this they would need to eiher reinvent the wheel to have a download extension that preloads the download (sometimes 50MB/file) or just use PHP and pass that to MYSQL where something like AJAX can then pull from MYSQL and populate the fields on the front end.

By the way APP13 Only works if you write the file using Adobe Photoshop or Lightroom, if an Adobe product or something capable of imitating it hasn't written to APP 13 it will always return an error.
It won't return an error, it will return the default APP key of APP0. However, I do have the PHP codes written for APP13 with the "2#025" already. You'd need to make modifications to your admin/model/tool/image.php and catalog/model/tool/image.php files to accomplish this. If you're not sure on how to achieve this, you could always create a new service request in the Commercial Support section of the forum by contact me directly via the forum PM to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 13 guests