Fatal error when trying to open catalog page

3 views
Skip to first unread message

Bear

unread,
Oct 13, 2008, 6:15:34 AM10/13/08
to KiweeCommerce Forum
Just did a fresh install of KC, configured products, published the
product catalog page, and added it to the wayfinder navigation but
when i try to open it i get the following error message:

Fatal error: Call to undefined method Kiwee::getPriceCurrency() in /
home/miraclemineralasia.com/htdocs/manager/includes/
document.parser.class.inc.php(769) : eval()'d code on line 39

Any ideas would be greatly appreciated.

-Bear

Richard Northcott

unread,
Oct 13, 2008, 6:45:44 AM10/13/08
to kiweec...@googlegroups.com
Hi

I hadn't got around to the Catalog page/area much so sorry that this error occured.

The FIX required involves changing a snippet and a php file - as follows

1)  Find an open the Snippet called 'kiwee'
 on about line 41 you will see the code

echo $kiwee->getPriceCurrency($retid);

this needs to be changed to

echo $kiwee->getPrice($retid);

Save the changes


2) Find and open the php file 'kiwee.class.php' - this is located in the assets/snippets/shoppingCart folder
at about line 606 you should find the function

getPrice(...)

Replace the following code

        $curr_num = $_SESSION['eParams']['buyer_currency_num'];
        if($useExchangeRate==true) {$amount *= $_SESSION['eParams']['exchange_rate'];}
        if($showCurrency==true) {$currency=$_SESSION['eParams']['currencies'][$curr_num]['symbol'];}
        else {$currency=='';}   
        return $currency . number_format($amount, $_SESSION['eParams']['currencies'][$curr_num]['decimal_places'],
            $_SESSION['eParams']['currencies'][$curr_num]['decimal_point'],$_SESSION['eParams']['currencies'][$curr_num]['thousands_point']);


with

        if($_SESSION['eParams']) {
            $curr_num = $_SESSION['eParams']['buyer_currency_num'];
            if($useExchangeRate==true) {$amount *= $_SESSION['eParams']['exchange_rate'];}
            if($showCurrency==true) {$currency=$_SESSION['eParams']['currencies'][$curr_num]['symbol'];}
            else {$currency=='';}   
            return $currency . number_format($amount, $_SESSION['eParams']['currencies'][$curr_num]['decimal_places'],
                $_SESSION['eParams']['currencies'][$curr_num]['decimal_point'],$_SESSION['eParams']['currencies'][$curr_num]['thousands_point']);
        } else {
            if($showCurrency==true) {$currency=$this->config['currency_symbol'];}
            else {$currency=='';}
            return $currency . number_format($amount, 2);
        }

Hopefully I'll look at the Catlog area a bit more for the next version, I am also trying to revise the variable references so that there are less issues of variables not existing.

Hope this helps.


Richard

Bear

unread,
Oct 13, 2008, 6:58:02 AM10/13/08
to KiweeCommerce Forum
Thanks Richard.
I'll give it a go.

Richard Northcott

unread,
Oct 13, 2008, 12:14:54 PM10/13/08
to kiweec...@googlegroups.com
if needs be i can email the complete file and snippet if required.
Reply all
Reply to author
Forward
0 new messages