Home > widget-integration > TierDiscountModule
TierDiscountModule class
Module for tier discount bundle widgets.
Integrates tier discount functionality into the TAE framework, providing: - Automatic widget initialization from Shopify blocks - Dependency injection for all services - Lazy loading of widgets - Extensibility for shop-specific customizations
Technical Support teams can extend this module to customize initialization or add shop-specific services to the dependency injection container.
Signature:
export declare class TierDiscountModule
Example
Extend to add custom initialization logic:
@Module({
imports: [TierDiscountModule],
providers: [CustomTierDiscountService],
})
class CustomTierDiscountModule extends TierDiscountModule {
protected setupBlockListener() {
this.appService.TAEApp.addRegistryBlockListener((block) => {
if (block.blockType === 'tierDiscount' || block.blockType === 'custom-tier') {
this.onInitBlock(block);
}
});
}
}
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
| |||
|
|
ModuleRefImpl |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Connects the widget controller to the DOM element. Override this method to customize widget connection parameters or add pre-connection logic. | |
|
|
Handles errors during block initialization. Override this method to customize error handling, reporting, or recovery logic. | |
|
|
Initializes tier discount widget on search page Called from tier-discount-search.helper.ts | |
|
|
Called when a tier discount block is initialized. Override this method to customize widget initialization or add shop-specific setup logic. | |
|
|
Parses the widget ID from the block ID. Override this method to customize widget ID extraction logic for different shops or naming conventions. | |
|
|
Sets up the TAE App block listener for tier discount widgets. Override this method to customize block registration logic or support additional block types. |