I am currently using a plugin called Web Directory 2.0
I am also using a the Nice PayPal Button Lite plugin for payment. The short code is [nicepaypallite name="TITLE" amount="PRICE"]. I am trying to pull the title and the price values from the Web Directory 2.0.
This is the basic loop. It checks the category, and if it is in one of the tour package categories(using the same plugin for different section), it adds the paypal button. This keeps it from adding to the Listings pages(other section). It pulls the title, but does not currently have a price.
//Code Start
<?php
$terms = get_the_terms( $post->ID , 'w2dc-category' );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'w2dc-category' );
$Category = $term->name;
$VIPtours = 'VIP Tours';
$GuidedTours = 'Guided Tours';
$Tours = 'Self Guided Tours';
if ($Category == $VIPtours) echo do_shortcode('[nicepaypallite name="' . get_the_title() . ' " amount="12.50"]');
else if($Category == $GuidedTours) echo do_shortcode('[nicepaypallite name="' . get_the_title() . ' " amount="12.50"]');
else if($Category == $Tours) echo do_shortcode('[nicepaypallite name="' . get_the_title() . ' " amount="12.50"]');
}
?>
//Code End
This will pull the general string of the price
//Code Start
<?php echo $listing->getContentField(9)->renderOutput($listing); ?>
//Code End
9 is the number of the content field. The above basically renders this below, which is from the price_output.tpl.php
//Code Start
<div class="w2dc_field w2dc_field_output_block w2dc_field_output_block_<? echo $content_field->id; ?>">
<?php if ($content_field->icon_image): ?>
<img class="w2dc_field_icon" src="<?php echo W2DC_FIELDS_ICONS_URL; ?><?php echo $content_field->icon_image; ?>" />
<?php endif; ?>
<?php if (!$content_field->is_hide_name): ?>
<span class="w2dc_field_name"><?php echo $content_field->name?>:</span>
<?php endif; ?>
<span class="w2dc_field_content">
<?php echo $content_field->currency_symbol; ?> <?php echo $formatted_price; ?>
</span>
</div>
//Code End
What I need is basically the formatted price, but I can't find a way to target that specific value. Any help would be greatly appreciated!