| Project: | Ubercart Contributions |
| Component: | Code |
| Category: | |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Hi,
This is for version alpha-7c.
To get the images to import correctly using an XML file generated using the export feature I had to make a couple changes to the uc_importer.module.
There were two issues
1) if $local_path is meant to be an absolute path to the image file then it should not be stored in the database. A relative path such as $image_path supplied from the XML file should be.
2) I believe file_directory_path() and file_create_path() are supposed to return an absolute path such as 'c:/wamp/www/drupal-5.2/files'. Both functions return 'files' on my system. I do not know why those functions are returning incorrect data. It could be windows and my freshly downloaded wamp stack. I added another check to make sure $local_path is in fact an absolute path.
I've also got some code which updates the files table so new images and new products with new images can be added. I'll make a patch for that as well once I test it a bit.
-C
| Preview | Attachment | Size |
|---|---|---|
| uc_importer_local_image_path.zip | 680 bytes |

