Zen Cart Logo
Forums / General Questions / Migrating a website from Prostores

Migrating a website from Prostores

Views: 942

Results 1 to 10 of 10
28 Jan 2015, 1:41 AM
#1
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Migrating a website from Prostores

Prostores is shutting down all their websites on Feb 1st. I'm in the process of migrating a client off of that platform and onto zencart. The one fly in the ointment seems to be the product images. Prostores loads the images to a directory that is not accessible and renames them in the process. An export of the product catalog does not contain a complete list of the images and none of what's listed reflects the location on the Prostores servers. I ran a program to scrap the images off the website but I have no wa to map it to the products. Does anybody have an idea about how to accomplish that?

28 Jan 2015, 4:14 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Migrating a website from Prostores

If you've scraped the pages from the old website, doesn't the scraper database contain references to which images belong to which pages (ie: to which products)?

28 Jan 2015, 1:44 PM
#3
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Migrating a website from Prostores

It did in fact provide a mapping of images to the page they were on. Prostores used a weird naming convention for their pages which I may be able to take advantage of. Part of the url was .../servlet/the-xxxx/ where xxxx was apparently the product number. This seems to be the only linkage between the product export and the scraped site. I used the xxxx as the model number in zencart. Now to figure out how to build a .csv file using only the first image (there are four for each product).

28 Jan 2015, 5:47 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Migrating a website from Prostores

badarac:

It did in fact provide a mapping of images to the page they were on. Prostores used a weird naming convention for their pages which I may be able to take advantage of. Part of the url was .../servlet/the-xxxx/ where xxxx was apparently the product number. This seems to be the only linkage between the product export and the scraped site. I used the xxxx as the model number in zencart. Now to figure out how to build a .csv file using only the first image (there are four for each product).

Not 100% sure of the status of each "site", but if the data is in ZC, then EP4 (EasyPopulate Ver 4) could be used to export the ZC information, which would include the model number in the record as well. The data could then be manipulated in the spreadsheet to possibly get the format you need to work with. Using Open Office, the file could be saved back to csv format and be "assembled" as desired.

If the desire is to then populate the ZC version of the site with the associated path, there is an image path provided in the export of product that could be updated with the "reassembled" path from above... That path would be to the main image with all other images (the other 3) following the ZC image naming process, then all four images would appear again upon upload of that full csv. (Generic instruction provided, not each and every detail of using EP4 and the fields that may be omitted/must remain.)

30 Jan 2015, 2:18 PM
#5
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Migrating a website from Prostores

mc12345678:

Not 100% sure of the status of each "site", but if the data is in ZC, then EP4 (EasyPopulate Ver 4) could be used to export the ZC information, which would include the model number in the record as well.

The site is still live at Prostores and the new Zencart site is being built on another server. I used the export function there to get their product catalog exported to a .csv file. I used EP4 to import the products into Zencart. Unfortunately Prostores does not export the actual image info in their product export or anywhere else. It included a partial record of the original image names. They store the images somewhere and rename them with a unique name for each file. I do have the location of the image files in the output of the site scrape. The scrape built the directory structure of the image files and stored the images with their name in each directory. There are four images for each product with unique names and no indiication which is the main image. The log contains a row for each page with the image file url and page url. The only thing that maps to the Prostores export is the page url which contains the sting the-xxxx where xxxx is the product number. I used their product number as the model on the import to Zencart.

So what I need to do is read the .csv file from the PS export and the .txt file from the scrape.
It needs to extract the product number from the scrape url https://www.mydomain.com/servlet/the-10143/a....
Then build a new .csv file that contains the model number and image file name of the first image to import into ZC.
Rename the additional images.

They have decided to manually input the images using image handler so this is now a learning exercise for me. How would you approach this?

30 Jan 2015, 2:42 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Migrating a website from Prostores

Are you trying to automate this (ie, do this type of transfer again and again) or do this sort of "one-time"?

I can think of a couple of quickk ways to do some of the matching up and data pulling using Open Office (or Excel) if wanting to just get this one done, or possibly Access or through some phpMyAdmin database manipulation/pattern matching. Kind of depends on what the current final goal is. Also the code to this other website is not something that is open source? Possible to put into a code IDE and search for various aspects to identify how it determines the "main" picture and othe subpictures, etc?

30 Jan 2015, 2:58 PM
#7
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Migrating a website from Prostores

This is a one time thing. Prostores is not open source so you get what they give you. My original thought was to import this into access as two tables and manipulate it that way. That doesn't do anything for renaming the additional image though. My thought was to just pick the first image in the list as the main one. My other thought was to build a couple DB tables in my local WAMP environment and use some php/sql code to do it.

30 Jan 2015, 3:17 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Migrating a website from Prostores

If you go that route, you could create a form that displays the four images, selection (by click) activates the one as the primary and deselects the others, do this page by page, and track in the database which was selected. Then on save, with that file being the primary, the others just get renamed following it's rule. Not sure the best utility to do the renaming otherwise (automatically) but, could code a filename rename using a from:to type table and a short php code to do the renaming one time if nothing else "easy" is located.

30 Jan 2015, 4:42 PM
#9
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Migrating a website from Prostores

Well this will be an interesting little project for another day. They have over 2000 products so I'm certainly not going to go through one by one. Thanks for the suggestions.

30 Jan 2015, 4:55 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Migrating a website from Prostores

badarac:

Well this will be an interesting little project for another day. They have over 2000 products so I'm certainly not going to go through one by one. Thanks for the suggestions.

Just kind of thinking of the phrase: pay me now or pay me later... May not be you to go through the 8000 images, but certainly at some point they will need to be "set right" if the first guess of the first image isn't the best... And then the images will need to be swapped around, etc... Possibly all 8000 of them... So trying to come up with a way to relatively do it right the first time and take some of the you time out of it... You've got your own things to keep doing for the site. Maybe hire someone to do the comparison and "clicking"... Time and labor intensive, but if someone has it...