ng-easycommerce 0.0.525 → 0.0.526

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.
package/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ # version 0.0.526
2
+ - se añaden etiquetas meta en product-details para probar utm
3
+
1
4
  # version 0.0.525
2
5
  - se hace un cambio para obtener el section de forma correcta cuando en la url se usa utm en los bloques
3
6
  # version 0.0.524
@@ -10058,7 +10058,7 @@
10058
10058
  };
10059
10059
  var ProductDetailEcComponent = /** @class */ (function (_super) {
10060
10060
  __extends$v(ProductDetailEcComponent, _super);
10061
- function ProductDetailEcComponent(productService, consts, activedRoute, cartService, optionsService, productsService, analyticsService, router, toastrService) {
10061
+ function ProductDetailEcComponent(productService, consts, activedRoute, cartService, optionsService, productsService, analyticsService, router, toastrService, meta) {
10062
10062
  var _this = _super.call(this) || this;
10063
10063
  _this.productService = productService;
10064
10064
  _this.consts = consts;
@@ -10069,6 +10069,7 @@
10069
10069
  _this.analyticsService = analyticsService;
10070
10070
  _this.router = router;
10071
10071
  _this.toastrService = toastrService;
10072
+ _this.meta = meta;
10072
10073
  _this.show = false;
10073
10074
  _this.quantity = 1;
10074
10075
  _this.breadcrumb = [];
@@ -10137,6 +10138,19 @@
10137
10138
  _this.product = res;
10138
10139
  window.scroll(0, 0);
10139
10140
  _this.breadcrumb = _this.optionsService.getBreadcrumb(_this.product.category);
10141
+ if (_this.product.name) {
10142
+ _this.meta.removeTag('name="og:title"');
10143
+ _this.meta.removeTag('name="og:description"');
10144
+ _this.meta.removeTag('name="og:image"');
10145
+ _this.meta.removeTag('name="og:type"');
10146
+ _this.meta.removeTag('name="og:url"');
10147
+ // console.log(this.product);
10148
+ _this.meta.addTag({ name: 'og:title', content: _this.product.name });
10149
+ _this.meta.addTag({ name: 'og:description', content: _this.product.description });
10150
+ _this.meta.addTag({ name: 'og:image', content: _this.consts.mediaUrl() + _this.product.picturesdefault[0] });
10151
+ _this.meta.addTag({ name: 'og:type', content: 'product' });
10152
+ _this.meta.addTag({ name: 'og:url', content: window.location.href });
10153
+ }
10140
10154
  });
10141
10155
  _this.productService.product$.pipe(operators.filter(function (data) { return data && data.id && data.id != 0; })).subscribe(function (productParam) {
10142
10156
  _this.analyticsService.callEvent('view_item', __assign$o(__assign$o({}, productParam), { currency: _this.consts.currency.code }));
@@ -10161,7 +10175,8 @@
10161
10175
  { type: ProductsService },
10162
10176
  { type: AnalyticsService },
10163
10177
  { type: router.Router },
10164
- { type: ToastService }
10178
+ { type: ToastService },
10179
+ { type: platformBrowser.Meta }
10165
10180
  ]; };
10166
10181
  __decorate$13([
10167
10182
  core.ViewChild('contact')