| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Image Path MOD for 4.1.x | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
Now it adds the images but it puts them right back in the images/T folder, and it looks like it will only adds the thumbnail and then create the product image form that and give it a name adding 01 to it or something to that affect Even after I delete this folder it will create it again.
__________________
Shareen sparker2@cox.net http://www.stitches4u.com X-Cart Version 4.5.0 with Smart Template vs 4.4.x |
|||||||
#22
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
Code does not work with my version looks like ):
__________________
Shareen sparker2@cox.net http://www.stitches4u.com X-Cart Version 4.5.0 with Smart Template vs 4.4.x |
|||||||
#23
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
I plan to upgrade to 4.1.10 sometime in the next week. I'll post back if there are any changes to the code. Since 4.1.10 is mostly bug fixes, I expect this same code should work just fine.
Double-Check that you did both Step 1 and Step 2 in Post #1. Remember... this mod is for adding images to New Products or you can Modify Existing products via the Admin interface, but you need to make sure you are adding the images, directly from your files/image(s) folders on your server (not your local drive). If you don't have a product image, X-Cart will default and use the thumbnail on the detailed product page, the same as it did in X-Cart 4.0.x and previous versions. If you want a separate product image, you can add that on the individual Add Product and Modify Product pages. Also, this mod supports the X-Cart Detailed Images Module. Robert
__________________
X-cart 4.1.10 |
|||||||
#24
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
Robert i got this to work but when I look at the Table in the database: xcart_images_P and Table: xcart_images_T it shows the image path as ./images/P/anml-buy-all_org.jpg and ./images/T/anml-buy-all_org.jpg instead of just ./files/images/anml-buy-all_org.jpg
Just thought i would give you an update on my progress
__________________
Shareen sparker2@cox.net http://www.stitches4u.com X-Cart Version 4.5.0 with Smart Template vs 4.4.x |
|||||||
#25
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
Hi Shareen,
Thanks for the update, here's a couple more things to check... 1. Make sure that you have your Admin --> Images Location set to use the FileSystem for storing images and not the Database. 2. When you look at the Database xcart_images_T, etc. folders, and you still see the image path pointing to the /images/T etc. folders... maybe this is just for your existing images. In other words, this Mod only puts new product images you add or modify into the files/images/sub-folders. You can check if a new product image you added is in the correct location, by Browsing the xcart_images_T folder and click the >> (arrows) to jump to the end of the table where the newest product images have been added. Look at those image_paths. If they are correct, the mod is working fine for you, but you will then need to update all your existing image file paths either by manually editing them or via an automated script. Robert
__________________
X-cart 4.1.10 |
|||||||
#26
|
|||||||
|
|||||||
Re: Image Path MOD for 4.1.x
Image Path MOD for 4.1.10 with Security Fix from July 2, 2008
First, backup of your store files and DB. Also work on copies of the 2 files that are being modified, so you can change back quickly, if need be. Next, make sure your Images Location is set to use the File System (FS). MOD 01 File: include/func/func.backoffice.php (Line 49) - NOTE: This MOD now incorporates the 4.1.10 Security Fix Code NOTE: The proper image file path (the part before the /files/ directory) can be found on the Summary page of your X-Cart back-end. Look under the Component column for your X-Cart directory, and enter the value you see in the Status column. CODE Was: Code:
CODE Now: Code:
MOD 02: File: include/func/func.image.php (Line 502) NOTE: This section of code has remained the same from 4.1.9 to 4.1.10 Part of: function func_prepare_image($file_upload_data, $type = 'T', $id = 0) { # Prepare posted image for saving CODE Was: Code:
NOTE: All the code in MOD 2 below is commented out except for the final closing bracket, and this line: $prepared['image_path'] = $file_path; CODE Now: Code:
Robert
__________________
X-cart 4.1.10 |
|||||||
|
|||
X-Cart forums © 2001-2020
|