Back to Opencart

Class Opencart\System\Library\Cart\Cart

docs/api/Opencart.System.Library.Cart.Cart.html

4.1.0.34.5 KB
Original Source

Namespaces

Classes

Class Opencart[System](http://localhost\opencart-master/docs/api/namespace-Opencart.System.html)\[Library](http://localhost\opencart-master/docs/api/namespace-Opencart.System.Library.html)\[Cart](http://localhost\opencart-master/docs/api/namespace-Opencart.System.Library.Cart.html)\[Cart](http://localhost\opencart-master/docs/api/Opencart.System.Library.Cart.Cart.html)

Class Cart

Located at system\library\cart\cart.php

Methods
`
public

			` | `__construct(Registry $registry)`

Constructor

Constructor

| # | | `

public

			` | `getProducts(): array<int, array<string, mixed>>`

getProducts

getProducts

| # | | `

public

			` | `add(
int $product_id,
int $quantity = 1,
array<mixed> $option = [],
int $subscription_plan_id = 0,
bool $override = false,
float $price = 0,

): void`

Add

Add

| # | | `

public

			` | `update(int $cart_id, int $quantity): void`

Update

Update

| # | | `

public

			` | `has(int $cart_id): bool`

Has

Has

| # | | `

public

			` | `remove(int $cart_id): void`

Remove

Remove

| # | | `

public

			` | `clear(): void`

Clear

Clear

| # | | `

public

			` | `getSubscriptions(): array<int, array<string, mixed>>`

getSubscriptions

getSubscriptions

| # | | `

public

			` | `getWeight(): float`

getWeight

getWeight

| # | | `

public

			` | `getSubTotal(): float`

getSubTotal

getSubTotal

| # | | `

public

			` | `getTaxes(): array<int, float>`

getTaxes

getTaxes

| # | | `

public

			` | `getTotal(): float`

getTotal

getTotal

| # | | `

public

			` | `countProducts(): int`

countProducts

countProducts

| # | | `

public

			` | `hasProducts(): bool`

hadProducts

hadProducts

| # | | `

public

			` | `hasSubscription(): bool`

hasSubscription

hasSubscription

| # | | `

public

			` | `hasStock(): bool`

hasStock

hasStock

| # | | `

public

			` | `hasShipping(): bool`

hasShipping

hasShipping

| # | | `

public

			` | `hasDownload(): bool`

hasDownload

hasDownload

| # |

OpenCart API API documentation generated by ApiGen dev-master