Skip to content
Code-Schnipsel Gruppen Projekte
Commit a6c41362 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

quiqqer/template-cologne#35

Übergeordneter fdb990ff
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -37,7 +37,8 @@ public function create()
case ShippingTimePeriod::OPTION_ON_REQUEST:
case ShippingTimePeriod::OPTION_IMMEDIATELY_AVAILABLE:
case ShippingTimePeriod::OPTION_AVAILABLE_SOON:
$valueText = $L->get($lg, 'fields.ShippingTimeFrontendView.'.$value['option']);
$valueText = $L->get($lg, 'fields.ShippingTimeFrontendView.' . $value['option']);
$cssClass = $value['option'];
break;
case ShippingTimePeriod::OPTION_CUSTOM_TEXT:
......@@ -48,15 +49,19 @@ public function create()
} else {
$valueText = current($value['text']);
}
$cssClass = 'custom_text';
break;
default:
$from = $value['from'];
$to = $value['to'];
$unit = $value['unit'];
$from = $value['from'];
$to = $value['to'];
$unit = $value['unit'];
$cssClass = 'timeperiod';
if (empty($to) && empty($from)) {
$valueText = $L->get($lg, 'fields.ShippingTimeFrontendView.unavailable');
$cssClass = 'unavailable';
break;
}
......@@ -84,17 +89,18 @@ public function create()
}
if ($singleTime) {
$valueText .= ' '.$L->get($lg, 'fields.ShippingTimeFrontendView.timeperiod.unit_single.'.$unit);
$valueText .= ' ' . $L->get($lg, 'fields.ShippingTimeFrontendView.timeperiod.unit_single.' . $unit);
} else {
$valueText .= ' '.$L->get($lg, 'fields.ShippingTimeFrontendView.timeperiod.unit_multi.'.$unit);
$valueText .= ' ' . $L->get($lg, 'fields.ShippingTimeFrontendView.timeperiod.unit_multi.' . $unit);
}
}
$Engine->assign([
'title' => $this->getTitle(),
'valueText' => $valueText
'valueText' => $valueText,
'cssClass' => $cssClass
]);
return $Engine->fetch(\dirname(__FILE__).'/ShippingTimePeriodFrontendView.html');
return $Engine->fetch(\dirname(__FILE__) . '/ShippingTimePeriodFrontendView.html');
}
}
<div class="grid-50 mobile-grid-50 grid-parent product-data-fields-title">
{$title}:
</div>
<div class="grid-50 mobile-grid-50 grid-parent product-data-fields-value">
<div class="grid-50 mobile-grid-50 grid-parent product-data-fields-value shipping-info shipping-info__{$cssClass}">
{$valueText}
</div>
\ No newline at end of file
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren