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)
-   -   MaxCDN Content Delivery Solution? (https://forum.x-cart.com/showthread.php?t=55319)

Jon 06-23-2011 09:18 AM

Re: MaxCDN Content Delivery Solution?
 
Also on 4.4, if you are using the css and js optimizer your site will probably not render properly with maxcdn implemented in this way. You would want to optimize the css and js, create a standalone file, and modify your templates to link to that standalone file instead of all the tons of files that x-cart now uses (not an easy task).

inkcarts 06-23-2011 10:05 AM

Re: MaxCDN Content Delivery Solution?
 
Great. Thank you! I am also curious about the maxcdn handles the new css and javascript optimization in 4.4. I'm implementing a site today, so we'll see. . . :-)

inkcarts 06-27-2011 08:38 AM

Re: MaxCDN Content Delivery Solution?
 
Ok. I've been working on installing maxcdn for a 4.4 site. However, i am using the "speed-up" settings in the admin for javascript and css.

Any idea where i might find the code to change it so those speed up files are also pulled from the cdn? Or is that even possible?

Thanks in Advance!

P.S. If I find them myself first. . . i'll post it here. :-)

DogByteMan 06-27-2011 04:44 PM

Re: MaxCDN Content Delivery Solution?
 
On 4.1.12 in func.files.php

if (($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on')
{
$image_path = str_replace('/home/user/public_html/images/','http://skin1.mydomain/images/',$image_path);
return str_replace('$http_location','',$image_path);
}

Works Great, BUT, I need a different scheme for product and category pages. I've tried. for example.

if ($productid AND ($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on')
{
$image_path = str_replace('/home/user/public_html/images/','http://skin1.mydomain.com/images/',$image_path);
return str_replace('$http_location','',$image_path);
}

and dozens of other possible variables, it would appear they are not available in func.files.php. Anybody have a solution?

DogByteMan 06-28-2011 06:09 AM

Re: MaxCDN Content Delivery Solution?
 
Quote:

Originally Posted by DogByteMan
On 4.1.12 in func.files.php

if (($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on')
{
$image_path = str_replace('/home/user/public_html/images/','http://skin1.mydomain/images/',$image_path);
return str_replace('$http_location','',$image_path);
}

Works Great, BUT, I need a different scheme for product and category pages. I've tried. for example.

if ($productid AND ($type == 'T' OR $type == 'P') AND $_SERVER['HTTPS'] != 'on')
{
$image_path = str_replace('/home/user/public_html/images/','http://skin1.mydomain.com/images/',$image_path);
return str_replace('$http_location','',$image_path);
}

and dozens of other possible variables, it would appear they are not available in func.files.php. Anybody have a solution?


I guess I should elaborate, I feel I might not of been clear enough. What I want to accomplish is separate sub domains for images based on whether the customer is on a product page, a category page, or the home page. In func.files there is no code to make this available. I want to know, with the least amount of overhead, how to make something available to make the distinctions.

Ajay 07-03-2011 07:22 AM

Re: MaxCDN Content Delivery Solution?
 
in 4.4 has anyone figured out what files need to be changed so product detailed images, thumbnails are served from maxcdn?

Ajay 07-03-2011 02:59 PM

Re: MaxCDN Content Delivery Solution?
 
The code below only partially works. If there is an image file directly mentioned in your template files, that gets converted. But all the image files, referenced in CSS as backaground images etc and once you aggregate css and javascript do not work. they remain to be served from original location.

I used to have MAx CDN working perfectly fine in 4.2. Now since 4.4 still struggling to figure out.

Quote:

Originally Posted by Jon
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



qinwubi 11-02-2011 06:49 PM

Re: MaxCDN Content Delivery Solution?
 
I did what's in the original thread. But it doesn't work for product thumbnails and detailed images, i.e, images/T/..., images/D/..., etc. Am I missing anything?

I'm running X-Cart 4.3.2.

BBM_ 11-15-2011 02:18 AM

Re: MaxCDN Content Delivery Solution?
 
Quote:

Originally Posted by handsonwebhosting
We use MaxCDN on our web hosting site (http://www.handsonwebhosting.com) and have done so for the past 4 or 5 months. The reaction from our user base was instantly noted and people complementing on the faster speeds from various locations. We're waiting on the Edge servers to come online in Australia as we have a big client base in Australia & New Zealand, but it's prove a very successful launch within the United States and our European customers.


Any idea if this has been rolled out downunder yet at all?

bigredseo 11-15-2011 06:17 AM

Re: MaxCDN Content Delivery Solution?
 
Nothing in Australia yet that I know of. There were plans to expand, but nothing seems to have been done to move forward on this.

I know that the branch for Asia was a long time coming, but they now do have a location in Singapore.

I've not even had an email about if they're doing beta tests in Australia yet, but I'll drop an email to my contacts and see what I can find out for you.


All times are GMT -8. The time now is 10:30 AM.

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