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

Package DE_EPAGES::Order::Hooks::Shop

React on changing shop relevant data.

Functions

OnAfterUpdateShopFeature
OnBeforeCreateUnityShop
OnBeforePatchUnityShop
OnBeforeUpdateShop
OnFinishShopWizard
OnInsertShop
OnIsUnityMigratable
OnJSONAdvancedLinks
OnRegisterInitialScriptTags
OnSaveNumberFormats
OnUnityViewEmailSettings

OnAfterUpdateShopFeature

Activates the notification about the new feature for the minimum order value.

Syntax
OnAfterUpdateShopFeature($hParams);
Input
$hShopFeature - feature object, used keys are
  • FeatureID - feature id (ref.hash.*)
integer
  • ShopID - shop id | integer
  • MaxValue - maximum feature value | int
  • 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

    OnRegisterInitialScriptTags

    Adds the RegisterSession script tag to the list of script tags that should be registered upon creation of a Unity shop

    Syntax
    OnRegisterInitialScriptTags($hParams);
    Input
    $hParams (ref.hash.*)
    hook parameter
    • Shop - the current Shop - object
    • ScriptTagUrls - list of scrip tag URLs - ref.array

    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

    OnUnityViewEmailSettings

    Triggered by the hook UI_UnityViewEmailSettings. Sets the needed TLE variables to render the legal documents section on the email events settings page.

    Syntax
    OnUnityViewEmailSettings( $hParams );
    Input
    $hParams (ref.hash.*)
    hook arguments, used keys are
    • Servlet - servlet object | object