| Server IP : 172.67.191.97 / Your IP : 104.23.243.197 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/idiomas/components/com_dpcalendar/layouts/schema/ |
Upload File : |
<?php
/**
* @package DPCalendar
* @copyright Copyright (C) 2017 Digital Peak GmbH. <https://www.digital-peak.com>
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
use Joomla\CMS\Factory;
\defined('_JEXEC') or die();
$event = $displayData['event'];
$prices = (array)$event->prices !== [] ? (array)$event->prices : ['prices0' => (object)['value' => 0, 'label' => '', 'description' => '', 'currency' => '']];
?>
<div itemprop="offers" itemtype="https://schema.org/AggregateOffer" itemscope>
<meta itemprop="priceCurrency" content="<?php echo Factory::getApplication()->bootComponent('dpcalendar')->getMVCFactory()->createModel('Currency', 'Administrator')->getActualCurrency()->currency; ?>">
<meta itemprop="offerCount" content="<?php echo $event->capacity; ?>">
<meta itemprop="highPrice" content="<?php echo max(array_column($prices, 'value')); ?>">
<meta itemprop="lowPrice" content="<?php echo min(array_column($prices, 'value')); ?>">
<meta itemprop="availability"
content="https://schema.org/<?php echo $event->capacity > $event->capacity_used ? 'InStock' : 'SoldOut'; ?>">
<meta itemprop="url" content="<?php echo $displayData['router']->getEventRoute($event->id, $event->catid, true, true); ?>">
<meta itemprop="validFrom" content="<?php echo $displayData['dateHelper']->getDate($event->created)->format('c'); ?>">
<?php foreach ($prices as $price) { ?>
<div itemprop="offers" itemtype="https://schema.org/Offer" itemscope>
<meta itemprop="price" content="<?php echo $price->value; ?>">
<?php if (!empty($price->label)) { ?>
<meta itemprop="name" content="<?php echo htmlentities((string)$price->label, ENT_COMPAT, 'UTF-8'); ?>">
<?php } ?>
<?php if (!empty($price->description)) { ?>
<meta itemprop="description" content="<?php echo htmlentities(strip_tags((string)$price->description), ENT_COMPAT, 'UTF-8'); ?>">
<?php } ?>
</div>
<?php } ?>
</div>