@lancom/shared 0.0.234 → 0.0.235

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 +8 -3
  2. package/package.json +1 -1
package/nuxt.config.js CHANGED
@@ -257,10 +257,11 @@ module.exports = (config, axios, { raygunClient, publicPath } = {}) => ({
257
257
  const description = `${product.description || product.fabricInfoShort || product.name || ''}`
258
258
  .replace(/ /g, ' ')
259
259
  .replace(/·/, '·');
260
+ const link = `https://${config.HOST_NAME}/${product.brand.alias}/${product.productType.alias}/${product.alias}?color=${sp.color.alias}`;
260
261
  const info = {
261
262
  title: { _text: title },
262
263
  description: { _text: description },
263
- link: { _text: `https://${config.HOST_NAME}/${product.brand.alias}/${product.productType.alias}/${product.alias}?color=${sp.color.alias}` },
264
+ link: { _text: link },
264
265
  'g:id': { _text: sp.SKU },
265
266
  'g:item_group_id': { _text: product.SKU },
266
267
  'g:size': { _text: sp.size.name },
@@ -283,8 +284,7 @@ module.exports = (config, axios, { raygunClient, publicPath } = {}) => ({
283
284
  'g:product_weight': { _text: `${product.weight} kg` },
284
285
  'g:shipping_weight': { _text: `${((product.weight || 0) + (product.weight || 0) * 0.05).toFixed(3)} kg` },
285
286
  'g:quantity': { _text: sp.quantityStock },
286
- 'g:pickup_method': { _text: 'buy' },
287
- 'g:pickup_sla': { _text: 'next day' }
287
+
288
288
  };
289
289
 
290
290
  if (sp.gtin) {
@@ -293,6 +293,11 @@ module.exports = (config, axios, { raygunClient, publicPath } = {}) => ({
293
293
 
294
294
  if (sp.storeCode) {
295
295
  info['g:store_code'] = { _text: sp.storeCode };
296
+ info['g:link_template'] = { _text: `${link}&store=${sp.storeCode}` };
297
+ info['g:pickup_method'] = { _text: 'buy' };
298
+ info['g:pickup_sla'] = { _text: 'next day' };
299
+ } else {
300
+ info['g:pickup_method'] = { _text: 'not_supported' };
296
301
  }
297
302
  if (product.volume) {
298
303
  if (product.volume.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.234",
3
+ "version": "0.0.235",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {