anyone have any idea how to setup cs-cart to work with a CDN …
any tips ?
Sorry, what is a CDN???
[quote name=‘Triplex’]Sorry, what is a CDN???[/QUOTE]
Content delivery network
[url]http://en.wikipedia.org/wiki/Content_delivery_network[/url]
Basicly ,
I have another server that caches my images …
I would like to know what i would have to change in the cs-cart code
to pull the images for the cart side from another server
when displaying in the browser …
the admin side i still want to function the same and pull and save to my local server.
teksigns, did you ever figure out how to get CS-Cart to play nice with a CDN and what was involved to get it to work?
I’m looking into a CDN solution, but am clueless as to what would be involved or need modifying, if anything.
I’d like to see CS-Cart work with a CDN to deliver our digital downloads. We have around 300 GB of data on our server currently.
Right, I’ve been looking into this on both V1.35 and v2.1
- CDN of images
the config file can be modified to edit where “images” are stored
I’m working on creating sub domain
images.domain.com that points to the folder www.domain.com/images
I’m trying to change the config file to read the subdomain instead of the folder
The next step should be to change http/https
so that https reads files locally (the padlock will be broken otherwise)
line 193 config.php is where these changes are made
// Directory for store images on file system
$config[‘images_path’] = $config[‘current_path’] . ‘/images/’;
$config[‘http_images_path’] = $config[‘http_path’] . ‘/images/’;
$config[‘thumbnails_path’] = $config[‘images_path’] . ‘thumbnails/’;
- CDN of skins
line 43 config.php
define(‘DIR_SKINS’, DIR_ROOT . ‘/skins/’);
needs a
skins.domain.com that points to www.domain.com/skins
but again this needs if https / http
as again https should be served locally (www.domain.com)
- CSS Sprites
The next step is to css sprite the website
this will reduce all the small jpg / gif loads (about 43 on a basic skin)
css sprites explained here
[url]http://css-tricks.com/css-sprites/[/url]
Any help appreciated in these improvements
has anyone come up with a solution for this yet ?
Hi,
I am also interested in CDN solution to move all static content.
Please share your comments and experiences here to help us.
Thanks.
Hello,
I agree with Teksigns, that would be very nice to have the ability to set up a CDN.
Lee Li Pop
I have been working on this as well. I was able to get thumbnails and images to load off the CDN, but then it tries to load all the skin images as well. Seems like I’m in over my head.
I’m thinking about getting a mod quote from CS-Cart. Is it possible to have multiple people pitch in for a mod?
i would be willing to pitch in for a mod.
Hello SleeK,
[quote name=‘SleeK’]I was able to get thumbnails and images to load off the CDN,[/QUOTE]
How ?
[quote name=‘SleeK’]but then it tries to load all the skin images as well. Seems like I’m in over my head.[/QUOTE]
Skin images URLs are in CSS files.
Lee Li Pop
change
define(‘DIR_IMAGES’, DIR_ROOT . ‘/images/’);
to
define(‘DIR_IMAGES’, ‘http://www.subdomain.domain.com/images/’);
and same for “skin”
will this work?
I tried this method and the images from the images directory were displayed properly but the thumbnail images did not display properly. I believe it was due to a script from and addon that does a request for the current path. I may have a miss configured path within my cs-cart config files and or my cloud and cdn settings.
ty for guidance in advance
~B.
[quote name=‘BluBT’ timestamp=‘1353989572’ post=‘149952’]
I tried this method and the images from the images directory were displayed properly but the thumbnail images did not display properly. I believe it was due to a script from and addon that does a request for the current path. I may have a miss configured path within my cs-cart config files and or my cloud and cdn settings.
ty for guidance in advance
~B.
[/quote]
This is because thumbnails are generated on the fly. The easiest way to make it work is to generate thumbnails explicitly - look at the cscart_images_links table in your database: the image_id (thumbnail id) column equals 0 almost for every row - thumbnails generated on the fly for such images.
I have detailed images in the images/detailed folder and have thumbnail images in the images/thumbnails folder.
I found that the Elks instructions above to the CS-Cart config work well with CS-Cart … this issue for me is an Add-on that is looking for the thumbnails on the www.domain.com …not the subdomain.domain.com
and i am not sure where in the Add-on to change the code so that it looks for the images in the subdomain.domain.com.
For my circumstances the issue is that the Add-on uses " get(‘config.current_path’)" <----that being www.domain.com not subdomain.com and im not sure what or how to change that in the Add-on without BREAKING it totally.
so…in this situation its not a CS-Cart issue.
ty for your reply Sitemaster …every bit helps!!!
~B.
you can modify image.tpl to pull images from cdn instead of default path.
Thank you very much. The add-on still wants to use the “current domain” being www.domain.com not subdomain.domain.com
So while adapting the image.tpl works the same as adapting the config files (both ways work well for directing to subdomains)…the add-on itself doesn't want to work with subdomain.domain.com without doing code changes to the add-on scripts. not surprised since the add-ons focus is the images …not domain paths …ugggh
ty again for your tip.
~B.
Anyone get it working with amazon s3?