Example #1
0
 public static function withID($id, $options = array())
 {
     $instance = new self();
     $instance->data->id = $id;
     $instance->data->options = $options;
     $instance->computeKey();
     //calculates key, for times when same product with different options are added to cart
     return $instance;
 }