SilverCart Forum
We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?
You can help us helping you by providing detailed error messages, screenshots and logfile entries.
Page: 1 , 2 , 3 | ||
Topic getAmount | 9224 Views |
getAmount
30 January 2012 at 5:40pm Last edited: 30 January 2012 5:41pmmy logs show im gettng an error
Call to a member function getAmount() on a non-object in /home/onit/public_html/silvercart_payment_paypal/code/SilvercartPaymentPaypal.php on line 956, referer: http://silvercart.onitsports.co.uk/home/checkout/
which traces to
line 956 $taxTotal += $taxRate->Amount->getAmount();
obviously i'm missing something
http://silvercart.onitsports.co.uk
Re: getAmount
30 January 2012 at 9:59pmDo you have a tax rate defined?
Re: getAmount
31 January 2012 at 10:06am Last edited: 31 January 2012 10:47amSC Config ... search for Rate
label: 21%
rate: 20
identifer? testrate
---------------------
other places?
SC Admin ..search for product
my product is set to 21% from the pulldown.
also if change a differnet option from pulldown and save
it does save it
---------------------------------------------
i look at that line in SivercartPaymentPaypal.php
$taxTotal = 0.0;
foreach ($this->shoppingCart->getTaxTotal() as $taxRate) {
$taxTotal += $taxRate->Amount->getAmount();
}
i did
$taxTotal = 0.0;
foreach ($this->shoppingCart->getTaxTotal() as $taxRate) {
echo "<pre>ECHO OUT THE TAXRATE " . print_r( $taxRate, true) . "</pre>";
$taxTotal += $taxRate->Amount->getAmount();
}
which gives
ECHO OUT THE TAXRATE Money Object
(
[currency:protected] => GBP
[amount:protected] => 26.03132231405
[isChanged:protected] => 1
[locale:protected] =>
[currencyLib:protected] => Zend_Currency Object
(
[_locale:Zend_Currency:private] => en_US
[_options:protected] => Array
(
[position] => 8
[script] =>
[format] =>
[display] => 2
[precision] => 2
[name] => US Dollar
[currency] => USD
[symbol] => $
)
)
[allowedCurrencies:protected] =>
[value:protected] =>
[tableName:protected] =>
[name:protected] =>
[arrayValue:protected] =>
[defaultVal:protected] =>
[iteratorPos:protected] =>
[iteratorTotalItems:protected] =>
[failover:protected] =>
[customisedObject:protected] =>
[objCache:ViewableData:private] => Array
(
)
[class] => Money
[extension_instances:protected] => Array
(
)
)
why would it say USD?
Re: getAmount
31 January 2012 at 10:09am Last edited: 31 January 2012 10:11amHi Sjdeere,
thanks for your feedback.
We could reproduce the issue and will provide a fix today. The error occured because we accidentally pushed a version of the core that was not compatible with the published paypal-module.
Cheers
Ramon
Re: getAmount
31 January 2012 at 12:23pmHello Sjdeere,
thanks for pointing out this bug. We accidentally pushed the tip version of the paypal module to the download packages, so it wouldn't work with the 1.2 release.
This issue should be fixed now; please download the package again and replace your existing "silvercart_payment_paypal" directory with the newly downloaded one.
Sorry for the inconvenience,
Sascha
Re: getAmount
31 January 2012 at 2:47pm Last edited: 31 January 2012 4:34pmthanks
I'll give it a go
I've used the silverstripe unsupported ecommerce module for one or two project before and it was fiddly beacuse we had to create our own paypal class, but silvercart looks better.
--
almost working
i'm logged into developer.paypal.com ..etc
but when i submit from front end of silver cart it says
You have requested an outdated version of PayPal. This error often results from the use of bookmarks.
SC config are these outdated
https://www.sandbox.paypal.com/cgi-bin/webscr
https://api-3t.sandbox.paypal.com/nvp
https://api-3t.sandbox.paypal.com/2.0/
Re: getAmount
31 January 2012 at 4:24pmHello Sjdeere,
your edited comment where you described an issue with the shipping method not appearing just vanished.
Did you get that solved or did our forum kill your edited comment while I tried to reply? :)
Greetings,
Sascha
Re: getAmount
31 January 2012 at 4:42pmThat's good to hear :)
The version error message could result from the version info sent by the module.
You can configure the version in the backend in the field "API version" located at "SC Config" -> "Payment method" -> "Paypal" -> "Paypal API" -> "API Dev mode".
This field should have the value "2.3" (without quotation marks).