Is there a way to user smarty2 instead of smarty3 in Prestashop 1.5 ? I have updated from 1.2.5 and the theme is ruined.Thanks
Maybe try the Backward Compatility feature of Smarty.
In the file "/config/smarty.config.inc.php", replace :
require_once(_PS_SMARTY_DIR_.'Smarty.class.php');
global $smarty;
$smarty = new Smarty();
by
require_once(_PS_SMARTY_DIR_.'SmartyBC.class.php');
global $smarty;
$smarty = new SmartyBC();
Related
Somehow the Joomla 3 method of setting the view for redirecton is not the same as the deprecated way.
Deprecated:
JRequest::setVar( 'view', 'objects' );
Joomla 3:
JFactory::getApplication()->input->set( 'view', 'objects');
The redirections does not work with the new version (joomla3). Why?
The below is how to redirect in joomla 3
$app = JFactory::getApplication();
$app->redirect(URL);
This Question has been asked earlier also.
*Best Answer was*
In order to use joomla default recaptcha plugin follow these steps-
1)Get recaptcha keys from http://www.google.com/recaptcha
2)Set these keys to recaptcha plugin and activate it if it's not.
3)Put below code where you want to show recaptcha
//php code
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onInit','dynamic_recaptcha_1');
//html code inside form tag
<div id="dynamic_recaptcha_1"></div>
4)Put this code where you validating/processing the form:
$post = JRequest::get('post');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$res = $dispatcher->trigger('onCheckAnswer',$post['recaptcha_response_field']);
if(!$res[0]){
die('Invalid Captcha');
}
//For Joomla 3.x
$post = JFactory::getApplication->input->post;
$dispatcher = JEventDispatcher::getInstance();
But as i'm new to joomla where do i write these codes?
3) This has to be in the view where you display the form, mostly in the file com_example/views/form/tmpl/edit.php.
4) This has to be in the controllers save action, mostly in the file com_example/controllers/item.php. Item.php is the file of your object, for example on com_content this file has the name article.php.
I'm using custom component in joomla 2.5.
I need to change meta tag "description" and "keywords"
How to override meta tag ?
thanks for your answers
From Joomla docs:
$doc =& JFactory::getDocument();
$doc->setMetaData( 'tag-name', 'tag-content' );
I am editing the invoice in Magento and wondered how I would start a new page ie. so that I can start adding content to page 2?
$pdf = new Zend_Pdf();
//use this line each time you want to create new page
$page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
$pdf->pages[] = $page;
You can use Mage_Sales_Model_Order_Pdf_Invoice::newPage() to add pages to an invoice PDF.
$mainframe->redirect(‘XXXXXXXXXXXX’);
not working in joomla although I have defined
global $mainframe;
use the code like that
global $mainframe;
$redirect = "xxx.php";
$mainframe->redirect($redirect);
or
global $mainframe;
$mainframe->redirect($redirect);