Module: Oembed

Defined in:
app/services/oembed/faq_provider.rb,
app/services/oembed/image_provider.rb,
app/services/oembed/product_provider.rb,
app/services/oembed/wy_video_provider.rb,
app/services/oembed/liquid_tag_migrator.rb,
app/services/oembed/content_refresh_service.rb

Overview

Custom oEmbed-like provider for WarmlyYours Products
Returns rendered product HTML for embedding in Redactor editor

This allows products to be visually previewed in the editor while maintaining
the ability to edit which product is displayed via context menu.

The output includes:

  • Magazine-style product card with image, title, SKU, price
  • Locale-aware pricing (US/Canada)
  • Add to cart button
  • Product JSON-LD structured data for SEO
  • Data attributes for editing in Redactor

Products are automatically refreshed by the overnight job to:

  • Update prices when they change
  • Hide products that become discontinued or unavailable

Usage:
provider = Oembed::ProductProvider.new
result = provider.get(sku: 'TRT512-KIT', locale: 'en-US')
result[:html] # => Rendered product HTML with embedded JSON-LD schema

Defined Under Namespace

Classes: ContentRefreshService, FaqProvider, ImageProvider, LiquidTagMigrator, ProductProvider, WyVideoProvider