SilverCart\Model\Order\ShoppingCartPositionNotice
Contains a couple of static methods for shopping cart related notices for the customer. They are manages via the session.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ShoppingCartPositionNotice
{
- // constants
- const NOTICE_CODE_ADJUSTED = 'adjusted';
- const NOTICE_CODE_DELETED = 'deleted';
- const NOTICE_CODE_MAX_QUANTITY_REACHED = 'maxQuantityReached';
- const NOTICE_CODE_REMAINING = 'remaining';
- const NOTICE_TYPE_DANGER = 'danger';
- const NOTICE_TYPE_INFO = 'info';
- const NOTICE_TYPE_SUCCESS = 'success';
- const NOTICE_TYPE_WARNING = 'warning';
- const NOTICE_FA_EXCLAMATION_CIRCLE = 'exclamation-circle';
- const NOTICE_FA_CHECK = 'check';
- const NOTICE_FA_INFO_CIRCLE = 'info-circle';
- const SESSION_KEY_ADDITIONAL_NOTICES = 'SilverCart.AdditionalShoppingCartPositionNotices';
- // methods
- public static void addAllowedNotice()
- public static array getAllowedNotices()
- public static string getNoticeText()
- public static string getNoticeType()
- public static string getNoticeIcon()
- public static void setNotice()
- public static DBHTMLText getNotices()
- public static ArrayList getNoticesList()
- public static bool hasNotices()
- public static bool unsetNotice()
- public static void unsetNotices()
Constants
Name | Value |
---|---|
NOTICE_CODE_ADJUSTED | 'adjusted' |
NOTICE_CODE_DELETED | 'deleted' |
NOTICE_CODE_MAX_QUANTITY_REACHED | 'maxQuantityReached' |
NOTICE_CODE_REMAINING | 'remaining' |
NOTICE_TYPE_DANGER | 'danger' |
NOTICE_TYPE_INFO | 'info' |
NOTICE_TYPE_SUCCESS | 'success' |
NOTICE_TYPE_WARNING | 'warning' |
NOTICE_FA_EXCLAMATION_CIRCLE | 'exclamation-circle' |
NOTICE_FA_CHECK | 'check' |
NOTICE_FA_INFO_CIRCLE | 'info-circle' |
SESSION_KEY_ADDITIONAL_NOTICES | 'SilverCart.AdditionalShoppingCartPositionNotices' |
Methods
public
- addAllowedNotice() — Adds a key value pair of allowed notices.
- getAllowedNotices() — Returns the allowed notices.
- getNoticeIcon() — Returns the notice icon for the given $code.
- getNoticeText() — Holds an array with possible notices that are selected with a $code A notice can have a type: hint, error, warning
- getNoticeType() — Returns the notice type for the given $code.
- getNotices() — Returns the notices for the given position ID.
- getNoticesList() — Returns a list of notices for the given position ID.
- hasNotices() — Returns whether there are notices for the given position ID.
- setNotice() — adds a notice to a position
- unsetNotice() — Deletes only one specific position notice.
- unsetNotices() — deletes all notices of a position.