本文整理汇总了PHP中tsmConfig::set方法的典型用法代码示例。如果您正苦于以下问题:PHP tsmConfig::set方法的具体用法?PHP tsmConfig::set怎么用?PHP tsmConfig::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tsmConfig
的用法示例。
在下文中一共展示了tsmConfig::set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resetThumbs
/**
* 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;
}
示例2: setCartLayout
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();
}
}