Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Image Path MOD for 4.1.x

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 05-27-2008, 12:35 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default 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
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #12  
Old 05-27-2008, 12:36 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: Image Path MOD for 4.1.x

Can someone please lend a hand on these two errors above? Thanks in advance
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #13  
Old 05-27-2008, 01:52 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default 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.
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #14  
Old 05-27-2008, 01:55 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #15  
Old 05-27-2008, 01:57 PM
 
robertswww robertswww is offline
 

X-Adept
  
Join Date: Jul 2003
Posts: 586
 

Default 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
__________________
X-cart 4.1.10
Reply With Quote
  #16  
Old 05-27-2008, 02:01 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: Image Path MOD for 4.1.x

I copied it just the way you have it in here. What should I do?
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #17  
Old 05-27-2008, 02:16 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default 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 {
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #18  
Old 05-27-2008, 02:17 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default 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
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #19  
Old 05-27-2008, 02:22 PM
 
robertswww robertswww is offline
 

X-Adept
  
Join Date: Jul 2003
Posts: 586
 

Default 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
__________________
X-cart 4.1.10
Reply With Quote
  #20  
Old 05-27-2008, 02:27 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default 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?
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:26 AM.

   

 
X-Cart forums © 2001-2020