X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   MAX cdn (https://forum.x-cart.com/showthread.php?t=64443)

philrisk 09-21-2012 04:20 AM

Re: MAX cdn
 
Has anyone successfully managed to get maxcdn pulling the cached css and js from the speedup tool?

dave01978 09-21-2012 05:39 PM

Re: MAX cdn
 
anyone got any ideas for 4.5.2?

Tried the above codes, but doesnt pull up from it

JacksmithxD 09-22-2012 06:07 AM

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. :D

dave01978 09-22-2012 11:41 AM

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

philrisk 09-24-2012 01:42 AM

Re: MAX cdn
 
Do Mercuryminds also manage to pull the cached css and js?

Learner 10-15-2012 11:51 PM

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.

zone1creative 12-06-2012 08:56 AM

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'])));

zone1creative 12-06-2012 09:02 AM

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'}

dave01978 12-07-2012 05:43 PM

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

PhilJ 12-11-2012 12:48 PM

Re: MAX cdn
 
http://support.netdna.com/pullzone/xcart-cdn/


All times are GMT -8. The time now is 01:02 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.