Page 1 of 2

[UPDATED] Export/Import module for Opencart 1.2.6

Posted: Thu Apr 09, 2009 8:01 pm
by JNeuhoff
The Export/Import module has been updated for Opencart 1.2.6.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Thu Apr 09, 2009 10:06 pm
by phpuk
Hi,

This extension should be part of the core really as it is so useful.

It can also be used for limited stock control at a glance functions etc...

Phil.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Fri Apr 10, 2009 1:33 am
by Daniel
I'll check over the code. If it works well i'll include it.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Fri Apr 10, 2009 5:43 am
by phpuk
Hi,

Just discovered a small issue with this...

Steps to replicate fault.
1. Export a spreadsheet.
2. Make changes to prices
3. Import updated spreadsheet

Prices etc... are not displaying the updated prices.
Open one product in admin and click save.
All product prices are then updated on store front.

I believe it a cache issue and the following line needs to be added to the import function somewhere.
$this->cache->delete('product');
This may also apply to categories etc... as well but have not had time to test.

This also doesn't support the current standard OpenCart ver 1.2.6 implementation of special prices.

Phil.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Fri Apr 10, 2009 7:20 pm
by JNeuhoff
Prices etc... are not displaying the updated prices.
If it is a cache issue, try to check the database using PHPMyAdmin to see whether the prices actually got updated or not. If yes, then it is indeed a cache problem.
This also doesn't support the current standard OpenCart ver 1.2.6 implementation of special prices.
You are right, I am planning to add support for the 2 new DB tables
  • product_related
    product_special
during the next few days. I am also planning to add support for Qphoria's Option Weight Factor module (To Qphoria: Where can I find your module?)

It already has support for the category description module.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Fri Apr 10, 2009 7:43 pm
by phpuk
Hi JNeuhoff,

Sorry I should have mentioned that the prices are indeed updated in the tables but are not reflected on the store front.

When you wish to make the prices available on the store front by entering Admin and updating a product you do not have to change any values just select any product and click on save. All of the changed items are then available on the store front.

Phil.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sat Apr 11, 2009 1:38 am
by JNeuhoff
I have now fixed the cache issue. Try the latest release.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sat Apr 11, 2009 4:36 am
by phpuk
Hi JNeuhoff,

Thank you.

I all appears to be working now.

I really think this is a must to be included in the core now as it is a very beneficial tool.

it is easy to use and updates can be achieved in a very short space of time.

Phil.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Wed Apr 15, 2009 2:32 am
by Geek
Greetings OC Community,

I have a small problem that I believe is a bug with the Export/Import module. I hope I can get some feedback and help with it.

I have some additional images that I am trying to add with the Export/Import module and every time I add the images into the excel spreadsheet, the additional images don't get added to the product. When I add the additional images manually and then export the spreadsheet, the images are there. But, when I delete the image and then upload the same unmodified spreadsheet that I just exported, it doesn't add the additional images.

Any ideas?

Geek

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Wed Apr 15, 2009 4:44 pm
by JNeuhoff
The Export/Import module only deals with image names, listed in the spreadsheet. You still have to separately upload your images to the server via e.g. FTP or the Opencart admin panel.

So the first thing to check out is this:

After you have added image names to your spreadsheet and then done an Import, have all the image names made it correctly into the database, to the tables product and product_image?

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Thu Apr 16, 2009 2:34 am
by Geek
All my images where upload prior to the import of the spreadsheet.

After the import, only the image column in the product table was added to. The image information was never added to the product_image table at all.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Thu Apr 16, 2009 5:54 pm
by JNeuhoff
After the import, only the image column in the product table was added to. The image information was never added to the product_image table at all.
That is indeed a software bug. I have now fixed it, try the latest release of the Export/Import module. Thanks for reporting it.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sat Apr 25, 2009 7:14 am
by jnixus
I had an interesting issue when I took this module for a spin.

Is php-pear listed as a requirement when installing opencart initially? Not sure but perhaps worth mentioning in the installation document that php-pear is required.

If like me you haven't installed it as you try keeping linux builds to a minimum you will end up with a blank page when trying to export the .xls

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sat Apr 25, 2009 9:33 pm
by JNeuhoff
If like me you haven't installed it as you try keeping linux builds to a minimum you will end up with a blank page when trying to export the .xls
Actually, it will come with an error message about the missing PEAR libraries. I agree though that the documentation should list PEAR as a requirement for this module. I am currently running tests with a newer package from PHPExcel which writes and reads to or from Excel spreadsheets using the newer .xlsx format. PHPExcel has it all bundled in one big package and won't require PHP PEAR any more.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sun Apr 26, 2009 11:23 pm
by jnixus
Ah, sounds good. Perhaps also worth mentioning this on the next release of OpenCart. as a notice I.e. "If you want to use the import/export module you need php-pear or phpExcel" which ever applicable at next release?

Btw, fantastic job on the module. Works a charm.

I have a test enviroment consisting of 1 x EeePC with Via 900Mhz Celeron running Mandriva 2009 GNOME and 2GB RAM. Populated 1970 products in 8 seconds.

I am running mysql and apache2 on the EeePC itselt and as the spreadsheet grows when using OpenOffice it becomes a bit of an itch as it is soo slow but the module is great. Well done.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Tue Apr 28, 2009 4:17 am
by JNeuhoff
I have a test enviroment consisting of 1 x EeePC with Via 900Mhz Celeron running Mandriva 2009 GNOME and 2GB RAM. Populated 1970 products in 8 seconds.
That's quite impressive. I considered buying an Asus EEE 1000HE but couldn't find it anywhere in the UK, certainly not with a pre-installed Linux. So ended up buying a cheap desktop instead after my old PC died.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sun May 03, 2009 1:05 am
by reefnut
Was hoping someone could explain an error to me. When uploading extra pics I can do several then I get this error:

Error: Duplicate entry '49' for key 1
Error No: 1062
INSERT INTO `product_image` (`product_image_id`, product_id, `image`) VALUES (49,40,'199_971_660_971cat.jpg');

If I delete that image it simply goes to the next image and the same error occures however the first 36 product extra images on the spreadsheet are fine it just won't go any further. I even tried uploading them through the admin then downloading the spreadsheet then tried uploading it and at the same point error pops up again.

Thank You for any help.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sun May 03, 2009 1:20 am
by jnixus
that message looks like you have given all images the same product_image_id this needs to be unique for each of the images you want to add.

at least the message you receive looks like what you are doing tries to write a key into the database which already exists.

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sun May 03, 2009 2:05 am
by reefnut
Could you please tell me how to give each image it's own id?

Re: [UPDATED] Export/Import module for Opencart 1.2.6

Posted: Sun May 03, 2009 3:54 am
by reefnut
jnixus,

Thank You for your reply after reading I checked my data base and apparently although I deleted the preloaded content it was not erased from the data base so I manually deleted it and now all is fine. You were absolutely correct those images that were not erased had the same id's as the ones i needed.

Again Thank You!