| 1 | <?php |
||
| 20 | class Bundle |
||
| 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 bundle 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 $variantAttributeIds List of variant-building attribute IDs that identify a specific product |
||
| 35 | * in a selection products |
||
| 36 | * @param array $configAttributeIds 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 $hiddenAttributeIds List of attribute IDs that should be stored along with the product in the order |
||
| 39 | * @param array $customAttributeValues Associative list of attribute IDs and arbitrary values that should be stored |
||
| 40 | * along with the product in the order |
||
| 41 | * @param string $stocktype Unique code of the stock type 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 $variantAttributeIds = array(), |
||
| 84 | |||
| 85 | |||
| 86 | /** |
||
| 87 | * Adds the bundled products to the order product item. |
||
| 88 | * |
||
| 89 | * @param \Aimeos\MShop\Order\Item\Base\Product\Iface $orderBaseProductItem Order product item |
||
| 90 | * @param \Aimeos\MShop\Product\Item\Iface $productItem Bundle product item |
||
| 91 | * @param array $variantAttributeIds List of product variant attribute IDs |
||
| 92 | * @param string $stocktype |
||
| 93 | */ |
||
| 94 | protected function addBundleProducts( \Aimeos\MShop\Order\Item\Base\Product\Iface $orderBaseProductItem, |
||
| 133 | } |
||
| 134 |