X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Image Path MOD for 4.1.x (https://forum.x-cart.com/showthread.php?t=39376)

sparker2 05-27-2008 12:35 PM

Re: Image Path MOD for 4.1.x
 
then i get this error

Parse error: syntax error, unexpected T_ELSE in /home/stitches/public_html/include/func/func.image.php on line 512

sparker2 05-27-2008 12:36 PM

Re: Image Path MOD for 4.1.x
 
Can someone please lend a hand on these two errors above? Thanks in advance

sparker2 05-27-2008 01:52 PM

Re: Image Path MOD for 4.1.x
 
Ok I got rid of all the errors I was having fixed but I may have messed up the code because now it will not add the images to the product page. When i go to choose my product image I select it like normal but then it does not add it to the product page.

JWait 05-27-2008 01:55 PM

Re: Image Path MOD for 4.1.x
 
OK... that explains things. I had to modify the image_path initially because of the tela-firma mod (it "saves" the full size image as the thumbnail -- not actually, but that is the way x-cart interprets it) Now all I have to do is assign thumbnails for every product.

robertswww 05-27-2008 01:57 PM

Re: Image Path MOD for 4.1.x
 
Shareen, those are Syntax errors... most likely you left off a semicolon at the end of a line of code, and/or forgot a closing bracket. Double-check your code.

Right-click on a product image to check your image properties and see the image file path.

Images need to be added via FTP off the server. Also check for proper permissions on your image(s) folders.

Robert

sparker2 05-27-2008 02:01 PM

Re: Image Path MOD for 4.1.x
 
I copied it just the way you have it in here. What should I do?

sparker2 05-27-2008 02:16 PM

Re: Image Path MOD for 4.1.x
 
Here is the code I put in and it is not working.

/*
if (!is_url($file_path) || $config_data['save_url'] == 'Y') {
$dest_file = func_image_dir($type);
if (!zerolen($prepared['filename'])) {
$dest_file .= "/".$prepared['filename'];
}
$prepared['image_path'] = func_store_image_fs($image_data, $type);
if (zerolen($prepared['image_path']))
return false;
$prepared['filename'] = basename($prepared['image_path']);
$path = func_relative_path($prepared['image_path'], $xcart_dir);
if ($path !== false) {
$prepared['image_path'] = $path;
}
} else {
*/
$prepared['image_path'] = $file_path;
}
}
else {

sparker2 05-27-2008 02:17 PM

Re: Image Path MOD for 4.1.x
 
Error I am getting at the moment is:

Parse error: syntax error, unexpected '}' in /home/stitches/public_html/include/func/func.image.php on line 534

robertswww 05-27-2008 02:22 PM

Re: Image Path MOD for 4.1.x
 
Quote:

Originally Posted by sparker2
Here is the code I put in and it is not working.

$prepared['image_path'] = $file_path;
}
}

Please look at the code carefully, or cut-and-paste... your code above has 2 closing brackets below the prepared image path line of code. As you will notice in Post #1, one of those 2 closing brackets is commented out (via the pound signs).

Remove one (or comment out), and that should fix your syntax error.

Robert

sparker2 05-27-2008 02:27 PM

Re: Image Path MOD for 4.1.x
 
is it ok for me to search for that whole code and delete it and then paste in the whole code that you put?


All times are GMT -8. The time now is 12:05 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.