/** * This function deletes all stored thumbs and deletes the entries for all thumbs, usually this is need for shops * older than vm2.0.22. The new pattern is now not storing the url as long it is not overwritten. * Of course the function deletes all overwrites, but you can now relativly easy change the thumbsize in your shop * @author Max Milbers */ function resetThumbs() { $db = JFactory::getDbo(); $q = 'UPDATE `#__tsmart_medias` SET `file_url_thumb`=""'; $db->setQuery($q); $db->execute(); $err = $db->getErrorMsg(); if (!empty($err)) { vmError('resetThumbs Update entries failed ', $err); } jimport('joomla.filesystem.folder'); $tmpimg_resize_enable = tsmConfig::get('img_resize_enable', 1); tsmConfig::set('img_resize_enable', 0); $this->deleteMediaThumbFolder('media_category_path'); $this->deleteMediaThumbFolder('media_product_path'); $this->deleteMediaThumbFolder('media_manufacturer_path'); $this->deleteMediaThumbFolder('media_vendor_path'); $this->deleteMediaThumbFolder('forSale_path_thumb', ''); tsmConfig::set('img_resize_enable', $tmpimg_resize_enable); return true; }
private function setCartLayout($cart, $intoSession = true) { if (!class_exists('tsmConfig')) { require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php'; } tsmConfig::loadConfig(); $olgConfig = tsmConfig::get('oncheckout_opc', true); tsmConfig::set('oncheckout_opc', true); $cart->layoutPath = vmPlugin::getTemplatePath($this->_name, 'payment', 'cart'); $cart->layout = 'cart'; if ($intoSession) { $cart->setCartIntoSession(); } }