@@ -152,7 +152,7 @@ |
||
| 152 | 152 | /** |
| 153 | 153 | * Returns the frontend controller |
| 154 | 154 | * |
| 155 | - * @return \Aimeos\Controller\Frontend\Order\Iface Frontend controller object |
|
| 155 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 156 | 156 | */ |
| 157 | 157 | protected function getController() |
| 158 | 158 | { |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | /** |
| 129 | 129 | * Returns the frontend controller |
| 130 | 130 | * |
| 131 | - * @return \Aimeos\Controller\Frontend\Service\Iface Frontend controller object |
|
| 131 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 132 | 132 | */ |
| 133 | 133 | protected function getController() |
| 134 | 134 | { |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | /** |
| 141 | 141 | * Returns the frontend controller |
| 142 | 142 | * |
| 143 | - * @return \Aimeos\Controller\Frontend\Stock\Iface Frontend controller object |
|
| 143 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 144 | 144 | */ |
| 145 | 145 | protected function getController() |
| 146 | 146 | { |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | /** |
| 105 | 105 | * Returns the frontend controller |
| 106 | 106 | * |
| 107 | - * @return \Aimeos\Controller\Frontend\Locale\Iface Frontend controller object |
|
| 107 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 108 | 108 | */ |
| 109 | 109 | protected function getController() |
| 110 | 110 | { |
@@ -231,7 +231,7 @@ |
||
| 231 | 231 | /** |
| 232 | 232 | * Returns the frontend controller |
| 233 | 233 | * |
| 234 | - * @return \Aimeos\Controller\Frontend\Customer\Iface Frontend controller object |
|
| 234 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 235 | 235 | * @since 2017.04 |
| 236 | 236 | */ |
| 237 | 237 | protected function getController() |
@@ -150,7 +150,6 @@ |
||
| 150 | 150 | * Adds the delivery/payment service item based on the service ID. |
| 151 | 151 | * |
| 152 | 152 | * @param string $type Service type code like 'payment' or 'delivery' |
| 153 | - * @param string $id|null Unique ID of the service item or null to remove it |
|
| 154 | 153 | * @param array $attributes Associative list of key/value pairs containing the attributes selected or |
| 155 | 154 | * entered by the customer when choosing one of the delivery or payment options |
| 156 | 155 | * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached |
@@ -150,7 +150,6 @@ |
||
| 150 | 150 | * Adds the delivery/payment service item based on the service ID. |
| 151 | 151 | * |
| 152 | 152 | * @param string $type Service type code like 'payment' or 'delivery' |
| 153 | - * @param string $id|null Unique ID of the service item or null to remove it |
|
| 154 | 153 | * @param array $attributes Associative list of key/value pairs containing the attributes selected or |
| 155 | 154 | * entered by the customer when choosing one of the delivery or payment options |
| 156 | 155 | * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached |
@@ -410,16 +410,13 @@ |
||
| 410 | 410 | if( $value instanceof \Aimeos\MShop\Common\Item\Address\Iface ) |
| 411 | 411 | { |
| 412 | 412 | $this->get()->setAddress( $address->copyFrom( $value ), $type ); |
| 413 | - } |
|
| 414 | - else if( is_array( $value ) ) |
|
| 413 | + } else if( is_array( $value ) ) |
|
| 415 | 414 | { |
| 416 | 415 | $this->get()->setAddress( $this->setAddressFromArray( $address, $value ), $type ); |
| 417 | - } |
|
| 418 | - else if( $value === null ) |
|
| 416 | + } else if( $value === null ) |
|
| 419 | 417 | { |
| 420 | 418 | $this->get()->deleteAddress( $type ); |
| 421 | - } |
|
| 422 | - else |
|
| 419 | + } else |
|
| 423 | 420 | { |
| 424 | 421 | $msg = $context->getI18n()->dt( 'controller/frontend', 'Invalid value for address type "%1$s"' ); |
| 425 | 422 | throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $type ) ); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Empties the basket and removing all products, addresses, services, etc. |
| 64 | - * @return void |
|
| 64 | + * @return Base |
|
| 65 | 65 | */ |
| 66 | 66 | public function clear() |
| 67 | 67 | { |
@@ -134,11 +134,6 @@ discard block |
||
| 134 | 134 | * |
| 135 | 135 | * @param string $prodid ID of the base product to add |
| 136 | 136 | * @param integer $quantity Amount of products that should by added |
| 137 | - * @param array $options Possible options are: 'stock'=>true|false and 'variant'=>true|false |
|
| 138 | - * The 'stock'=>false option allows adding products without being in stock. |
|
| 139 | - * The 'variant'=>false option allows adding the selection product to the basket |
|
| 140 | - * instead of the specific sub-product if the variant-building attribute IDs |
|
| 141 | - * doesn't match a specific sub-product or if the attribute IDs are missing. |
|
| 142 | 137 | * @param array $variantAttributeIds List of variant-building attribute IDs that identify a specific product |
| 143 | 138 | * in a selection products |
| 144 | 139 | * @param array $configAttributeIds List of attribute IDs that doesn't identify a specific product in a |
@@ -257,7 +252,7 @@ discard block |
||
| 257 | 252 | /** |
| 258 | 253 | * Returns the frontend controller |
| 259 | 254 | * |
| 260 | - * @return \Aimeos\Controller\Frontend\Basket\Iface Frontend controller object |
|
| 255 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 261 | 256 | */ |
| 262 | 257 | protected function getController() |
| 263 | 258 | { |
@@ -233,8 +233,7 @@ discard block |
||
| 233 | 233 | { |
| 234 | 234 | $this->setAddress( $type, $item->toArray() ); |
| 235 | 235 | $basket->deleteAddress( $type ); |
| 236 | - } |
|
| 237 | - catch( \Exception $e ) |
|
| 236 | + } catch( \Exception $e ) |
|
| 238 | 237 | { |
| 239 | 238 | $logger = $this->getContext()->getLogger(); |
| 240 | 239 | $errors['address'][$type] = $e->getMessage(); |
@@ -264,8 +263,7 @@ discard block |
||
| 264 | 263 | { |
| 265 | 264 | $this->addCoupon( $code ); |
| 266 | 265 | $basket->deleteCoupon( $code, true ); |
| 267 | - } |
|
| 268 | - catch( \Exception $e ) |
|
| 266 | + } catch( \Exception $e ) |
|
| 269 | 267 | { |
| 270 | 268 | $logger = $this->getContext()->getLogger(); |
| 271 | 269 | $errors['coupon'][$code] = $e->getMessage(); |
@@ -314,8 +312,7 @@ discard block |
||
| 314 | 312 | ); |
| 315 | 313 | |
| 316 | 314 | $basket->deleteProduct( $pos ); |
| 317 | - } |
|
| 318 | - catch( \Exception $e ) |
|
| 315 | + } catch( \Exception $e ) |
|
| 319 | 316 | { |
| 320 | 317 | $code = $product->getProductCode(); |
| 321 | 318 | $logger = $this->getContext()->getLogger(); |
@@ -353,8 +350,7 @@ discard block |
||
| 353 | 350 | |
| 354 | 351 | $this->addService( $type, $item->getServiceId(), $attributes ); |
| 355 | 352 | $basket->deleteService( $type ); |
| 356 | - } |
|
| 357 | - catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically |
|
| 353 | + } catch( \Exception $e ) { ; } // Don't notify the user as appropriate services can be added automatically |
|
| 358 | 354 | } |
| 359 | 355 | } |
| 360 | 356 | |