Exemple #1
0
            $_product = wc_get_product($item['product_id']);
        }
        ?>
            <tr>
                <td scope="col" style="text-align:left;"><a href="<?php 
        echo get_edit_post_link($_product->id);
        ?>
"><?php 
        echo $_product->post->post_title;
        ?>
</a>
                 <?php 
        if (isset($item['variations'])) {
            ?>
<small><?php 
            echo yith_ywraq_get_product_meta($item);
            ?>
</small><?php 
        }
        ?>
</td>
                <td scope="col" style="text-align:left;"><?php 
        echo $item['quantity'];
        ?>
</td>
                <td scope="col" style="text-align:left;"><?php 
        echo WC()->cart->get_product_subtotal($_product, $item['quantity']);
        ?>
</td>
            </tr>
        <?php 
Exemple #2
0
    exit;
}
// Exit if accessed directly
echo $email_heading . "\n\n";
echo sprintf(__('You have received a quote request from %s. The request is the following:', 'ywraq'), $raq_data['user_name']) . "\n\n";
echo "****************************************************\n\n";
do_action('yith_ywraq_email_before_raq_table', $raq_data);
echo "\n";
if (!empty($raq_data['raq_content'])) {
    foreach ($raq_data['raq_content'] as $item) {
        if (isset($item['variation_id'])) {
            $product = wc_get_product($item['variation_id']);
        } else {
            $product = wc_get_product($item['product_id']);
        }
        echo $product->post->post_title . ' ' . yith_ywraq_get_product_meta($item, false) . ' | ';
        echo $item['quantity'];
        echo ' ' . WC()->cart->get_product_subtotal($product, $item['quantity']);
        echo "\n";
    }
}
echo "\n****************************************************\n\n";
do_action('yith_ywraq_email_after_raq_table', $raq_data);
if (!empty($raq_data['user_message'])) {
    echo __('Customer message', 'ywraq') . "\n";
    echo $raq_data['user_message'] . "\n\n";
}
echo __('Customer details', 'ywraq') . "\n";
echo __('Name:', 'ywraq');
echo $raq_data['user_name'] . "\n";
echo __('Email:', 'ywraq');