Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » EcomQuantityField: no/bad order item or buyable passed to constructor.

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

Page: 1
Go to End
Author Topic: 392 Views
  • _Vince
    Avatar
    Community Member
    156 Posts

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

    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?

    392 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.