Custom Extended MarketPress product import from CSV

New version of MarketPress Extended Importer now as beta 1.1!

Try it on test server, and tell me how it works :slight_smile:

You can find it here.

yf
Espen

  • Arun Basil Lal
    • New Recruit

    Hey Espen,

    I was testing it out, but the use instructions are not very clear. Here is what I did.

    - Installed it as a plugin and activated it.
    - copy you images to wp-content/uploads/product/import

    What else should I do? And where do I see the Importer menu? Is it at the same place as Store Settings > Importers Tab ?

    Let me know. and Thanks for your hard work :slight_smile:

  • espsjurs
    • The Incredible Code Injector

    Hi Arun,

    The missing doc says:
    - set up the utility in Settings > ESWD Utilitiy Settings

    There you have to check the 'MP Extended Import' and save the settings. Then the missing settings pops up.

    Now the import can be run in Store Settings > Importers Tab

    Espen

  • shawng
    • Site Builder, Child of Zeus

    My first attempt at this.

    When I click upload I get the error:
    Invalid file format. Please upload your import file ending in ".csv".

    A CSV import file was detected with 4 products to process. Re-upload

    Please be patient while products are being imported. Ready?

    Click import now: I get:
    Invalid file format. Please upload your import file ending in ".csv". again

    No products are being imported. Not sure what is going wrong.

  • espsjurs
    • The Incredible Code Injector

    Hi shawng,

    There seems to be some problems with the inclusion of import functions from external sources. I will work on them later today :slight_smile:

    But for now, so you can get progress in your testing, you can use an alternative method. I have now updated my plugin with version 1.2b:

    = 1.2 Beta =
    - small temperary workaround to fix problems with including import functions from external sources
    - included an extended marketpress-importers.php to replace the original. This includes my extended import. My own external is in this version disabled, except the parameters! You can find it in the folder 'extra', and replace the original with this one (you can find it in the markepress pluginfolder 'marketpress-includes'.

    Use the link from my first post to get the update..

  • espsjurs
    • The Incredible Code Injector

    New version, 1.3 Beta!

    The main change is the new csv file format. Now all variants has its own line in the file, and you can add as many as you want :slight_smile:

    From the readme.txt:

    == Description ==
    This one is made for a client and replaces the marketpress-importers.php file in the marketpress plugin-folder.

    Features:
    * variants (se csv samplefile for howto)
    * featured image
    * product gallery (two images)
    * missing image dummy
    * stock invatory on variant
    * sales-price
    * price
    * custom fields (CustomPress) **removed temporary in this beta**

    == Installation ==
    Upload as plugin and activate, do settings in ‘Settings >> ESWD Utility’.
    NB! For use of the MP Extended importer, please copy the extended ‘marketpress-importers.php’ from the folder ‘extra’ to markepress pluginfolder ‘marketpress-includes’.
    NB! Still no cleanup on uninstall!

    == Changelog ==
    = 1.3 Beta =
    - CSV file is now semicolon separated, and you can use either period or comma as decimal separator.
    - Removed variant settings. Now variants has its own line in csv, and can be as many as you want. Se the new csv samplefile.
    - Rebuilt import function to be more flexible
    - Still problems with import functions from external sources

    Downloadlink still at the top post :slight_smile:

    yf
    Espen

  • espsjurs
    • The Incredible Code Injector

    Thanks Arun,

    I am now working on the image import, and have some ideas on how to avoid the timeout...

    First I create a 'insert_image.php' file with one function for inserting the picture returning a result image (ok.jpg or fail.jpg) using 'imagecreatefromjpeg'.
    - If I call this file as it was an image it will generate the image on the fly :slight_smile:

    Then I read the csv line by line, creating the products and output a table showing all product inserted - with a picture generated from the 'insert_image.php' function.

    This way the result page will be returned fast, while the image import still running in multiple treads. The 'ok.jpg' og 'fail.jpg' will pop up in the table one by one.. or I can return a small thumb of the actual product image imported..

    The result page could be something like this:

  • espsjurs
    • The Incredible Code Injector

    Hello again,

    There is now time for a little 'teaser' for this extended import function. Here you will find screenshots and a little video for the import progress..

    I hope to release a new beta by the end of next week :slight_smile:

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hei again,

    I have now uploaded a new version 1.5 Beta of my plugin :slight_smile:

    Download from the link in the first post..

    Features:
    * variants (se csv samplefile for howto)
    * featured image
    * product gallery (ten images)
    * missing image dummy
    * stock invatory on variant
    * sales-price
    * price
    * custom fields (CustomPress)

    == Installation ==
    Upload as plugin and activate, do settings in 'Settings >> ESWD Utility Settings'.
    NB! For use of the MP Extended importer, please copy the extended 'marketpress-importers.php' from the folder 'extra' to markepress pluginfolder 'marketpress-includes'.

    == Changelog ==
    = 1.5 Beta =
    - Settings is now deleted if the plugin is deleted
    - New settings for product image import
    - New settings for custom fields

    Please test and report any issues :slight_smile:

    yf
    Espen

  • espsjurs
    • The Incredible Code Injector

    Hello there,

    My download has after the last update been hit 5 times!!, and none of them has reported any errors!!

    Why?? Is the plugin flawless?? Is this the best plugin ever??!!

    If so - please give me some rep's, if not - or anyway - please post some kind of comments :slight_smile:

    Espen

  • Timothy
    • Chief Pigeon

    I wouldn't take it personally, you know sometimes on here I can spend 2 minutes helping someone and they are the most grateful in the world.

    Then there are others where I spend an hour or two and don't even get a thank you.

    It's just the way people are.

    Thanks.

  • twix0815
    • WPMU DEV Initiate

    Hey Espen :slight_smile:

    here I am :slight_smile: And I ask you to open the DL please :grinning:slight_smile:

    Sorry about my bad english, I don't understand everything...

    One question: Is the Imagegallery for variations of a product?
    If it is - is it possible to use it just for imports or could i add a variation imgage by the "normal way" with this plugin?

    thx for helping :slight_smile:

    Greetz Markus

  • espsjurs
    • The Incredible Code Injector

    Hi Markus,

    The images are added to the posts/items gallery, but is not able to link to the variations. So ith images can be of variations, but all of them will be connected to the main item.

    Not sure what you asking for next, but this plugin is ONLY import - and as far as I know there is no way to add any variation images "normal way" as all images will be connected to the main item not the var.

    And YES, I will open for download if you promise to let me know when you have downloaded so I can close again AND to comment your experience into this forum here :slight_smile:

    The download is no open :slight_smile:

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hi there,

    Beta 1.6 is now out, now with url image upload in csv!

    Features:
    * variants (se csv samplefile for howto)
    * featured image
    * product gallery (1 to 10 images)
    * missing image dummy
    * stock invatory on variant
    * sales-price
    * price
    * custom fields (CustomPress)
    * url image upload
    * ftp image upload

    == Changelog ==
    = 1.6 Beta =
    - Check if CustomPress is active
    - Check if there exist custom field in CustomPress for products
    - New settings for product image import method (ftp or url)
    - Rewritten load_image.php to handle ftp and url upload
    - New options for csv file used with url upload; IMAGEnn (00-10), PATHnn (00-10)

    Downolad link at first post.

    And again; please comment on your testresults! The only way this plugin can go from a beta to a final release is if someone other then I say it works..

    And; if you find this helpfull - rep me!

    Yf Espen

  • Miss B Hayving
    • The Incredible Code Injector

    Hi there

    I've just downloaded the latest version and have tried to activate the plugin and I get:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_FUNCTION in /home/webdesig/public_html/wp-content/plugins/eswd_utility/eswd_utility.php on line 163

    I'm quite happy to give you login details to the site via PM if you like.

  • espsjurs
    • The Incredible Code Injector

    Hi Sprenzy,

    I am not sure whats wrong as I have no error. Could you try to disable line 163 to see if this solve the problem?

    //$custom_fields = array_filter($custom_fields, function($elem) use($filterKeys){ return $elem['object_type']['0'] == $filterKeys;});

    Or, if this is a testserver - give me login details to my mail two post up?

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hi @Sprenzy,

    I have now commented out the 163 line from the plugin file, and now the plugin activate as it should.

    There might be some problems using the array_filter function.. I will look into this..

    But for now, you can continue testing :slight_smile:

    Espen

  • Nathan Onn
    • Design Lord, Child of Thor

    @espsjurs

    I noticed that you're using anonymous function in line 163 and anonymous function only available in PHP 5.3 (and above).

    function($elem) use($filterKeys)

    Unfortunately, some of the hosting companies still use the older version of PHP (v5.2 and below), which is why @Sprenzy and @Miss B Hayving get the 'unexpected T_FUNCTION' error.

  • espsjurs
    • The Incredible Code Injector

    Hi there world,

    Rememer this:

    == Installation ==
    Upload as plugin and activate, do settings in ‘Settings >> ESWD Utility Settings’.
    NB! For use of the MP Extended importer, please copy the extended ‘marketpress-importers.php’ from the folder ‘extra’ to markepress pluginfolder ‘marketpress-includes’. Overwrite existing file.

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hi again,

    New version of the MarketPress Extended Import is out.

    == Changelog ==
    = 1.7 Beta =
    - Added option in settings for 'Publish products'. If not set they are imported as drafts.
    - Added option in settins for 'Import only product with price'. If set products without price will be skipped.
    - Removed array_filter function due to php version compatibility

    Download from link at first post :slight_smile:

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hi there,

    I am now planning to drop this project..

    There is now gone 6 months without comments on this post, so I guess there is no need for this kind of functionality.

    This plugin has been downloaded more than 70 times in this period, but still no comments or reps :slight_frown:

    I have not checked the core functionality in the latest versions of MP, so there might been done something with the standard to fill all functionality needed.

    The download is now closed!

    If I am wrong, please tell me!

    Espen

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.