function productUrl(id, sku) {
  const query = sku ? `?sku=${sku}` : '';
  return `/product/${id}${query}`;
}
Generates the URL for a product.
@param {string} id - The ID of the product.
@param {string} sku - The SKU of the product variant.
@returns {string} The URL of the product.