ChangedPriceManager
class ChangedPriceManager implements BasicEntityManagerInterface
Class ChangedPriceManager is injected as empire_changed_price_plugin.changed_price_manager service. ChangedPriceManager handles the logic for managed entity.
Traits
Properties
| protected ChangedPriceRepository | $repository | ||
| protected ChangedPriceEventContainer | $eventContainer |
Methods
No description
No description
No description
WishlistManager constructor.
Find all products in watchlist for logged user
Find all products that provided user is watching
Add new watchlist item to logged user
Remove watchlist item that match provided product for logged user
Removing all items from watchlist for provided user
Check if product is already added in watchlist for logged user
Check if price is changed for product(parameter 'oldPrice' in params array) and send notification for user who watch only that product Check if price is changed for product attribute values(iterates over 'oldAttrCost') and send notification for those pav's who's price is changed
Count number of products in watchlist for logged user
No description
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
at line 250
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
at line 48
__construct(ChangedPriceRepository $repository, ChangedPriceEventContainer $eventContainer)
WishlistManager constructor.
at line 59
array|false
getWatchlistForUser()
Find all products in watchlist for logged user
at line 79
array
getWatchlistForUserBackend(int $userId)
Find all products that provided user is watching
at line 95
ChangedPrice
addToWatchlist(int $productId, int $attrValId)
Add new watchlist item to logged user
at line 129
bool
removeProductFromWatchlist(int $productId, int $attrValId)
Remove watchlist item that match provided product for logged user
at line 146
bool
removeAllProductFromWatchlist()
Removing all items from watchlist for provided user
at line 167
mixed
searchProductForFrontend(int $productId, int $attrValId)
Check if product is already added in watchlist for logged user
at line 182
sendNotificationToUser(ProductChangedPriceEvent $event)
Check if price is changed for product(parameter 'oldPrice' in params array) and send notification for user who watch only that product Check if price is changed for product attribute values(iterates over 'oldAttrCost') and send notification for those pav's who's price is changed
at line 221
updateOldPriceForProduct(ChangedPriceUpdateEvent $event)
Update old price field
at line 231
bool|int
countProductsInWatchlist()
Count number of products in watchlist for logged user