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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

EcomQuantityField: no/bad order item or buyable passed to constructor.


Go to End


1474 Views

Avatar
_Vince

Community Member, 165 Posts

4 December 2012 at 6:58pm

What does this message mean? The rest of the warning says

Line 64 in /var/www/mysite/ecommerce/code/forms/fields/EcomQuantityField.php

Source

55 if(!$this->orderItem) {
56 $className = $object->classNameForOrderItem();
57 $this->orderItem = new $className($object->dataRecord,0);
58 }
59 }
60 elseif($object instanceof OrderItem && $object->BuyableID){
61 $this->orderItem = $object;
62 }
63 else{
64 user_error("EcomQuantityField: no/bad order item or buyable passed to constructor.", E_USER_WARNING);
65 }
66 $this->parameters = $parameters;
67 }
68
69 function setClasses($newclasses, $overwrite = false){
70 if($overwrite) {

and then there's the trace.

I'm guessing it's some sort of config issue, but where?

Can anybody help with this?