case 'phone': $d = $ctx['entity']; $phone_url = $site . '/phone/' . $d->slug; // Breadcrumb $graph[] = [ '@type' => 'BreadcrumbList', '@id' => $phone_url . '#breadcrumb', 'itemListElement' => [ ['@type'=>'ListItem','position'=>1,'name'=>'Home','item'=>$site . '/'], ['@type'=>'ListItem','position'=>2,'name'=>'Brands','item'=>$site . '/brands'], ['@type'=>'ListItem','position'=>3,'name'=>$d->brand_name,'item'=>$site . '/brand/' . $d->brand_slug], ['@type'=>'ListItem','position'=>4,'name'=>$d->model], ], ]; // Product $product = [ '@type' => 'Product', '@id' => $phone_url . '#product', 'name' => $d->brand_name . ' ' . $d->model, 'url' => $phone_url, 'sku' => $d->slug, 'mpn' => $d->slug, 'description' => ryv_trim_desc($d->meta_description ?: ryv_first_words($d->about_content, 60), 300), 'brand' => [ '@type' => 'Brand', 'name' => $d->brand_name, 'url' => $site . '/brand/' . $d->brand_slug, ], ]; if ($d->released_date) $product['releaseDate'] = $d->released_date; if ($d->category_name) $product['category'] = $d->category_name; if ($d->image_url) { $product['image'] = [[ '@type' => 'ImageObject', 'url' => $d->image_url, 'caption'=> 'Official image of ' . $d->brand_name . ' ' . $d->model, 'representativeOfPage' => true, ]]; } // Additional specs $specs = [ 'Display Size' => $d->display_size ?? '', 'Display Type' => $d->display_type ?? '', 'Resolution' => $d->display_resolution ?? '', 'Battery Capacity' => $d->battery_capacity ?? '', 'Chipset' => $d->chipset ?? '', 'CPU' => $d->cpu ?? '', 'GPU' => $d->gpu ?? '', 'RAM' => $d->ram_available ?? '', 'Storage' => $d->storage_available ?? '', 'Main Camera' => $d->camera_main ?? '', 'Selfie Camera' => $d->camera_selfie ?? '', 'Operating System' => $d->platform_os ?? '', 'Weight' => $d->weight ?? '', 'Dimensions' => $d->dimensions ?? '', 'SIM Slot' => $d->sim_slot ?? '', 'Connectivity' => $d->connectivity ?? '', 'Sensors' => $d->sensors ?? '', 'Colors' => $d->colors_available ?? '', ]; $props = []; foreach ($specs as $name => $value) { $value = trim((string)$value); if ($value !== '') { $props[] = ['@type'=>'PropertyValue','name'=>$name,'value'=>$value]; } } if ($props) $product['additionalProperty'] = $props; // Related devices $related = ryv_related_devices($d->brand_id, $d->id, 3); if ($related) { $similar = []; foreach ($related as $r) { $similar[] = [ '@type' => 'Product', 'name' => $r->model, 'url' => $site . '/phone/' . $r->slug, ]; } $product['isSimilarTo'] = $similar; } // ============================================================ // FIX (Error #3): Add offers + price for rich result eligibility // Only emitted when a real price > 0 exists (avoids $0.00 flag). // ============================================================ if (!empty($d->price) && is_numeric($d->price) && (float)$d->price > 0) { $currency = apply_filters('ryv_product_price_currency', 'USD', $d); $product['offers'] = [ '@type' => 'Offer', 'url' => $phone_url, 'priceCurrency' => $currency, 'price' => number_format((float)$d->price, 2, '.', ''), 'availability' => 'https://schema.org/InStock', 'priceValidUntil' => gmdate('Y-m-d', strtotime('+1 year')), ]; } $graph[] = $product; // WebPage wrapper $graph[] = [ '@type' => 'WebPage', '@id' => $phone_url . '#webpage', 'url' => $phone_url, 'name' => ryv_filter_document_title(''), 'breadcrumb' => ['@id' => $phone_url . '#breadcrumb'], 'mainEntity' => ['@id' => $phone_url . '#product'], ]; break; Comments on: Deals: vivo X500 Pro and X500 Pro Max come with freebies, the Oppo Find X10 series has a small discount https://ryvonix.com/deals-vivo-x500-pro-and-x500-pro-max-come-with-freebies-the-oppo-find-x10-series-has-a-small-discount/ Know Every Device Before You Buy Sun, 08 Nov 2026 09:45:06 +0000 hourly 1 https://wordpress.org/?v=7.1.4