ePages 7.27.0 - DE_EPAGES/Order/Hooks/Shop.pm

Package DE_EPAGES::Order::Hooks::Shop

React on changing shop relevant data.

Functions

OnBeforeCreateUnityShop
OnBeforePatchUnityShop
OnBeforeUpdateShop
OnFinishShopWizard
OnInsertShop
OnIsUnityMigratable
OnJSONAdvancedLinks
OnSaveNumberFormats

OnBeforeCreateUnityShop

Triggered by the hook API_BeforeCreateUnityShop. Imports the new orders shop notification and if the shop has unseen orders, activates the notification

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

OnBeforePatchUnityShop

Triggered by the hook API_BeforePatchUnityShop. Updated oder document attributes in case the shop name was changed.

Syntax
OnBeforePatchUnityShop( $hParams );
Input
$hParams
hook parameters
  • Object - shop - object
  • Values - new shop values - ref.hash

OnBeforeUpdateShop

OnBeforeUpdateShop is triggered, change tax matrix at baskets (tax area at lineitemcontainer and tax class at lineitems).

Syntax
OnBeforeUpdateShop( $hParams );
Input
$hParams (ref.hash.*)
hook arguments, used keys are
  • Object
  • Values - without TaxMatrix no action

OnFinishShopWizard

Sets the BCC email addresses for mail type CustomerOrderConfirmation on completion of the shop wizard (Hook CustomerOrderConfirmation).

Syntax
OnFinishShopWizard( $hParams );
Input
$hParams (ref.hash.*)
form values which are supplied by Form ShopWizard of class Shop.
  • Shop - the current Shop - object
  • Data - form values from Shop.ShopWizard - ref.hash

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

OnIsUnityMigratable

Triggered by hook OBJ_IsUnityMigratable. Can add further restrictions for the Unity migration. Checks for an order within the last 30 days.

Syntax
OnIsUnityMigratable($hParams);
Input
$hParams (ref.hash.*)
hook arguments, used keys are
  • Object - shop object
  • Values - attributes

OnJSONAdvancedLinks

adds a link to to advanced links section in the link picker inside the MBO (Hook OBJ_JSONAdvancedLinks)

Syntax
OnJSONAdvancedLinks( $hParams );
Input
$hParams (ref.hash.*)

  • Object - shop - object
  • Values - attribute values - ref.hash

OnSaveNumberFormats

Evaluates the forms 'SaveNumberFormats_CustomerOrder' and 'SaveNumberFormats_OrderDocument' and returns its data. If the feature 'OrderDocument' is missing, the form 'SaveNumberFormats_OrderDocument' will be omitted. Form errors are not thrown directly but passed to the caller.

Syntax
OnSaveNumberFormats( $hParams );
Input
$hParams (ref.hash.*)
form values which are supplied by Forms SaveNumberFormats_CustomerOrder
and SaveNumberFormats_OrderDocument 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