Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • SharedShoppingCartDeleter
  • SharedShoppingCartReader
  • SharedShoppingCartRepository
  • SharedShoppingCartService
  • SharedShoppingCartSettings
  • SharedShoppingCartWriter

Class SharedShoppingCartRepository

Class SharedShoppingCartRepository

SharedShoppingCartRepository implements SharedShoppingCartRepositoryInterface
Package: SharedShoppingCart
Category: System
Located at Services/Core/ShoppingCart/SharedShoppingCartRepository.inc.php

Methods summary

public
# __construct( SharedShoppingCartReader $reader, SharedShoppingCartWriter $writer, SharedShoppingCartDeleter $deleter )

SharedShoppingCartRepository constructor.

SharedShoppingCartRepository constructor.

Parameters

$reader
Instance to fetch shared shopping cart data.
$writer
Instance to insert and update shared shopping cart data.
$deleter
Instance to remove shared shopping cart data.
public string
# storeShoppingCart( StringType $jsonShoppingCart, IdType $userId = null )

Stores the cart and returns the hash

Stores the cart and returns the hash

Parameters

$jsonShoppingCart
JSON representation of the cart
$userId
The user ID of the user who is sharing the cart

Returns

string
The hash of the cart

Throws

InvalidArgumentException

Implementation of

SharedShoppingCartRepositoryInterface::storeShoppingCart()
public string
# getShoppingCart( StringType $shoppingCartHash )

Gets the content in JSON format of the shopping cart corresponding to the hash

Gets the content in JSON format of the shopping cart corresponding to the hash

Parameters

$shoppingCartHash
Hash of the shopping cart

Returns

string
JSON representation of the shopping cart

Implementation of

SharedShoppingCartRepositoryInterface::getShoppingCart()
public
# deleteShoppingCartsOlderThan( DateTime $expirationDate )

Deletes all shared shopping carts that are expired

Deletes all shared shopping carts that are expired

Parameters

$expirationDate
All shared shopping carts older than that date are expired

Implementation of

SharedShoppingCartRepositoryInterface::deleteShoppingCartsOlderThan()

Properties summary

protected SharedShoppingCartReader $reader
#
protected SharedShoppingCartWriter $writer
#
protected SharedShoppingCartDeleter $deleter
#
API documentation generated by ApiGen