ePages 7.23.0 - DE_EPAGES/Product/Hooks/Shop.pm

Package DE_EPAGES::Product::Hooks::Shop

removes taxclass on declared products of shop which uses removed tax class

Functions

BeforeSetDefaultMobileSFModeAttribute
OnBeforeCreateUnityShop
OnBeforeSaveMobileSFMode
OnBeforeUpdateShop
OnInsertShop
OnSaveNumberFormats

BeforeSetDefaultMobileSFModeAttribute

BeforeSetDefaultMobileSFModeAttribute is triggered, set correct MobileSFMode.

Syntax
BeforeSetDefaultMobileSFModeAttribute( $hParams );
Input
$hParams (ref.hash.*)
hook arguments, used keys are
  • Shop - shop object | object
  • DefaultSFMode - default 0 | integer

OnBeforeCreateUnityShop

OnBeforeCreateUnityShop is triggered, check if the shop has products out of stock or low on stock and activate the related notification

Syntax
OnBeforeCreateUnityShop( $hParams );
Input
$hParams (ref.hash.*)
hook arguments, used keys are
  • Shop - shop object | object

OnBeforeSaveMobileSFMode

OnBeforeSaveMobileSFMode is triggered, check if the shop has the basket feature and set DefaultSFMode value.

Syntax
OnBeforeSaveMobileSFMode( $hParams );
Input
$hParams (ref.hash.*)
hook arguments, used keys are
  • Shop - shop object | object
  • DefaultSFMode - default 0 | integer

OnBeforeUpdateShop

changes tax classes of products if tax matrix of shop was changed. (Hook OBJ_BeforeUpdateShop)

Syntax
OnBeforeUpdateShop( $hParams );
Input
$hParams (ref.hash.*)
primary key of tax class, key is
  • Object - shop - object
  • Values
    • TaxMatrix - tax matrix - object

OnInsertShop

Creates the folders 'ProductTypes' and 'Products' when a new shop is created. (Hook OBJ_InsertShop)

Syntax
OnInsertShop( $hParams );
Input
$hParams (ref.hash.*)
primary key of tax class, key is
  • Object - shop - object

OnSaveNumberFormats

Evaluates the forms 'SaveNumberFormats_Product' and returns its data. Form errors are not thrown directly but passed to the caller.

Syntax
OnSaveNumberFormats( $hParams );
Input
$hParams (ref.hash.*)
form values which are supplied by Form SaveNumberFormats_Product of class Shop.
  • Shop - the current Shop - DE_EPAGES::Shop::API::Object::Shop
  • Form - form object to evaluate - DE_EPAGES::Presentation::API::Form
  • Data - form values to return to caller - ref.hash