Customfield "Date" is displaying the date of the actual day if nothing is set.

Started by be, September 10, 2013, 19:42:38 PM

Previous topic - Next topic

be

Hi,
I used a customfield Date for displaying a puplishingdate for my products.
But now I have the problem that if I have set no date in the customfield I got displayed
the date of the actual day in the tenplate.
What can I do to display a textstring or something other if noc date is set in this customfield?

Best regrads

Maxim Pishnyak

Why you didn't use native publishing date of a product?
Quote from: be on September 10, 2013, 19:42:38 PM
What can I do to display a textstring or something other if noc date is set in this customfield?
Assign your custom field to a specific positions - 'date'. Then use typical construction available in default.php (productdetails) for this position
    if (!empty($this->product->customfieldsSorted['ontop'])) {
$this->position = 'date';
echo $this->loadTemplate('customfields');
    } // Product Custom ontop end
    else ........ put your code here
    ?>
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart