Currency Converter

  • Posts: 392
  • Thank you received: 0
13 years 3 months ago #23335

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 :)

:)

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 3 months ago #23375

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.

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 2 months ago #25180

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! :)

Last edit: 13 years 2 months ago by Bugger101.

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 2 months ago #25181

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!

Last edit: 13 years 2 months ago by Bugger101.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum