| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#91
|
|||||||||
|
|||||||||
Re: MAX cdn
XC versions before 4.4.x do NOT have the ability to change skins. 4.4.x and above have multiple skins to chose from for the cart so if not default the skins is AltSkin....
Prior to 4.4.x there is only one skin in XC so thereis no AltSkin. Looking at your signature you have 4.1.11 so there is no AltSkin - you have to adjust the code and modify the lines in the file showing for your version
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#92
|
|||||||
|
|||||||
Re: MAX cdn
Quote:
My signature shows that we are using 4.5.4 and that we upgraded from 4.1.11. It seemed important to show that we came from 4.1.11 while we were getting our site working with 4.5.4 correctly - I may remove the 4.1.11 from the signature now I'm still unclear where the new assignments are being used though.
__________________
X-Cart GOLD Plus v4.5.4 CDSEO Pro ewdhosting Dedicated Server Dedicated SSL Stone Edge OM |
|||||||
#93
|
|||||||||
|
|||||||||
Re: MAX cdn
Oh sorry missed that...
They replace the calls in smarty.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#94
|
|||||||
|
|||||||
Re: MAX cdn
Thanks to all that contributed to post #57 - easy edits with powerful consequences.
Like others I was unable to do step #4 as the code was not present, but step #7 caught all images, apart from the product detailed image thumbnails. I had to make the following change: File: /skin/common_files/modules/Detailed_Product_Images/colorbox_image.tpl FIND: Code:
REPLACE WITH: Code:
For such small images the change made a huge difference, saving 0.88s on my test product page.
__________________
X-Cart GOLD Plus v4.5.4 CDSEO Pro ewdhosting Dedicated Server Dedicated SSL Stone Edge OM |
|||||||
#95
|
|||||||
|
|||||||
Re: MAX cdn
Quote:
And I am now understanding your confusion... I am also confused, now that I have two active skins. Which skin is $AltSkinDir (xtreme or xmobile?) I am also seeing the txs templates and modules not use the default calls that automatically send content to the cdn. So I am having to figure this out. What is the solution for step #4 if you have two active skins?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#96
|
|||||||
|
|||||||
Re: MAX cdn
Using Vivid Dreams as a substitute for books_and_magazines, , I have the strange problem where I can get images to show in https but not in non-secure mode http using this code:
// MaxCDN - next two lines commented out //$smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images'); //$smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir); // MaxCDN add the following if ($_SERVER['HTTPS'] != 'on') { $smarty->assign('ImagesDir', "http://cdn.domain.com" . $smarty_skin_dir . '/images'); $smarty->assign('SkinDir', "http://cdn.domain.com" . $smarty_skin_dir); $smarty->assign("AltImagesDir", "http://cdn.domain.com/skin/books_and_magazines/images"); $smarty->assign("AltSkinDir", "http://cdn.domain.com/skin/books_and_magazines"); } else { $smarty->assign('ImagesDir', $xcart_web_dir . $smarty_skin_dir . '/images'); $smarty->assign('SkinDir', $xcart_web_dir . $smarty_skin_dir); } // END MaxCDN edit Any clue why it wouldn't show up in non-https mode? If I keep the original code, however, images show but not through MaxCDN of course. When I try to call up an individual image in a new tab, I get a "403 Forbidden" notice...
__________________
X-Cart 5.4.1.39 Live PHP 7.4.33 5.5.5-10.3.38-MariaDB MariaDB Apache 2.4 CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT 32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1 |
|||||||
#97
|
|||||||
|
|||||||
Re: MAX cdn
Quote:
Stating the obvious? substitute vivid_dreams_lotus for books_and_magazines ?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#98
|
|||||||
|
|||||||
Re: MAX cdn
Yes, of course I replaced those.
I'm having a very difficult time getting this to work with 4.6.0. Even the basic thumbnails are giving me a 403 Forbidden error when I try to get them to load them from MaxCDN: cdn.domain.com/images/T/image123.png (NOTE: I had several referrers in the MAXCDN control panel - don't put referrers in there! )
__________________
X-Cart 5.4.1.39 Live PHP 7.4.33 5.5.5-10.3.38-MariaDB MariaDB Apache 2.4 CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT 32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1 |
|||||||
#99
|
|||||||
|
|||||||
Re: MAX cdn
I am having a devil of a time getting css and js files to load from the CDN in 4.6.1.
I have patched function.load_defer_load.php appropriately (Thanks Phil!), but it looks to me that the issue (for css) is in customer/service_css.tpl and customer/service_css_modules.tpl. The path to the css files there are relative from the root of the store - not complete: xx/skin/..../zz.css rather than {$SkinDir}/..../zz.css. The result is that the redirection to the CDN in defer_load never takes place. There is no code among all of the various patches that will pick this up - everything depends on seeing {$SkinDir} or {$AltSkinDir}. Has anyone figured this out? I suppose I could hard code the paths to all of the various modules using the {$SkinDir} abd {$AltSkinDir} constructs, but that seems too much like brute force. I have not looked at the .js file load, but I'm betting it is somewhat similar. A side effect of this is that if I turn on the internal X-Cart optimization for js or css, none of these files load at all. I'll post a complete version of the solution once we (com on, let's do this together) get it right.
__________________
4.6.1 Gold Plus, working on moving to the latest 4.x soon reBOOT Template (the best!) AlteredCart Checkout One, Checkout One Tools & Checkout One Payments AlteredCart SmartSearch & Search by Filters AlteredCart On Sale CDSEO xCMS BCS Point of Sale, Pre-order / Back Order Magnetic One's Autoresponder Heavily modified |
|||||||
#100
|
|||||||
|
|||||||
Re: MAX cdn
I'm still having a difficult time implementing MAX-CDN & XC with regards to generated thumbnails in HTTPS mode. I want it to load from MaxCDN in non-secure http mode, and to not load from MaxCDN in https mode.
Chrome is showing a yellow lock because of this and customers are bugging me about it, I need to get this figured out. According to MAX-CDN implementation instructions for XC… Quote:
When I try to do this insecure in HTTP, it correctly generates this kind of URL for thumbnails: http://netdna.domain.com/images/T/16580t.jpg When I try to do this in HTTPS mode, it should revert back to https://www.domain.com/images/T/16580t.jpg However, it doesn't, I get this error: The page at 'https://www.domain.com/home.php' was loaded over HTTPS, but displayed insecure content from 'http://netdna.domain.com/images/T/16580t.jpg': this content should also be loaded over HTTPS. In step 4 of post #57, the code "$current_location = $current_location; " does not exist in more recent versions of /include/func/func.files.php I've tried both Max CDN version method as well as the method shown in post #57, same error. Anyone got this working on a more recent version of XC?
__________________
X-Cart 5.4.1.39 Live PHP 7.4.33 5.5.5-10.3.38-MariaDB MariaDB Apache 2.4 CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT 32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1 |
|||||||
|
|||
X-Cart forums © 2001-2020
|