| 1 | <?php |
||
| 20 | class Stock |
||
| 21 | extends \Aimeos\Controller\Frontend\Basket\Decorator\Base |
||
|
2 ignored issues
–
show
|
|||
| 22 | implements \Aimeos\Controller\Frontend\Basket\Iface, \Aimeos\Controller\Frontend\Common\Decorator\Iface |
||
|
1 ignored issue
–
show
|
|||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Adds a categorized product to the basket of the user stored in the session. |
||
| 26 | * |
||
| 27 | * @param string $prodid ID of the base product to add |
||
| 28 | * @param integer $quantity Amount of products that should by added |
||
| 29 | * @param array $options Possible options are: 'stock'=>true|false and 'variant'=>true|false |
||
| 30 | * The 'stock'=>false option allows adding products without being in stock. |
||
| 31 | * The 'variant'=>false option allows adding the selection product to the basket |
||
| 32 | * instead of the specific sub-product if the variant-building attribute IDs |
||
| 33 | * doesn't match a specific sub-product or if the attribute IDs are missing. |
||
| 34 | * @param array $variantIds List of variant-building attribute IDs that identify a specific product |
||
| 35 | * in a selection products |
||
| 36 | * @param array $configIds List of attribute IDs that doesn't identify a specific product in a |
||
| 37 | * selection of products but are stored together with the product (e.g. for configurable products) |
||
| 38 | * @param array $hiddenIds List of attribute IDs that should be stored along with the product in the order |
||
| 39 | * @param array $customValues Associative list of attribute IDs and arbitrary values that should be stored |
||
| 40 | * along with the product in the order |
||
| 41 | * @param string $warehouse Unique code of the warehouse to deliver the products from |
||
| 42 | * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available |
||
| 43 | */ |
||
| 44 | public function addProduct( $prodid, $quantity = 1, array $options = array(), array $variantIds = array(), |
||
| 69 | |||
| 70 | |||
| 71 | /** |
||
| 72 | * Edits the quantity of a product item in the basket. |
||
| 73 | * |
||
| 74 | * @param integer $position Position number (key) of the order product item |
||
| 75 | * @param integer $quantity New quantiy of the product item |
||
| 76 | * @param array $options Possible options are: 'stock'=>true|false |
||
| 77 | * The 'stock'=>false option allows adding products without being in stock. |
||
| 78 | * @param string[] $configCodes Codes of the product config attributes that should be REMOVED |
||
| 79 | */ |
||
| 80 | public function editProduct( $position, $quantity, array $options = array(), array $configCodes = array() ) |
||
| 99 | |||
| 100 | |||
| 101 | /** |
||
| 102 | * Returns the highest stock level for the product. |
||
| 103 | * |
||
| 104 | * @param string $prodid Unique ID of the product |
||
| 105 | * @param string $warehouse Unique code of the warehouse |
||
| 106 | * @return integer|null Number of available items in stock (null for unlimited stock) |
||
| 107 | */ |
||
| 108 | protected function getStockLevel( $prodid, $warehouse ) |
||
| 141 | } |
||
| 142 |