Home / Widgets / AR iFrame Snippet 2.0
Duplicate Snippet

Embed Snippet on Your Site

AR iFrame Snippet 2.0

Used for IMP Augmented Reality viewer for Jacuzzi models from Brand 3D

Code Preview
php
<?php
function impDisplayARWrapperIframe() {
    $post_id = get_the_ID();
    $product_ar = get_post_meta($post_id, 'product_ar_iframe', true);
    if(!empty($product_ar))
    {
        $html_code = '<iframe src="https://imp-master-p3d-embed.web.app/'.$product_ar.'?notitle=true" frameBorder="0" width="100%" height="650px"></iframe>';
    }
    else
    {
        $product_ar = get_post_meta($post_id, 'ar_code', true);
        $html_code = '<iframe allowfullscreen width="100%" height="700" frameborder="0" src="https://p3d.in/e/'.$product_ar.'+load+dl,help,share,link,border-hidden"></iframe>';
    }
    return $html_code;
 }
add_shortcode('display-ar-wrapper-iframe', 'impDisplayARWrapperIframe');
function impDisplayARWrapperIframeMassagechairs() {
    $post_id = get_the_ID();
    $product_ar = get_post_meta($post_id, 'product-ar-iframe', true);
    if(!empty($product_ar))
    {
        $html_code = '<iframe class="ar-iframe" src="https://brand3d-ar.web.app/viewer/massagechairs/'.$product_ar.'?notitle=true" frameBorder="0" width="100%" height="700px"></iframe>';
    }
    else
    {
        $product_ar = get_post_meta($post_id, 'ar_code', true);
        $html_code = '<iframe allowfullscreen width="100%" height="700" frameborder="0" src="https://p3d.in/e/'.$product_ar.'+load+dl,help,share,link,border-hidden"></iframe>';
    }
    return $html_code;
 }
add_shortcode('display-ar-wrapper-iframe-massagechairs', 'impDisplayARWrapperIframeMassagechairs');
// Sauna Shortcode
function impDisplayARWrapperIframeSauna() {
    $post_id = get_the_ID();
    $product_ar = get_post_meta($post_id, 'ar_iframe', true);
    if(!empty($product_ar))
    {
        $html_code = '<iframe class="ar-iframe" src="https://brand3d-ar.web.app/viewer/saunas/'.$product_ar.'?notitle=true" frameBorder="0" width="100%" height="700px"></iframe>';
    }
    else
    {
        $product_ar = get_post_meta($post_id, 'ar_code', true);
        $html_code = '<iframe allowfullscreen width="100%" height="700" frameborder="0" src="https://p3d.in/e/'.$product_ar.'+load+dl,help,share,link,border-hidden"></iframe>';
    }
    return $html_code;
 }
add_shortcode('display-ar-wrapper-iframe-sauna', 'impDisplayARWrapperIframeSauna');

Comments

Add a Comment