If price field empty - show a word
Hello Flynax family!
Inside 'add a listing' form we all have the price field. Some of my sellers don't want to share the price of their products so I need to add a command so when the field is left empty , a set word to appear instead of the price.
Could someone help me with the command and the file that I have to edit?
PLEASEEEEE :wacko:
Thank You!
Contact Seller for Pricing - Tpl updates
This is my solution for this code on the listing_details.tpl file.
<!-- price tag -->
{if $price_tag_value > 0}
<div class="price-tag" id="df_field_price"><span>{$price_tag_value}</span> {if $listing_data.sale_rent == 2}/ {$listing.common.Fields.time_frame.value}{/if}</div>
{else}
<div class="price-tag" id="df_field_price"><span>Contact Seller For Pricing</span></div>
{/if}
<!-- price tag end -->
Only generally tested... use at your own risk. ; - )
Update: I have found several other locations needing update.
Ad Listing Pages (not details)
Featured Ads
etc etc... I am working on hunting these down now and correcting, I will post when I figure them out.
If you find other locations, let me know.
::update with more locations altered::
Featured Items (for some reason using the value > 0 did not work here, so I just let it test for blank or not blank)
/template/blocks/featured_item.tpl
{if $featured_listing.fields[$config.price_tag_field].value }
<div>
<span>{$featured_listing.fields[$config.price_tag_field].value}</span>
{if $featured_listing.sale_rent == 2}/ {$featured_listing.fields.time_frame.value}{/if}
</div>
{else}
<div>
<span>Contact For Pricing</span>
</div>
{/if}
Listing Page (list of ads, not detail, only for blank prices, not 0.00)
/template/blocks/listing.tpl
{if $listing.fields[$config.price_tag_field].value}
<span class="price-tag">
<span>{$listing.fields[$config.price_tag_field].value}</span>
{if $listing.sale_rent == 2}/ {$listing.fields.time_frame.value}{/if}
</span>
{else}
<span class="price-tag">
<span>Contact Seller For Pricing</span>
</span>
{/if}