Samar image processing details

 

A) Mapping other images to products with no images of their own.
- the jsi_config.php file has a new param IMAGE_MAP_FILE
for the pathname of the csv file that maps these images to products.
It is currently defined as "images/ImageMapFile.csv" (under the main Jargon_Samar folder). It can be changed as needed.
- when products are exported, the export script now reads this and for any items with a non-blank image mapped to them, uses that image filename as the IMGID value in the exported PRODUCT record (instead of looking for an image with the same name as the product number).

B) Changed and obsolete image files.
When an image file is changed, or if it becomes obsolete because the product is obsolete, put one line with each such image filename in a textfile named "ImageChanges.txt".

It must have this name but can be located anywhere on the server. Its folder is specified on line 11 of the export_image_changes.php script. Currently this is defined as:
'C:/Apache24/htdocs/Jargon_Samar/download_docs/'

When a set of image changes have been completed and the names of the changed files have been entered in this file, the final step is to run the batch script "export_image_changes.bat". This runs a similarly named php script that copies this file to each rep who has a subfolder under the "download_docs" folder. If a rep has not yet downloaded the previous image changes file, the new file will be appended to the old one. As with regular SQL file downloads, once this file is downloaded by a rep, it is moved to the "Done" subfolder under his download_docs folder.

When this file is downloaded, the sync.xml app will delete each image file listed in it. Then, after all the docs downloads are done, it will run an image download that will download new images for any product that specifies an image filename in PRODUCT.IMGID and for which that image file does not exist on the local device. Note that for an obsolete product image, there will not be any new image.

Article Details

Article ID:
255
Category:
Date added:
2015-12-01 00:17:26
Views:
4,832
Rating (Votes):
(477)