Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress电子商务加载产品(JigoShop)_Php_Wordpress_E Commerce_Product_Jigoshop - Fatal编程技术网

Php Wordpress电子商务加载产品(JigoShop)

Php Wordpress电子商务加载产品(JigoShop),php,wordpress,e-commerce,product,jigoshop,Php,Wordpress,E Commerce,Product,Jigoshop,我有这个剧本 <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> <th>ID product</th> </tr> <?php $query_args = array( 'post_type' => 'product', 'posts_per_page' => 1 ); $loop = new WP_Query( $

我有这个剧本

<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<th>ID product</th>
</tr>
<?php
    $query_args = array( 'post_type' => 'product', 'posts_per_page' => 1 );
    $loop = new WP_Query( $query_args );
    if ( have_posts() ) while ( $loop->have_posts() ) : $loop->the_post(); global $_product;
?>
    <tr>
        <td><?php echo $_product->get_the_ID(); ?></td>
    </tr>
<?php endwhile; ?>
</table>

ID产品
但产品并没有展示出来。我打开了调试(True),但什么也没有得到(没有错误)

谢谢

做了一些更改:

<?php
    global $_product;
    $args = array( 'post_type' => 'product', 'posts_per_page' => 1 );
    $loop = new WP_Query($args);
    while ($loop->have_posts()) : $loop->the_post();
 ?>

    <product>
    <tr>
        <td><ITEM_ID><?php echo the_ID(); ?></ITEM_ID></td>
        <td><PRODUCTNAME><?php the_title_rss() ?></PRODUCTNAME></td>
<td><?php if (get_option('rss_use_excerpt')) : ?>
        <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
        <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php endif; ?></td>
        <td><URL><?php the_permalink_rss() ?></URL></td>
        <td><PRICE_VAT><?php echo jigoshop_price($_product['get_price']); ?></PRICE_VAT></td>
        <td><CATEGORYTEXT><?php echo get_option('product_type') ?></CATEGORYTEXT></td>
        <td><EAN><?php echo the_ID(); ?></EAN></td>
<?php rss_enclosure(); ?>
<?php do_action('rss2_item'); ?>
    </tr></product>
<?php endwhile; ?>
</table>

]]>
]]>
脚本显示价格,但对于所有产品,请给我0,00欧元。为什么?我的臭虫在哪里