Quan Vo Posted October 21, 2016 Share Posted October 21, 2016 Hi everyone, I've a trouble with Media server. Could not find any topic in forum to fix this: My CDN could not support SSL (free SSL Let's Encrypt on subdomain https://cdn.mysite.com) So I want to run non ssl cdn in full site ssl: http://cdn.mysite.com in https://mysite.com Could anyone tell me how can override MediaServer on Tool Class: <?php class Tools extends ToolsCore { public static function getMediaServer($filename) { if (self::$_cache_nb_media_servers === null && defined('_MEDIA_SERVER_1_') && defined('_MEDIA_SERVER_2_') && defined('_MEDIA_SERVER_3_')) { if (_MEDIA_SERVER_1_ == '') { self::$_cache_nb_media_servers = 0; } elseif (_MEDIA_SERVER_2_ == '') { self::$_cache_nb_media_servers = 1; } elseif (_MEDIA_SERVER_3_ == '') { self::$_cache_nb_media_servers = 2; } else { self::$_cache_nb_media_servers = 3; } } if ($filename && self::$_cache_nb_media_servers && ($id_media_server = (abs(crc32($filename)) % self::$_cache_nb_media_servers + 1))) { return constant('_MEDIA_SERVER_'.$id_media_server.'_'); } return Tools::usingSecureMode() ? Tools::getShopDomainSSL() : Tools::getShopDomain(); } } Also, May I ask for: how to non caching dynamic module (checkout module)? I have problem when using one page checkout: could increase/decrease item without extra field, but could not with extra field (text field) Thanks at all, Quân Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now