Abuja Digital Studio · Est. 2018
Start a Project
DocsOAmazonDisplay types and rendering
Reference

Display types and rendering

OAmazonorravo.com/docs/oamazon/displays

Display types and rendering

OAmazon ships 15 display types defined in OAM_Display::TYPES. Each renders one or more cached products from oam_products.

Type keyDescription
cardProduct Card (image + title + price + CTA)
compactCompact Card (slim variant)
buttonMini Button (CTA only)
comparisonComparison Table (multi-product, side-by-side)
rankedRanked List (1, 2, 3 with ranking badges)
gridBestseller Grid (multi-product grid)
featureFeature Box (large image, prominent CTA)
price_alertPrice Alert Strip (price + savings badge)
image_boxImage Box (image-led card)
shelfProduct Shelf (horizontal scroll)
editorialEditorial Grid (image + headline + body)
dealDeal Box (savings badge + CTA)
quoteQuote Box (pull-quote layout)
tableAffiliate Table (data-dense table)
widgetSidebar Widget (compact, sidebar-optimised)

Styles

Every type supports 3 styles via OAM_Display::STYLES:

  • light (default)
  • dark
  • orravo (brand-tinted)

Saved displays

Saved displays live in oam_displays. Each row stores display_type, display_style, asins (comma-separated), and settings_json (per-type configuration).

php$id = OAM_Display::save_display([
    'name'          => 'Top Headphones 2026',
    'display_type'  => 'ranked',
    'display_style' => 'dark',
    'asins'         => 'B08N5WRWNW,B09JQMJHX,B07YFGT5NP',
    'settings'      => [ 'show_ratings' => true, 'show_savings' => true ],
]);

echo OAM_Display::render( $id );

Templates live in frontend/templates/<type>.php. Each template receives $products, $style, $settings, $link_id, $disp_id, $locale, $asins.

Helpers

phpOAM_Display::star_html( float $rating );           // 5-star unicode rendering
OAM_Display::availability_badge( string $avail );  // In Stock / Out of Stock pill
OAM_Display::savings_badge( float $amt );          // Save $X badge
OAM_Display::stale_notice();                       // 'Price may vary' disclaimer

Price and availability data is cached for 24 hours. The stale-price notice is added automatically when the cache is over the freshness threshold.

Display types and rendering · OAmazon Docs | Orravo