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

MAX cdn

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #21  
Old 09-21-2012, 04:20 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: MAX cdn

Has anyone successfully managed to get maxcdn pulling the cached css and js from the speedup tool?
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #22  
Old 09-21-2012, 05:39 PM
 
dave01978 dave01978 is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 95
 

Default Re: MAX cdn

anyone got any ideas for 4.5.2?

Tried the above codes, but doesnt pull up from it
__________________
Xcart Version 4.5.2
CDSEO Pro
Remember Anonymous carts
Social Bookmarks
Cart Abandonment
catagory map
mobile mod
product map
XCMS
Auth.net DPM
Reply With Quote
  #23  
Old 09-22-2012, 06:07 AM
 
JacksmithxD JacksmithxD is offline
 

X-Adept
  
Join Date: Oct 2010
Posts: 400
 

Default Re: MAX cdn

Quote:
Originally Posted by dave01978
anyone got any ideas for 4.5.2?

Tried the above codes, but doesnt pull up from it

Mercuryminds does the full install and setup for $30 I think, works a charm on my site. They do a full documentation for $50 in total, might be worth asking them.
__________________
Xcart 4.5.2
Reply With Quote
  #24  
Old 09-22-2012, 11:41 AM
 
dave01978 dave01978 is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 95
 

Default Re: MAX cdn

yeah i may go that route, but i am cheap and will probably spend more time to end up paying the $30
Thanks for the info
__________________
Xcart Version 4.5.2
CDSEO Pro
Remember Anonymous carts
Social Bookmarks
Cart Abandonment
catagory map
mobile mod
product map
XCMS
Auth.net DPM
Reply With Quote
  #25  
Old 09-24-2012, 01:42 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: MAX cdn

Do Mercuryminds also manage to pull the cached css and js?
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #26  
Old 10-15-2012, 11:51 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: MAX cdn

Quote:
Originally Posted by totaltec
I don't have Max CDN but to include the $AltSkinDir and $AltImagesDir it seems that you would need to find:
PHP Code:
if (@file_exists($alt_skin_dir XC_DS 'css' XC_DS 'altskin.css')) {
        
$smarty->assign('AltImagesDir'$alt_skin_info['web_path'] . '/images');
        
$smarty->assign('AltSkinDir',   $alt_skin_info['web_path']);
    } 
and replace with:
PHP Code:
// WCM - MaxCDN Implementation
if (@file_exists($alt_skin_dir XC_DS 'css' XC_DS 'altskin.css')) {
  if (
$_SERVER['HTTPS'] != 'on')
  {
    
$smarty->assign('AltImagesDir'"http://CdnUrl.example.com" $alt_skin_info['web_path'] . '/images');
    
$smarty->assign('AltSkinDir',   "http://CdnUrl.example.com" $alt_skin_info['web_path']);
    
  }
  else
  {
    
$smarty->assign('AltImagesDir'$alt_skin_info['web_path'] . '/images');
    
$smarty->assign('AltSkinDir',   $alt_skin_info['web_path']);
  }

Again, just shooting in the dark. Look correct?

Hi Mike,
I have Artistictune business as my template and my version is x-cart Pro 4.4.2.Please help me how to add my skin,images and template through max cdn.After adding this codes the whole site breaks.

Please provide me the modified smarty.php for my 4.4.2 Pro.

Thanks.
__________________
4.6.1 Platinum


Reply With Quote
  #27  
Old 12-06-2012, 08:56 AM
  zone1creative's Avatar 
zone1creative zone1creative is offline
 

eXpert
  
Join Date: Jan 2009
Location: Hove, UK
Posts: 341
 

Default Re: MAX cdn

Hi

Sorry I have not been following the thread but here are the files I edit to implement maxcdn.

Along with smarty.php do the following

To get xcart to use css and js files from maxcdn edit
include/templater/plugins/function.load_defer_code.php

find
Code:
$result = ('js' == $type) ? '<script type="text/javascript" src="' . $cacheWebFile . '"></script>' : '<link rel="stylesheet" type="text/css" href="' . $cacheWebFile . '" />';

replace with
Code:
$result = ('js' == $type) ? '<script type="text/javascript" src="' . str_replace("www.yoursiteurl.co.uk","yourcdnurl.com",$cacheWebFile) . '"></script>' : '<link rel="stylesheet" type="text/css" href="' . str_replace("www.yoursiteurl.co.uk","yourcdnurl.com",$cacheWebFile) . '" />';

This will cover a lot of your background images and all javascript calls.

Then to make all your category images use cdn

edit include/templater/plugins/function.get_category_image_url.php
find

Code:
return func_convert_amp(func_get_image_url($category['categoryid'], 'C', $category['image_path']));

replace with

Code:
return str_replace("www.yoursiteurl.co.uk","yourcdnurl.com",func_convert_amp(func_get_image_url($category['categoryid'], 'C', $category['image_path'])));
__________________
Pinakin Patel
Zone1 Creative Ltd
http://www.zone1creative.co.uk/
Reply With Quote

The following 4 users thank zone1creative for this useful post:
carpeperdiem (01-12-2013), dave01978 (12-07-2012), MAPerformance (12-17-2012), totaltec (12-06-2012)
  #28  
Old 12-06-2012, 09:02 AM
  zone1creative's Avatar 
zone1creative zone1creative is offline
 

eXpert
  
Join Date: Jan 2009
Location: Hove, UK
Posts: 341
 

Default Re: MAX cdn

Then in the template files for the product thumbnail and expanded view

you can use the smaty replace function in the following way
Code:
{$tmbn_url|amp|replace:'www.yoursiteurl.co.uk':'yourcdnurl.com'}
__________________
Pinakin Patel
Zone1 Creative Ltd
http://www.zone1creative.co.uk/
Reply With Quote

The following 3 users thank zone1creative for this useful post:
dave01978 (12-07-2012), MAPerformance (12-17-2012), totaltec (12-06-2012)
  #29  
Old 12-07-2012, 05:43 PM
 
dave01978 dave01978 is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 95
 

Default Re: MAX cdn

Quote:
Originally Posted by zone1creative
Then in the template files for the product thumbnail and expanded view

you can use the smaty replace function in the following way
Code:
{$tmbn_url|amp|replace:'www.yoursiteurl.co.uk':'yourcdnurl.com'}

What template files do you put that, and where i am lost on this i am sorry for beeing such a noob
__________________
Xcart Version 4.5.2
CDSEO Pro
Remember Anonymous carts
Social Bookmarks
Cart Abandonment
catagory map
mobile mod
product map
XCMS
Auth.net DPM
Reply With Quote
  #30  
Old 12-11-2012, 12:48 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,070
 

Default Re: MAX cdn

http://support.netdna.com/pullzone/xcart-cdn/
__________________
xcartmods.co.uk
Reply With Quote

The following user thanks PhilJ for this useful post:
totaltec (12-12-2012)
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

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 12:49 AM.

   

 
X-Cart forums © 2001-2020