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

Anyone interested in funding a change the Image handling?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-11-2003, 06:10 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default Anyone interested in funding a change the Image handling?

I'm not sure how many of you have noticed. But even version 3.4.2 still hits the image.php file for all images displayed (3.4.1 change log is misleading!).

No images are being cached by the browsers so your servers are still being hit for every image on every page display in your stores raising both SQL hits and server hits and really slowing the sites down more than you realise.

I've proposed this to the x-cart team and I'm waiting for a cost, as it's an addition I want added to x-cart over all would anyone be willing to help pay a portion for getting it done? It would benefit us all.


Below was sent to x-cart
------------------------------------------------------
Dear sirs,

I've sent the below to the support arm of x-cart. Since it doesn't appear to have been really implemented the correct way I was wondering what it will cost to have it done properly as an addition to my own x-cart and ALSO included in the base x-cart system.

Please read below and provide me with a quote. I willing to pay to have this feature added to the overall x-cart system as it's actually becoming a sore point with me, I've taken a look at the image.php and it's still hitting the databases even in version 3.4.2 and still preventing the browser from caching the images for images that are in simply the file system.


What I would like done:
-------------------------------------------------------
I'd like the image handling changed in the next release version, the current method is still a waste of server resources, even for images in the system it is still hitting the image.php all the time (3.4.2 still does it).

The URL method currently implemented defeats the purpose of having the images uploaded and managed by x-cart.

Can some URL paths be added to the image config (just under the server path box) for example

$thumbURLpath="http://www.mysite.com/files/thumbs"
$detailURLpath="http://www.mysite.com/files/detail"
$categoryIconUrlPath="http://www.mysite.com/files/icons"

This could then be used by the product list templates and product detail templates display to genererate *REAL* paths to the image, not using image.php at all if the files are in the file system

<img src=$thumbpath.$imagefile>

Instead of the <img src=image.php?>

It would be a simple addition and speed up x-cart immensly, it would allow the browsers to cache the images properly and drastically cut down on SQL/Server hits which are still there for no reason.

I really don't understand why image.php still has to query the database for every image shown again when the product template can send it to the browser as a real path?

It would really benifit x-cart as a whole if the above could be done properly.


Please provide me with a quotation for the above and confirm whether or not this would become a part of the next x-cart releases. I am only interested in paying for it as long as it is reasonable cost and a guaranteed addition to all future releases.

-------------------------------------------


Let me know if you would be interested in helping out with this!

Thanks,

Groovico
Reply With Quote
  #2  
Old 06-11-2003, 06:58 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

I agree with you here.

I could do a mod for you that would call your images from the server without calling image.php but then this wouldnt end up in future releases.

Im sure it would be simple for them to do this for the next upgrade 3.4.3.

Im supprised that its doing this at all anyway.

There is no point that I can see of calling a php file to then call a file when you could just as you say use <img src=$thumbpath.$imagefile>

__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 06-11-2003, 01:37 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Quote:
Originally Posted by shan
I agree with you here.

I could do a mod for you that would call your images from the server without calling image.php but then this wouldnt end up in future releases.

Im sure it would be simple for them to do this for the next upgrade 3.4.3.

Im supprised that its doing this at all anyway.

There is no point that I can see of calling a php file to then call a file when you could just as you say use <img src=$thumbpath.$imagefile>


Yeah I could mod it too but I bought 10 licenses of x-cart and I intend on buying more I want it as part of the package that way they have to bug fix and support it in future versions.

You wonder who they allocate to do these modifications sometimes, x-cart has some wonderful features but some have been very questionably implemented at times.

Quite a few areas need looking at. But at the moment the images are actually a complete waste of bandwidth, server CPU time, Mysql hits and browser calls, all for no reason other than well sorry to say lazy, shortcut programming in that area.

I took a look at the code and just thought... they only have to add another 10-20 lines in a few files and adjust the templates slightly to optimize and speed it up it so much.
Reply With Quote
  #4  
Old 06-11-2003, 01:57 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

If anything it seems a more awkward way to do it the way it is done
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 06-11-2003, 02:27 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Quote:
Originally Posted by shan
If anything it seems a more awkward way to do it the way it is done

Not really, take a look at the image.php code, it looks like a really quick hack method of doing it to save on editing anything else on the system.

By doing it the way they did they didn't have to edit templates/add other configs etc etc.

They went to the effort of moving the images out of the database and left the critical part of displaying them to a quick hack of the image.php... go figure!
Reply With Quote
  #6  
Old 06-11-2003, 04:16 PM
 
Jim K. Jim K. is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: USA
Posts: 35
 

Default

I would be happy to contribute. I just upgraded to 3.4.2 because I thought the image handling problem was solved. I currently use another cart for my site, but I want to make the change soon. My site is full of images and I want it to load quickly. Let me know how to help get this change made so I can get my project going.

Jim
Reply With Quote
  #7  
Old 06-12-2003, 07:06 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Quote:
Originally Posted by Jim K.
I would be happy to contribute. I just upgraded to 3.4.2 because I thought the image handling problem was solved. I currently use another cart for my site, but I want to make the change soon. My site is full of images and I want it to load quickly. Let me know how to help get this change made so I can get my project going.

Jim


Hi Jim,

That's good to hear. I'm still waiting for them to get back to me with a costing.

If a few more people are be willing to chip in we can bring the share right down.

Thanks,

Groovico
Reply With Quote
  #8  
Old 06-14-2003, 06:02 AM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

There's another ineffeciency that's a bit harder to see.

One of our product images - http://shop.viosport.com/store/images/16140.jpg is 23K. Whenever someone loads a product listing with that image on there, x-cart would normally load the 23K image, then just give the IMG tag a width attribute of 70. That makes your thumbnails look horrible and is a waste of 21K as the thumbnail for that product, at 70 pixels wide (http://shop.viosport.com/store/images/thumbnails/16140.jpg) is only 2K.

I have some nice code that keeps images in the database as well as on the filesystem, so it's no major modification to x-cart's existing code. Our store pages have experienced significantly lower load times since I implemented this change.

I know why storing images in the db vs. on the filesystem would even need to be an option in future versions. The ONLY benefit I can see to storing them in the database is that some systems may have difficulties (due to permissions / shared hosting / disk quotas / etc) getting the images on the filesystem to work through the product modification pages.

Just my two cents.

--Kurt
Reply With Quote
  #9  
Old 06-19-2003, 10:32 AM
  RazorWriter's Avatar 
RazorWriter RazorWriter is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: Arizona, USA
Posts: 50
 

Default

I'm willing to contribute, although we shouldn't have to.

They ought to be required to put this in the next upgrade, since it's obvious this is the way the cart should have handled images from the beginning.

It seems the "free" upgrades are usuallycode somebody's already paid for to customize their cart, then shared with the community by x-cart. Not that I object to that, it's just that some things like this (and coding standards) are so basic and universally desired that X-cart should just get the point and work on it for the next release, without anyone having to pay extra for it. I know that efficiency/cleanup fixes like this weigh heavily in my decision to purchase more licenses for future projects! :P
Reply With Quote
  #10  
Old 06-25-2003, 06:52 PM
 
xico_lopez xico_lopez is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 4
 

Default

I'm willing to contribute too. I have several licenses running on the same server with a lot of images.

Just let me know $$$
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 03:46 PM.

   

 
X-Cart forums © 2001-2020