Hi Eva,
and thx a lot for your help ??
just refer to my first structure: it’s the one i already created for the project, but now i’m looking for a more flexible solution, so i’m trying to use plugin, but a working feed has been already created, and the structure is the following (i’ll give you the entire xml/php code, so you can see how the feed is now working: there are custom taxonomies, custom fields, and an “if” selector on the price):
<products>
<?php while(have_posts()) : the_post(); ?>
<offer>
<name><![CDATA[<?php the_title_rss(); ?>]]></name>
<brand><![CDATA[<?php echo do_shortcode(‘[wpv-post-taxonomy type=”product_brand” separator=”;” format=”name” order=”asc”]’); ?>]]></brand>
<description><![CDATA[<?php the_content_rss(); ?>]]></description>
<price><![CDATA[<?php
$sale = get_post_meta( get_the_ID(), ‘_sale_price’, true);
$regular = get_post_meta( get_the_ID(), ‘_regular_price’, true);
if ($sale)
echo $sale;
else
echo $regular;
?>]]></price>
<![CDATA[<?php echo $sku = get_post_meta( get_the_ID(), '_sku', true); ?>]]>
<link><![CDATA[<?php the_permalink_rss(); ?>]]></link>
<stock><![CDATA[<?php echo $stock = get_post_meta( get_the_ID(), ‘_stock’, true); ?>]]></stock>
<categories><![CDATA[<?php echo do_shortcode(‘[wpv-post-taxonomy type=”comparatori” separator=”;” format=”name”]’); ?>]]></categories>
<image><![CDATA[<?php echo do_shortcode(‘[wpv-post-featured-image size=”medium” raw=”true”]’); ?>]]></image>
<shippingcost><![CDATA[7.90]]></shippingcost>
<partnumber><![CDATA[<?php echo $pn = get_post_meta( get_the_ID(), ‘wpcf-codice-produttore’, true); ?>]]></partnumber>
<eancode><![CDATA[<?php echo $ean = get_post_meta( get_the_ID(), ‘wpcf-codice-ean’, true); ?>]]></eancode>
</offer>
<?php endwhile; ?>
</products>
hope this can describe enough the needs ??
thx,
s.