@colijnit/product 258.1.2 → 258.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,11 +6,13 @@ import { ProductEventService } from '../../service/product-event.service';
6
6
  import { ArticleFullObject } from '@colijnit/articleapi/build/model/article-full-object';
7
7
  import { ProductSettingsService } from '../../service/product-settings.service';
8
8
  import { ExternalSource } from '@colijnit/articleapi/build/model/external-source.bo';
9
+ import { ProductConnectorAdapterService } from '../../service/product-connector-adapter.service';
9
10
  export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
10
11
  iconCache: IconCacheService;
11
12
  private _ioneControllerService;
12
13
  private _appEventService;
13
14
  private _settingsService;
15
+ private _productConnectorAdapterService;
14
16
  readonly icon: typeof IconEnum;
15
17
  addToCartButton: ElementRef;
16
18
  article: ArticleFullObject;
@@ -29,10 +31,11 @@ export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
29
31
  showRelatedPopup: EventEmitter<boolean>;
30
32
  showQuoteButton: boolean;
31
33
  private _quantity;
32
- constructor(iconCache: IconCacheService, _ioneControllerService: ProductConnectorService, _appEventService: ProductEventService, _settingsService: ProductSettingsService);
34
+ constructor(iconCache: IconCacheService, _ioneControllerService: ProductConnectorService, _appEventService: ProductEventService, _settingsService: ProductSettingsService, _productConnectorAdapterService: ProductConnectorAdapterService);
33
35
  ngOnInit(): void;
34
36
  ngOnDestroy(): void;
35
37
  handleAddToCartClick(quantity: number): Promise<void>;
36
38
  handleAddToQuoteClick(quantity: number): Promise<void>;
37
39
  private _getJSONFromArticleObject;
40
+ private _getGeneratedArtDirectly;
38
41
  }
@@ -29,6 +29,7 @@ export declare class ProductConnectorAdapterService implements OnDestroy {
29
29
  getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
30
30
  getJsonConfiguredArticles(configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
31
31
  getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, externalSource?: boolean, showLoader?: boolean, instanceId?: any, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
32
+ getGeneratedArtDirectly(goodId: number, showLoader: boolean): Promise<number>;
32
33
  getGoodIdFromArticleNr(sku: string): Promise<number>;
33
34
  getArticleFullObject(goodId: number, showLoader?: boolean): Promise<ArticleFullObject>;
34
35
  getSuperArticle(id: string, branch?: string): Promise<SuperArticle>;
@@ -33,6 +33,7 @@ export declare class ProductConnectorService implements OnDestroy {
33
33
  getDeliveryDate2(goodId: number): Promise<DeliveryPrognosis>;
34
34
  getSuperArticle(id: string): Promise<SuperArticle>;
35
35
  getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, externalSource?: boolean, showLoader?: boolean, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
36
+ getGeneratedArtDirectly(goodId: number, showLoader?: boolean): Promise<number>;
36
37
  addWebSessionTransactionLine(transactionUuid: string, sku: string, quantity: number): Promise<string>;
37
38
  onShowLoaderChange(showLoader: boolean): void;
38
39
  }
@@ -31,8 +31,8 @@
31
31
  function Version() {
32
32
  this.name = "@colijnit/product";
33
33
  this.description = "Product detail page project for iOne";
34
- this.symVer = "258.1.2";
35
- this.publishDate = "13-6-2025 16:41:13";
34
+ this.symVer = "258.1.4";
35
+ this.publishDate = "23-6-2025 16:38:29";
36
36
  }
37
37
  return Version;
38
38
  }());
@@ -1087,6 +1087,17 @@
1087
1087
  });
1088
1088
  });
1089
1089
  };
1090
+ ProductConnectorAdapterService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
1091
+ return __awaiter(this, void 0, void 0, function () {
1092
+ var _this = this;
1093
+ return __generator(this, function (_a) {
1094
+ return [2 /*return*/, this.articleConnector.getGeneratedArtDirectly(goodId, showLoader).catch(function (messages) {
1095
+ _this._eventService.errorMessage.next(messages);
1096
+ return null;
1097
+ })];
1098
+ });
1099
+ });
1100
+ };
1090
1101
  ProductConnectorAdapterService.prototype.getGoodIdFromArticleNr = function (sku) {
1091
1102
  return __awaiter(this, void 0, void 0, function () {
1092
1103
  var response;
@@ -1304,6 +1315,10 @@
1304
1315
  if (showLoader === void 0) { showLoader = true; }
1305
1316
  return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, externalSource, showLoader, this._instanceId, configuratorStatistics);
1306
1317
  };
1318
+ ProductConnectorService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
1319
+ if (showLoader === void 0) { showLoader = true; }
1320
+ return this._adapterService.getGeneratedArtDirectly(goodId, showLoader);
1321
+ };
1307
1322
  ProductConnectorService.prototype.addWebSessionTransactionLine = function (transactionUuid, sku, quantity) {
1308
1323
  return __awaiter(this, void 0, void 0, function () {
1309
1324
  return __generator(this, function (_a) {
@@ -1337,13 +1352,14 @@
1337
1352
  // this.sku = '104';
1338
1353
  // this.sku = '1000561986';
1339
1354
  // this.sku = '1000567768';
1340
- // this.sku = '1000234793';
1355
+ // this.sku = '1000567767';
1341
1356
  // this.sku = '1066';
1342
1357
  // this.sku = '104';
1343
1358
  // this.sku = "70000107";
1344
1359
  // this.sku = "grover";
1345
1360
  // this.sku = "1000610952";
1346
1361
  // this.sku = "4387";
1362
+ // this.sku = "1000612725";
1347
1363
  this._appEventService = _appEventService;
1348
1364
  this._settingsService = _settingsService;
1349
1365
  this.enableRenderCarousel = false;
@@ -1726,7 +1742,8 @@
1726
1742
  this._ione.getFullArticle(this._sku).then(function (article) {
1727
1743
  _this.article = article;
1728
1744
  if (_this.article) {
1729
- _this.configurable = _this.article.goodType === 'B';
1745
+ _this.configurable = _this.article.goodType === 'B' && (_this.article.isConfigurable || _this.article.isConfigurable === undefined);
1746
+ // this.configurable = this.article.goodType === 'B';
1730
1747
  if (_this.configurable) {
1731
1748
  _this.showAddToCart = false;
1732
1749
  _this.currentView = SelectorType.TwoD;
@@ -1764,7 +1781,7 @@
1764
1781
  ProductPageComponent.decorators = [
1765
1782
  { type: i0.Component, args: [{
1766
1783
  selector: 'app-product-page',
1767
- template: "<ng-container *ngIf=\"settingsLoaded\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n\r\n <app-image-carousel\r\n *ngIf=\"!enableRenderCarousel\"\r\n [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\"\r\n [images]=\"article?.images\"\r\n [showRefresh]=\"configurable && threeD\">\r\n </app-image-carousel>\r\n\r\n <app-render-carousel\r\n *ngIf=\"enableRenderCarousel\"\r\n [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\"\r\n [article]=\"article\">\r\n </app-render-carousel>\r\n\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-configurator\r\n #configurator\r\n class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n </threed-configurator>\r\n </ng-container>\r\n\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\"\r\n [class.show-selections]=\"configuring\"\r\n [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n (onAnswersAvailable)=\"appEventService.onAnswersAvailable.next($event.detail)\"\r\n (onReadyToRender)=\"appEventService.onReadyToRender.next($event.detail)\"\r\n (onRenderImageReceived)=\"appEventService.onRenderImageReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [createFrozenArticle]=\"createFrozenArticle\"\r\n [configuring]=\"configuring\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n (showRelatedPopup)=\"handlePopUpChange($event)\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [goodId]=\"article?.goodId\" (openStockEvent)=\"openStock()\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n [label]=\"'RELATED_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"4\"\r\n [isSmallModus]=\"false\"\r\n [label]=\"'ALTERNATIVE_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"showRelatedProductsPopup\">\r\n <co-product-dialog\r\n [mainArticle]=\"article\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n (closeRelatedPopup)=\"handlePopUpChange($event)\"\r\n >\r\n </co-product-dialog>\r\n\r\n <!-- <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"-->\r\n <!-- [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>-->\r\n </div>\r\n\r\n\r\n </div>\r\n</ng-container>\r\n",
1784
+ template: "<ng-container *ngIf=\"settingsLoaded\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n\r\n <app-image-carousel\r\n *ngIf=\"!enableRenderCarousel\"\r\n [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\"\r\n [images]=\"article?.images\"\r\n [showRefresh]=\"configurable && threeD\">\r\n </app-image-carousel>\r\n\r\n <app-render-carousel\r\n *ngIf=\"enableRenderCarousel\"\r\n [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\"\r\n [article]=\"article\">\r\n </app-render-carousel>\r\n\r\n <ng-container *ngIf=\"settingsLoaded && this.configurable\">\r\n <threed-configurator\r\n #configurator\r\n class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n </threed-configurator>\r\n </ng-container>\r\n\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\"\r\n [class.show-selections]=\"configuring\"\r\n [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n (onAnswersAvailable)=\"appEventService.onAnswersAvailable.next($event.detail)\"\r\n (onReadyToRender)=\"appEventService.onReadyToRender.next($event.detail)\"\r\n (onRenderImageReceived)=\"appEventService.onRenderImageReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [createFrozenArticle]=\"createFrozenArticle\"\r\n [configuring]=\"configuring\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n (showRelatedPopup)=\"handlePopUpChange($event)\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [goodId]=\"article?.goodId\" (openStockEvent)=\"openStock()\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n [label]=\"'RELATED_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"4\"\r\n [isSmallModus]=\"false\"\r\n [label]=\"'ALTERNATIVE_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"showRelatedProductsPopup\">\r\n <co-product-dialog\r\n [mainArticle]=\"article\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n (closeRelatedPopup)=\"handlePopUpChange($event)\"\r\n >\r\n </co-product-dialog>\r\n\r\n <!-- <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"-->\r\n <!-- [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>-->\r\n </div>\r\n\r\n\r\n </div>\r\n</ng-container>\r\n",
1768
1785
  animations: [
1769
1786
  animations.trigger('toggleFullScreen', [
1770
1787
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
@@ -2345,12 +2362,15 @@
2345
2362
  this.fromPrice = this._pricing.retailBasePrice ? this._pricing.retailBasePrice : this._pricing.priceBaseline;
2346
2363
  this.fromLabel = this._pricing.retailBasePrice ? 'PRICE' : 'FROM';
2347
2364
  this.toPrice = undefined;
2365
+ this.toLabel = '';
2348
2366
  }
2349
2367
  else {
2350
- this.fromPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
2351
- this.fromLabel = this._pricing.retailSuggestedPrice ? 'Was' : 'PRICE';
2352
- this.toPrice = this._pricing.retailSuggestedPrice ? this._pricing.retailBasePrice : undefined;
2353
- this.toLabel = this._pricing.retailSuggestedPrice ? 'IS_NOW' : '';
2368
+ var hasSuggested = this._pricing.retailSuggestedPrice !== undefined && this._pricing.retailSuggestedPrice !== null;
2369
+ this.fromPrice = hasSuggested ? this._pricing.retailSuggestedPrice : this._pricing.retailBasePrice;
2370
+ this.fromLabel = hasSuggested ? 'Was' : 'PRICE';
2371
+ // Always set toPrice to base price
2372
+ this.toPrice = this._pricing.retailBasePrice;
2373
+ this.toLabel = hasSuggested ? 'IS_NOW' : 'PRICE';
2354
2374
  }
2355
2375
  this._changeDetector.detectChanges();
2356
2376
  }
@@ -2402,11 +2422,12 @@
2402
2422
  ];
2403
2423
 
2404
2424
  var ProductAddtocartComponent = /** @class */ (function () {
2405
- function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService) {
2425
+ function ProductAddtocartComponent(iconCache, _ioneControllerService, _appEventService, _settingsService, _productConnectorAdapterService) {
2406
2426
  this.iconCache = iconCache;
2407
2427
  this._ioneControllerService = _ioneControllerService;
2408
2428
  this._appEventService = _appEventService;
2409
2429
  this._settingsService = _settingsService;
2430
+ this._productConnectorAdapterService = _productConnectorAdapterService;
2410
2431
  this.icon = IconEnum;
2411
2432
  this.createFrozenArticle = true;
2412
2433
  this.configurable = false;
@@ -2448,40 +2469,52 @@
2448
2469
  };
2449
2470
  ProductAddtocartComponent.prototype.handleAddToCartClick = function (quantity) {
2450
2471
  return __awaiter(this, void 0, void 0, function () {
2451
- var article, article, article;
2472
+ var article, generatedGoodId, articleFull, article, article, article;
2452
2473
  return __generator(this, function (_a) {
2453
2474
  switch (_a.label) {
2454
2475
  case 0:
2455
- if (!this.createFrozenArticle) return [3 /*break*/, 7];
2456
- if (!(this.article.goodType === 'B')) return [3 /*break*/, 2];
2476
+ if (!this.createFrozenArticle) return [3 /*break*/, 11];
2477
+ if (!(this.article.goodType === 'B')) return [3 /*break*/, 6];
2478
+ if (!this.article.isConfigurable) return [3 /*break*/, 2];
2457
2479
  return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
2458
2480
  case 1:
2459
2481
  article = _a.sent();
2460
2482
  if (article) {
2461
2483
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2462
2484
  }
2463
- return [3 /*break*/, 6];
2464
- case 2:
2485
+ return [3 /*break*/, 5];
2486
+ case 2: return [4 /*yield*/, this._getGeneratedArtDirectly(this.article.goodId)];
2487
+ case 3:
2488
+ generatedGoodId = _a.sent();
2489
+ if (!generatedGoodId) return [3 /*break*/, 5];
2490
+ return [4 /*yield*/, this._productConnectorAdapterService.getArticleFullObject(generatedGoodId, true)];
2491
+ case 4:
2492
+ articleFull = _a.sent();
2493
+ article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(articleFull);
2494
+ this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2495
+ _a.label = 5;
2496
+ case 5: return [3 /*break*/, 10];
2497
+ case 6:
2465
2498
  article = void 0;
2466
- if (!!!this.externalSource) return [3 /*break*/, 4];
2499
+ if (!!!this.externalSource) return [3 /*break*/, 8];
2467
2500
  return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
2468
- case 3:
2501
+ case 7:
2469
2502
  article = _a.sent();
2470
- return [3 /*break*/, 5];
2471
- case 4:
2503
+ return [3 /*break*/, 9];
2504
+ case 8:
2472
2505
  article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
2473
- _a.label = 5;
2474
- case 5:
2506
+ _a.label = 9;
2507
+ case 9:
2475
2508
  if (article) {
2476
2509
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2477
2510
  }
2478
- _a.label = 6;
2479
- case 6: return [3 /*break*/, 8];
2480
- case 7:
2511
+ _a.label = 10;
2512
+ case 10: return [3 /*break*/, 12];
2513
+ case 11:
2481
2514
  article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
2482
2515
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2483
- _a.label = 8;
2484
- case 8: return [2 /*return*/];
2516
+ _a.label = 12;
2517
+ case 12: return [2 /*return*/];
2485
2518
  }
2486
2519
  });
2487
2520
  });
@@ -2520,6 +2553,16 @@
2520
2553
  });
2521
2554
  });
2522
2555
  };
2556
+ ProductAddtocartComponent.prototype._getGeneratedArtDirectly = function (goodId) {
2557
+ return __awaiter(this, void 0, void 0, function () {
2558
+ return __generator(this, function (_a) {
2559
+ switch (_a.label) {
2560
+ case 0: return [4 /*yield*/, this._ioneControllerService.getGeneratedArtDirectly(goodId, true)];
2561
+ case 1: return [2 /*return*/, _a.sent()];
2562
+ }
2563
+ });
2564
+ });
2565
+ };
2523
2566
  return ProductAddtocartComponent;
2524
2567
  }());
2525
2568
  ProductAddtocartComponent.decorators = [
@@ -2533,7 +2576,8 @@
2533
2576
  { type: IconCacheService },
2534
2577
  { type: ProductConnectorService },
2535
2578
  { type: ProductEventService },
2536
- { type: ProductSettingsService }
2579
+ { type: ProductSettingsService },
2580
+ { type: ProductConnectorAdapterService }
2537
2581
  ]; };
2538
2582
  ProductAddtocartComponent.propDecorators = {
2539
2583
  addToCartButton: [{ type: i0.ViewChild, args: ['addtocartbutton', { read: i0.ElementRef },] }],