public function CartInterface::addItem in Ubercart 8.4
Adds an item to the cart.
Parameters
int $nid: Node ID to add to cart.
int $qty: Quantity to add to cart.
array $data: Array of module-specific data to add to cart.
bool $msg: Whether to display a message upon adding an item to the cart.
Return value
\Drupal\Core\Url A URL to redirect to.
1 method overrides CartInterface::addItem()
- Cart::addItem in uc_cart/
src/ Cart.php - Adds an item to the cart.
File
- uc_cart/
src/ CartInterface.php, line 55
Class
- CartInterface
- Represents a shopping cart.
Namespace
Drupal\uc_cartCode
public function addItem($nid, $qty = 1, array $data = NULL, $msg = TRUE);