- Posts: 392
- Thank you received: 0
Currency Converter
15 years 1 month ago #23335
by Bugger101
Currency Converter was created by Bugger101
Hello!
Loving the new stuff
I don't know if this is a bug or not, but when I went to test the currency switcher, I got this message:
Fatal error: Call to undefined method CurrencyController::isIn() in /home/*/public_html/components/com_hikashop/router.php on line 108
Not a big deal, as you are probably busy (have disabled it) helping others with other important things, just thought I would let you know
Loving the new stuff
I don't know if this is a bug or not, but when I went to test the currency switcher, I got this message:
Fatal error: Call to undefined method CurrencyController::isIn() in /home/*/public_html/components/com_hikashop/router.php on line 108
Not a big deal, as you are probably busy (have disabled it) helping others with other important things, just thought I would let you know
Please Log in or Create an account to join the conversation.
15 years 1 month ago #23375
by nicolas
Replied by nicolas on topic Re: Currency Converter
Hi,
Thank you for the report. Changing the code:
class CurrencyController extends JController{
to:
class CurrencyController extends hikashopController{
in the file components/com_hikashop/controllers/currency.php should solve the problem.
You might however also have to add the code:
$this->display[]='update';
after the code:
parent::__construct($config,$skip);
in that same file.
Thank you for the report. Changing the code:
class CurrencyController extends JController{
to:
class CurrencyController extends hikashopController{
in the file components/com_hikashop/controllers/currency.php should solve the problem.
You might however also have to add the code:
$this->display[]='update';
after the code:
parent::__construct($config,$skip);
in that same file.
Please Log in or Create an account to join the conversation.
15 years 2 weeks ago - 15 years 2 weeks ago #25180
by Bugger101
Replied by Bugger101 on topic Re: Currency Converter
Hello,
It works now as far as no errors showing, but the conversion is not working. The prices are showing as the same.
This is what I have changed it to:
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
class CurrencyController extends hikashopController{
function __construct($config = array(),$skip=false){
parent::__construct($config,$skip);
$this->display[]='update';
if(!$skip){
$this->registerDefaultTask('update');
}
JRequest::setVar('tmpl','component');
}
function update(){
$currency=JRequest::getInt('hikashopcurrency',0);
if(!empty($currency)){
$app =& JFactory::getApplication();
$app->setUserState( HIKASHOP_COMPONENT.'.currency_id', $currency );
Thanks!
It works now as far as no errors showing, but the conversion is not working. The prices are showing as the same.
This is what I have changed it to:
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
class CurrencyController extends hikashopController{
function __construct($config = array(),$skip=false){
parent::__construct($config,$skip);
$this->display[]='update';
if(!$skip){
$this->registerDefaultTask('update');
}
JRequest::setVar('tmpl','component');
}
function update(){
$currency=JRequest::getInt('hikashopcurrency',0);
if(!empty($currency)){
$app =& JFactory::getApplication();
$app->setUserState( HIKASHOP_COMPONENT.'.currency_id', $currency );
Thanks!
Last edit: 15 years 2 weeks ago by Bugger101.
Please Log in or Create an account to join the conversation.
15 years 2 weeks ago - 15 years 2 weeks ago #25181
by Bugger101
Replied by Bugger101 on topic Re: Currency Converter
Nuts! Now the prices wont go away when I change the original php file back, and disable the plugin. It is showing pounds instaed of AUD :S
Never mind, I changed it back, weird though that it didnt change by renaming the file in cpanel, had to download it and upload again. My ignorance probably!
Never mind, I changed it back, weird though that it didnt change by renaming the file in cpanel, had to download it and upload again. My ignorance probably!
Last edit: 15 years 2 weeks ago by Bugger101.
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds