rerobe-js-orm 4.1.4 → 4.1.5
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.
|
@@ -675,7 +675,7 @@ class ReRobeProductHelpers {
|
|
|
675
675
|
return 'unisex';
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
return Object.assign(Object.assign(Object.assign({ id: productObj.handle, title: productObj.metaDataTitle || productObj.title, description: productObj.
|
|
678
|
+
return Object.assign(Object.assign(Object.assign({ id: productObj.handle, title: productObj.metaDataTitle || productObj.title, description: productObj.description || '', link: `${primaryDomain}/products/${productObj.handle}`, image_link: productObj.imageUrls && productObj.imageUrls.length > 0 ? productObj.imageUrls[0] : '', price: `${Number(productObj.price).toFixed(2)} ${currency}` }, (productObj.costPerItem && {
|
|
679
679
|
cost_of_goods_sold: `${Number(productObj.costPerItem).toFixed(2)} ${currency}`,
|
|
680
680
|
})), (productObj.isOnSale === 'yes' &&
|
|
681
681
|
productObj.salePrice &&
|
package/lib/models/Product.js
CHANGED
|
@@ -474,7 +474,7 @@ class Product extends Base_1.default {
|
|
|
474
474
|
return this.utilities.capitalizeString(result).trim();
|
|
475
475
|
}
|
|
476
476
|
autoCreateMetaDataTitle() {
|
|
477
|
-
const { color, productType, productStyle, brand, size } = this.filterAttributes;
|
|
477
|
+
const { color, productType, productStyle, brand, size, standardSize } = this.filterAttributes;
|
|
478
478
|
// Singularize the product type
|
|
479
479
|
const singularProductType = this.utilities.singularizeProductType(productType);
|
|
480
480
|
// Function to build the title
|
|
@@ -494,7 +494,9 @@ class Product extends Base_1.default {
|
|
|
494
494
|
// For non-'Vintage' brands, append "by ${brand.trim()}"
|
|
495
495
|
const titleWithBrand = !brand.includes('Vintage') ? `${baseTitle} by ${brand.trim()}` : baseTitle;
|
|
496
496
|
// Add size to the end of the title if it's available
|
|
497
|
-
return size && size.trim() !== ''
|
|
497
|
+
return size && size.trim() !== ''
|
|
498
|
+
? `${titleWithBrand}, Size ${standardSize ? standardSize.trim() : size.trim()}`
|
|
499
|
+
: titleWithBrand;
|
|
498
500
|
};
|
|
499
501
|
// Generate the result
|
|
500
502
|
let result = buildTitle(true);
|