Skip to content

Commit

Permalink
fixed day ticket template for Lublin EJC
Browse files Browse the repository at this point in the history
  • Loading branch information
fr00d committed Apr 14, 2017
1 parent 3c3c3cb commit 9f3c8f2
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions module/PreReg/view/partial/eticket-package-overview.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,22 @@
error_log('variant name: '.$productVariantName);
$productVariant = $product->getProductVariantByName($productVariantName);
foreach($productVariant->getProductVariantValues() as $value):
$timestamp = strtotime($value->getValue());
$pattern = [
'/^.*\ -\ /',
'/st\ /',
'/nd\ /',
'/rd\ /',
'/th\ /',
];
$replace = [
'',
'',
'',
'',
'',
];
$datestring = preg_replace($pattern, $replace, $value->getValue()).' 2017';
$timestamp = strtotime($datestring);
$date = new DateTime();
$date->setTimestamp($timestamp);
?>
Expand All @@ -96,7 +111,22 @@
</tr>
<tr>
<?php foreach($product->getProductVariantByName($productVariantName)->getProductVariantValues() as $value):
$timestamp = strtotime($value->getValue());
$pattern = [
'/^.*\ -\ /',
'/st\ /',
'/nd\ /',
'/rd\ /',
'/th\ /',
];
$replace = [
'',
'',
'',
'',
'',
];
$datestring = preg_replace($pattern, $replace, $value->getValue()).' 2017';
$timestamp = strtotime($datestring);
$date = new DateTime();
$date->setTimestamp($timestamp); ?>
<td style='font-size: 6px;'><?php echo $date->format('d.m.'); ?></td>
Expand Down

0 comments on commit 9f3c8f2

Please sign in to comment.