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

MaxCDN Content Delivery Solution?

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #31  
Old 01-29-2011, 08:08 PM
 
kgoel kgoel is offline
 

Advanced Member
  
Join Date: May 2010
Posts: 82
 

Default Re: MaxCDN Content Delivery Solution?

Can anyone help us in setting the MaxCDN ? for caching the site images, product images, js and css files?
__________________
Version 4.3.2
Reply With Quote
  #32  
Old 02-03-2011, 10:51 AM
 
albertchui albertchui is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 163
 

Default Re: MaxCDN Content Delivery Solution?

HI, my site has over 150 thousands items and i have filters which was created by xcart, however the filter somehow is very slow and sometime crash with database of sql Error code : 1064. my question is will MaxCDN help my situation, thanks

albert
__________________
X-Cart Gold 4.6
Reply With Quote
  #33  
Old 02-05-2011, 02:42 PM
 
Stizerg Stizerg is offline
 

Senior Member
  
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 195
 

Default Re: MaxCDN Content Delivery Solution?

albertchui - MaxCDN can't help you with sql Error. Code 1064 means there is syntax error somewhere. Post your question here http://forum.x-cart.com/forumdisplay.php?f=13 , so SQL gurus can help you.
__________________
X-Cart Gold Plus 4.6.6
A lot of custom mods
Reply With Quote
  #34  
Old 03-21-2011, 09:05 PM
 
teriwinkle teriwinkle is offline
 

Advanced Member
  
Join Date: Aug 2003
Location: Los Angeles
Posts: 63
 

Default Re: MaxCDN Content Delivery Solution?

I started to use MaxCDN, but I noticed that detail images would no longer pop up while MaxCDN was activated (via smarty code), nothing would happen at all when you click the view detail images. So I put the original smarty.php code back and immediately can view detailed images.

Anyone know why MaxCDN would effect the detailed images popup function? Thanks
xcart 4.4.2

My code:

// WCM - MaxCDN Implementation
if ($_SERVER['HTTPS'] != 'on')
{
$smarty->assign("SkinDir","http://mydomaincdn-url/skin1");
$smarty->assign("ImagesDir","http://mydomaincdn-url/skin1/images");
}
else
{
$smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images');
$smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir);
}
__________________
Red Hat Linux/Apache
Reply With Quote
  #35  
Old 05-18-2011, 09:23 AM
 
koz koz is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 88
 

Default Re: MaxCDN Content Delivery Solution?

There are two threads about this going right now.. Ugh.

The code, I think, that has to be edited is the code for the AltSkin in smarty.php -- i just can't figure it out.
__________________
Version 4.4.3 & 4.2.2
FreeBSD
P4 3.2 4 gig ram 300 gig SATA
Reply With Quote
  #36  
Old 06-09-2011, 09:41 AM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: MaxCDN Content Delivery Solution?

I can't get MaxCDN to work. When I enable it, I get an all text website, no images. If I go into https://www.domain.com, it is all back to normal, so that tells me the code is bypassing https pages, which is good.

I tried this with and with out public_html in the path. Same results.

And of course, I changed "mydomain".

Quote:
// WCM - MaxCDN Implementation
if ($_SERVER['HTTPS'] != 'on')
{
$smarty->assign("SkinDir","http://maxcdn.mydomain.com/public_html/skin1");
$smarty->assign("ImagesDir","http://maxcdn.mydomain.com/public_html/skin1/images");
}
else
{
$smarty->assign("SkinDir",$xcart_web_dir."/skin1");
$smarty->assign("ImagesDir",$xcart_web_dir."/skin1/images");
}
// WCM - MaxCDN Implementation

Quote:
// WCM - CDN Images
if (($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on')
return str_replace('/home/public_html/skin1/images/','http://maxcdn.mydomain.com/',$image_path);
// / WCM - CDN Images

Quote:
maxcdn.mydomain.com 14400 IN CNAME xxxxxxxxxxxxpullzone.mydomain.netdna-cdn.com.

In my MaxCDN CP

Quote:
Custom Domains
  • maxcdn.mydomain.com
  • CNAME to
    xxxxxxxxxxxxpullzone
    .mydomain.netdna-cdn.com

Can anybody help?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #37  
Old 06-09-2011, 01:02 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: MaxCDN Content Delivery Solution?

Okay, I got it mostly working. I ended up having to use url xxxxxxxxxxxxpullzone.mydomain.netdna-cdn.com instead of the maxcdn.mydomain.com in smarty.php.

I still cannot get the images to show up. T, P or D. Some will show from a cat directory and C, but not the others.
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #38  
Old 06-09-2011, 01:56 PM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default Re: MaxCDN Content Delivery Solution?

This just in...

The reason I had to use the temp. URL was DNS has to do it's thing before the other URL will work.

Here is what I ended up with that finally brought my images up.

Code:
// WCM - CDN Images if (($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on') return str_replace('/home/xxxxxxx/public_html/images/','http://xxxxxxxxxxxxxx.netdna-cdn.com/images/',$image_path); // / WCM - CDN Images

Putting /images at the end made it work. All fixed and running now.
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #39  
Old 06-23-2011, 08:47 AM
  inkcarts's Avatar 
inkcarts inkcarts is offline
 

Advanced Member
  
Join Date: Sep 2008
Location: Crowley Louisiana
Posts: 45
 

Default Re: MaxCDN Content Delivery Solution?

Jon,
Does this same maxcdn code work in 4.4?
__________________
Lyn Askin
X-Cart 4.2.3
MICR Toner
Toner Cartridges
X-Cart Search Engine Optimization
Reply With Quote
  #40  
Old 06-23-2011, 09:14 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: MaxCDN Content Delivery Solution?

It's a bit different on 4.4 but the principle is the same, just the exact code is a bit different. Probably this would work:

FIND:

Code:
$smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images'); $smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir);

REPLACE WITH:

Code:
// WCM - MaxCDN Implementation if ($_SERVER['HTTPS'] != 'on') { $smarty->assign('ImagesDir', 'http://CdnUrl.example.com//images'); $smarty->assign('SkinDir', 'http://CdnUrl.example.com/'); } else { $smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images'); $smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir); } // WCM - MaxCDN Implementation
Reply With Quote

The following user thanks Jon for this useful post:
chamberinternet (09-29-2011)
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



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 07:15 AM.

   

 
X-Cart forums © 2001-2020