Beispiel #1
0
/**
 * Prints seller info in product single page
 *
 * @global WC_Product $product
 * @param type $val
 */
function dokan_product_seller_tab($val)
{
    global $product;
    $author = get_user_by('id', $product->post->post_author);
    $store_info = dokan_get_store_info($author->ID);
    ?>
    <h2><?php 
    _e('Seller Information', 'dokan');
    ?>
</h2>
    <ul class="list-unstyled">

        <?php 
    if (!empty($store_info['store_name'])) {
        ?>
            <li class="store-name">
                <span><?php 
        _e('Store Name:', 'dokan');
        ?>
</span>
                <span class="details">
                    <?php 
        echo esc_html($store_info['store_name']);
        ?>
                </span>
            </li>
        <?php 
    }
    ?>

        <li class="seller-name">
            <span>
                <?php 
    _e('Seller:', 'dokan');
    ?>
            </span>

            <span class="details">
                <?php 
    printf('<a href="%s">%s</a>', dokan_get_store_url($author->ID), $author->display_name);
    ?>
            </span>
        </li>
        <?php 
    if (!empty($store_info['address'])) {
        ?>
            <li class="store-address">
                <span><?php 
        _e('Address:', 'dokan');
        ?>
</span>
                <span class="details">
                    <?php 
        echo esc_html($store_info['address']);
        ?>
                </span>
            </li>
        <?php 
    }
    ?>

        <li class="clearfix">
            <?php 
    dokan_get_readable_seller_rating($author->ID);
    ?>
        </li>
    </ul>

    <?php 
}
                        <a href="mailto:<?php 
    echo antispambot($store_user->user_email);
    ?>
"><?php 
    echo antispambot($store_user->user_email);
    ?>
</a>
                    </li>
                <?php 
}
?>

                <li>
                    <i class="fa fa-star"></i>
                    <?php 
dokan_get_readable_seller_rating($store_user->ID);
?>
                </li>
            </ul>

            <?php 
if ($social_fields) {
    ?>
                <ul class="store-social">
                    <?php 
    foreach ($social_fields as $key => $field) {
        ?>
                        <?php 
        if (isset($store_info['social'][$key]) && !empty($store_info['social'][$key])) {
            ?>
                            <li>
Beispiel #3
0
        <span class="details">
            <?php 
printf('<a href="%s">%s</a>', dokan_get_store_url($author->ID), $author->display_name);
?>
        </span>
    </li>
    <?php 
if (!empty($store_info['address'])) {
    ?>
        <li class="store-address">
            <span><b><?php 
    _e('Address:', 'dokan');
    ?>
</b></span>
            <span class="details">
                <?php 
    echo dokan_get_seller_address($author->ID);
    ?>
            </span>
        </li>
    <?php 
}
?>

    <li class="clearfix">
        <?php 
dokan_get_readable_seller_rating($author->ID);
?>
    </li>
</ul>