Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How to setup cs-cart to work with CDN ? Rate Topic   - - - - -

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 29 November 2009 - 05:31 PM #1

anyone have any idea how to setup cs-cart to work with a CDN ....

any tips ?

 
  • Triplex
  • Senior Member
  • Members
  • Join Date: 12-Mar 08
  • 622 posts

Posted 29 November 2009 - 05:37 PM #2

Sorry, what is a CDN???

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 29 November 2009 - 05:45 PM #3

Sorry, what is a CDN???


Content delivery network

http://en.wikipedia....elivery_network

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 01 December 2009 - 02:07 AM #4

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.

 

Posted 21 April 2010 - 11:20 PM #5

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.

 
  • jmottle
  • Member
  • Members
  • Join Date: 14-Aug 09
  • 81 posts

Posted 22 April 2010 - 07:12 AM #6

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.

 
  • CartBooster
  • Senior Member
  • Members
  • Join Date: 25-Jun 06
  • 246 posts

Posted 12 May 2010 - 07:01 PM #7

Right, I've been looking into this on both V1.35 and v2.1


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/';



2) 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)



3) 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

http://css-tricks.com/css-sprites/


Any help appreciated in these improvements

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 05 August 2010 - 03:28 PM #8

has anyone come up with a solution for this yet ?

 
  • shelvi
  • Junior Member
  • Members
  • Join Date: 05-May 10
  • 21 posts

Posted 12 August 2010 - 08:48 AM #9

Hi,
I am also interested in CDN solution to move all static content.
Please share your comments and experiences here to help us.

Thanks.
cs-cart 2.0.14
shop online: www.Online-Indian-Shop.com

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 03 October 2010 - 04:43 AM #10

Hello,

I agree with Teksigns, that would be very nice to have the ability to set up a CDN.


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • SleeK
  • Junior Member
  • Members
  • Join Date: 03-Dec 07
  • 29 posts

Posted 22 October 2010 - 11:05 PM #11

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?

 
  • hovik
  • Junior Member
  • Members
  • Join Date: 30-Jun 09
  • 26 posts

Posted 27 October 2010 - 06:58 PM #12

i would be willing to pitch in for a mod.

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 31 October 2010 - 04:19 PM #13

Hello SleeK,

I was able to get thumbnails and images to load off the CDN,


How ?

but then it tries to load all the skin images as well. Seems like I'm in over my head.


Skin images URLs are in CSS files.


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • elk
  • Member
  • Members
  • Join Date: 28-Jan 11
  • 92 posts

Posted 02 May 2011 - 02:01 PM #14

change
define('DIR_IMAGES', DIR_ROOT . '/images/');

to
define('DIR_IMAGES', 'http://www.subdomain.domain.com/images/');

and same for "skin"

will this work?
Mylot.gr // Mobiles & Gadgets
CS-Cart 2.1.3 ver. working fine

 
  • BluBT
  • Advanced Member
  • Members
  • Join Date: 15-Oct 12
  • 93 posts

Posted 27 November 2012 - 04:12 AM #15

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.

 
  • Sitemaster
  • Junior Member
  • Members
  • Join Date: 03-Mar 11
  • 9 posts

Posted 27 November 2012 - 09:27 AM #16

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.


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.
Sitemasterly.com - CS-Cart Design Integration service / CS-Cart Development service / CS-Cart Upgrade service

 
  • BluBT
  • Advanced Member
  • Members
  • Join Date: 15-Oct 12
  • 93 posts

Posted 30 November 2012 - 08:38 PM #17

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.

 
  • mghazal
  • Junior Member
  • Members
  • Join Date: 16-Apr 11
  • 27 posts

Posted 01 December 2012 - 06:48 AM #18

you can modify image.tpl to pull images from cdn instead of default path.

 
  • BluBT
  • Advanced Member
  • Members
  • Join Date: 15-Oct 12
  • 93 posts

Posted 03 December 2012 - 06:38 PM #19

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.

 
  • sbooks
  • Junior Member
  • Members
  • Join Date: 24-Sep 10
  • 30 posts

Posted 06 December 2012 - 09:55 PM #20

Anyone get it working with amazon s3?