Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Uncaught Exception on "total" DataObjectSet


Reply


3 Posts   693 Views

Avatar
Mrfixer

Community Member, 49 Posts

12 February 2011 at 12:07pm

Edited: 12/02/2011 12:11pm

SS 2.4.5
ecommerce v0.81

Heres a wierd error that im getting with ecommerce v0.81, it did work fine up until tonight, had a week off and added the featured products widget and right away i got this error when adding a product to cart:

Uncaught Exception: Object->__call(): the method 'total' does not exist on 'DataObjectSet'

i removed the widget thinking this could have been a cause, ran a /dev/build and a ?flush=all to clear anything left behind and im still getting it, i can trace it to here in ecommerce/code/model/order.php

function ModifiersSubTotal($excluded = null, $onlyprevious = false) {
$total = 0;

if($modifiers = $this->Modifiers()) {
foreach($modifiers as $modifier) {
if(is_array($excluded) && in_array($modifier->class, $excluded)) {
if($onlyprevious)
break;
continue;
} elseif($excluded && ($modifier->class == $excluded)) {
if($onlyprevious)
break;
continue;
}

$total += $modifier->Total();
}
}

return $total;
}


like i said it was working before, so im pretty stumped on how to get iy working again, any thoughts?
TY

Avatar
Mrfixer

Community Member, 49 Posts

13 February 2011 at 6:16am

Just an update, luckily enough this is just a thing im bashing about with at home (while im learning how to get to grips SS), after a few hours of searching and stuff i decided to copy my mysite folder, theme folder,payments and ecommerce modules and run a new install and then overwrite into the new folder, working ok now (also added the Featured prods widget with no issues this time).. but if any one knows what would have caused the error in the first place i would appreciate a heads up on that.. regards

Avatar
Mrfixer

Community Member, 49 Posts

14 February 2011 at 11:42am

And another update, theres definatly a problem with widgets and this error, today it happened again when testing a widget i had knocked up for "popular products" this error happened again when trying to add an item into the cart, was racking my brains again trying to get aways round it, anyway after a couple of hours i deletedthe fields inside the widget and widgetarea tables in the database and now all is good again