@lancom/shared 0.0.102 → 0.0.103

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.
Files changed (2) hide show
  1. package/nuxt.config.js +13 -1
  2. package/package.json +1 -1
package/nuxt.config.js CHANGED
@@ -122,11 +122,23 @@ module.exports = (config, axios) => ({
122
122
  'g:product_type': { _text: `Home > Products > ${product.productType.name}`, },
123
123
  'g:is_bundle': { _text: product.prePrint ? 'yes' : 'no' },
124
124
  'g:identifier_exists': sp.gtin ? 'yes' : 'no',
125
- 'g:product_weight': { _text: `${product.weight} kg` }
125
+ 'g:product_weight': { _text: `${product.weight} kg` },
126
+ 'g:shipping_weight': { _text: `${((product.weight || 0) + (product.weight || 0) * 0.05).toFixed(3)} kg` }
126
127
  };
127
128
  if (sp.gtin) {
128
129
  info['g:gtin'] = { _text: sp.gtin || '' };
129
130
  }
131
+ if (product.volume) {
132
+ if (product.volume.length) {
133
+ info['g:shipping_length'] = { _text: `${product.volume.length} cm` };
134
+ }
135
+ if (product.volume.width) {
136
+ info['g:shipping_width'] = { _text: `${product.volume.width} cm` };
137
+ }
138
+ if (product.volume.height) {
139
+ info['g:shipping_height'] = { _text: `${product.volume.height} cm` };
140
+ }
141
+ }
130
142
  return info;
131
143
  })
132
144
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {