@@ -279,8 +279,8 @@ discard block |
||
| 279 | 279 | * Adds any number of items to the cart. |
| 280 | 280 | * Returns the order item on succes OR false on failure. |
| 281 | 281 | * |
| 282 | - * @param DataObject $buyable - the buyable (generally a product) being added to the cart |
|
| 283 | - * @param float $quantity - number of items add. |
|
| 282 | + * @param BuyableModel $buyable - the buyable (generally a product) being added to the cart |
|
| 283 | + * @param integer $quantity - number of items add. |
|
| 284 | 284 | * @param mixed $parameters - array of parameters to target a specific order item. eg: group=1, length=5 |
| 285 | 285 | * if you make it a form, it will save the form into the orderitem |
| 286 | 286 | * |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | /** |
| 323 | 323 | * Sets quantity for an item in the cart. |
| 324 | 324 | * |
| 325 | - * @param DataObject $buyable - the buyable (generally a product) being added to the cart |
|
| 325 | + * @param BuyableModel $buyable - the buyable (generally a product) being added to the cart |
|
| 326 | 326 | * @param float $quantity - number of items add. |
| 327 | 327 | * @param array $parameters - array of parameters to target a specific order item. eg: group=1, length=5 |
| 328 | 328 | * |
@@ -348,8 +348,8 @@ discard block |
||
| 348 | 348 | /** |
| 349 | 349 | * Removes any number of items from the cart. |
| 350 | 350 | * |
| 351 | - * @param DataObject $buyable - the buyable (generally a product) being added to the cart |
|
| 352 | - * @param float $quantity - number of items add. |
|
| 351 | + * @param BuyableModel $buyable - the buyable (generally a product) being added to the cart |
|
| 352 | + * @param integer $quantity - number of items add. |
|
| 353 | 353 | * @param array $parameters - array of parameters to target a specific order item. eg: group=1, length=5 |
| 354 | 354 | * |
| 355 | 355 | * @return false | DataObject (OrderItem) |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | /** |
| 383 | 383 | * Delete item from the cart. |
| 384 | 384 | * |
| 385 | - * @param OrderItem $buyable - the buyable (generally a product) being added to the cart |
|
| 385 | + * @param BuyableModel $buyable - the buyable (generally a product) being added to the cart |
|
| 386 | 386 | * @param array $parameters - array of parameters to target a specific order item. eg: group=1, length=5 |
| 387 | 387 | * |
| 388 | 388 | * @return bool | item - successfully removed |
@@ -407,9 +407,8 @@ discard block |
||
| 407 | 407 | /** |
| 408 | 408 | * Checks and prepares variables for a quantity change (add, edit, remove) for an Order Item. |
| 409 | 409 | * |
| 410 | - * @param DataObject $buyable - the buyable (generally a product) being added to the cart |
|
| 411 | - * @param float $quantity - number of items add. |
|
| 412 | - * @param bool $mustBeExistingItems - if false, the Order Item gets created if it does not exist - if TRUE the order item is searched for and an error shows if there is no Order item. |
|
| 410 | + * @param BuyableModel $buyable - the buyable (generally a product) being added to the cart |
|
| 411 | + * @param bool $mustBeExistingItem - if false, the Order Item gets created if it does not exist - if TRUE the order item is searched for and an error shows if there is no Order item. |
|
| 413 | 412 | * @param array | Form $parameters - array of parameters to target a specific order item. eg: group=1, length=5* |
| 414 | 413 | * - form saved into item... |
| 415 | 414 | * |
@@ -477,7 +476,7 @@ discard block |
||
| 477 | 476 | * we do not need things like "canPurchase" here, because that is with the "addBuyable" method. |
| 478 | 477 | * NOTE: does not write! |
| 479 | 478 | * |
| 480 | - * @param DataObject $buyable |
|
| 479 | + * @param BuyableModel $buyable |
|
| 481 | 480 | * @param array $parameters |
| 482 | 481 | * |
| 483 | 482 | * @return OrderItem |
@@ -617,6 +616,7 @@ discard block |
||
| 617 | 616 | * Removes a modifier from the cart. |
| 618 | 617 | * |
| 619 | 618 | * @param Int/ OrderModifier |
| 619 | + * @param integer $modifier |
|
| 620 | 620 | * |
| 621 | 621 | * @return bool |
| 622 | 622 | */ |
@@ -759,6 +759,7 @@ discard block |
||
| 759 | 759 | * sets region in order so that modifiers can be recalculated, etc... |
| 760 | 760 | * |
| 761 | 761 | * @param int | String - $regionID you can use the ID or the code. |
| 762 | + * @param integer $regionID |
|
| 762 | 763 | * |
| 763 | 764 | * @return bool |
| 764 | 765 | **/ |
@@ -901,7 +902,7 @@ discard block |
||
| 901 | 902 | /** |
| 902 | 903 | * Stores a message that can later be returned via ajax or to $form->sessionMessage();. |
| 903 | 904 | * |
| 904 | - * @param $message - the message, which could be a notification of successful action, or reason for failure |
|
| 905 | + * @param string $message - the message, which could be a notification of successful action, or reason for failure |
|
| 905 | 906 | * @param $type - please use good, bad, warning |
| 906 | 907 | */ |
| 907 | 908 | public function addMessage($message, $status = 'good') |
@@ -927,7 +928,7 @@ discard block |
||
| 927 | 928 | /** |
| 928 | 929 | * Gets an existing order item based on buyable and passed parameters. |
| 929 | 930 | * |
| 930 | - * @param DataObject $buyable |
|
| 931 | + * @param BuyableModel $buyable |
|
| 931 | 932 | * @param array $parameters |
| 932 | 933 | * |
| 933 | 934 | * @return OrderItem | null |
@@ -953,7 +954,7 @@ discard block |
||
| 953 | 954 | /** |
| 954 | 955 | * Removes parameters that aren't in the default array, merges with default parameters, and converts raw2SQL. |
| 955 | 956 | * |
| 956 | - * @param array $parameters |
|
| 957 | + * @param array $params |
|
| 957 | 958 | * |
| 958 | 959 | * @return cleaned array |
| 959 | 960 | */ |
@@ -215,6 +215,7 @@ discard block |
||
| 215 | 215 | * Returns the "new order" link. |
| 216 | 216 | * |
| 217 | 217 | * @param int | String $orderID - not used in CartPage |
| 218 | + * @param integer $orderID |
|
| 218 | 219 | * |
| 219 | 220 | * @return string (URLSegment) |
| 220 | 221 | */ |
@@ -227,6 +228,7 @@ discard block |
||
| 227 | 228 | * Returns the "copy order" link. |
| 228 | 229 | * |
| 229 | 230 | * @param int | String $orderID - not used in CartPage |
| 231 | + * @param integer $orderID |
|
| 230 | 232 | * |
| 231 | 233 | * @return string (URLSegment) |
| 232 | 234 | */ |
@@ -240,7 +242,7 @@ discard block |
||
| 240 | 242 | * |
| 241 | 243 | * @param int|string $orderID ID of the order |
| 242 | 244 | * |
| 243 | - * @return int | String (URLSegment) |
|
| 245 | + * @return string | String (URLSegment) |
|
| 244 | 246 | */ |
| 245 | 247 | public static function get_order_link($orderID) |
| 246 | 248 | { |
@@ -382,6 +384,10 @@ discard block |
||
| 382 | 384 | * @todo: check if we need this....! |
| 383 | 385 | **/ |
| 384 | 386 | private $message = ''; |
| 387 | + |
|
| 388 | + /** |
|
| 389 | + * @param string $s |
|
| 390 | + */ |
|
| 385 | 391 | public static function set_message($s) |
| 386 | 392 | { |
| 387 | 393 | $sessionCode = EcommerceConfig::get('CartPage_Controller', 'session_code'); |
@@ -648,7 +654,7 @@ discard block |
||
| 648 | 654 | } |
| 649 | 655 | |
| 650 | 656 | /** |
| 651 | - * @return string |
|
| 657 | + * @return DBField |
|
| 652 | 658 | **/ |
| 653 | 659 | public function Message() |
| 654 | 660 | { |
@@ -162,6 +162,7 @@ discard block |
||
| 162 | 162 | * |
| 163 | 163 | * @param string - $currentStep is the step that has just been actioned.... |
| 164 | 164 | * @param bool - $doPreviousInstead - return previous rather than next step |
| 165 | + * @param string $currentStep |
|
| 165 | 166 | * |
| 166 | 167 | * @return string (URLSegment) |
| 167 | 168 | */ |
@@ -688,7 +689,7 @@ discard block |
||
| 688 | 689 | /** |
| 689 | 690 | * returns the percentage of steps done (0 - 100). |
| 690 | 691 | * |
| 691 | - * @return int |
|
| 692 | + * @return double |
|
| 692 | 693 | */ |
| 693 | 694 | public function PercentageDone() |
| 694 | 695 | { |
@@ -333,7 +333,7 @@ |
||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | /** |
| 336 | - * @return array ???? |
|
| 336 | + * @return string ???? |
|
| 337 | 337 | */ |
| 338 | 338 | public function AllTests() |
| 339 | 339 | { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @param SS_HTTPRequest |
| 24 | 24 | * |
| 25 | - * @return HTML |
|
| 25 | + * @return EcommerceDatabaseAdmin |
|
| 26 | 26 | **/ |
| 27 | 27 | public function ecommerce(SS_HTTPRequest $request) |
| 28 | 28 | { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * Tells us the version of e-commerce in use. |
| 24 | 24 | * |
| 25 | - * @return int |
|
| 25 | + * @return double |
|
| 26 | 26 | */ |
| 27 | 27 | public function Version() |
| 28 | 28 | { |
@@ -47,11 +47,11 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Builds json object to be returned via ajax. |
| 49 | 49 | * |
| 50 | - * @param array $message (Type, Message) |
|
| 50 | + * @param array $messages (Type, Message) |
|
| 51 | 51 | * @param array $additionalData |
| 52 | 52 | * @param string $status |
| 53 | 53 | * |
| 54 | - * @return HEADER + JSON |
|
| 54 | + * @return string + JSON |
|
| 55 | 55 | **/ |
| 56 | 56 | public function ReturnCartData(array $messages = array(), array $additionalData = null, $status = 'success') |
| 57 | 57 | { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | /** |
| 14 | 14 | * @param string $status the status to return |
| 15 | - * @param string $message the message to return with the retur |
|
| 15 | + * @param string $messages the message to return with the retur |
|
| 16 | 16 | * @param null | Array $data, that should be included |
| 17 | 17 | */ |
| 18 | 18 | public function ReturnCartData(array $messages = array(), array $additionalData = null, $status = 'success') |
@@ -7,6 +7,9 @@ |
||
| 7 | 7 | 'read' => 'ShopAdmin', |
| 8 | 8 | ); |
| 9 | 9 | |
| 10 | + /** |
|
| 11 | + * @param OrderEmailRecord $email |
|
| 12 | + */ |
|
| 10 | 13 | public static function review_link($email) |
| 11 | 14 | { |
| 12 | 15 | return Config::inst()->get('OrderEmailRecord_Review', 'url_segment').'/read/'.$email->ID; |