Skip to content
Code-Schnipsel Gruppen Projekte
Commit 31c82c68 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: #3 - add to frontend order

Übergeordneter 5eb2924e
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -300,7 +300,7 @@ define('package/quiqqer/shipping/bin/backend/controls/settings/ShippingStatus',
var lgPrefix = 'dialog.shippingStatus.template.';
Content.addClass('quiqqer-shipping-shipping-status-window');
Content.addClass('quiqqer-order-shipping-status-window');
Content.set('html', Mustache.render(template, {
labelTitle : QUILocale.get(lg, lgPrefix + 'labelTitle'),
labelStatusNo : QUILocale.get(lg, lgPrefix + 'labelStatusNo'),
......
......@@ -251,6 +251,10 @@
<de><![CDATA[Versandstatus]]></de>
<en><![CDATA[Shipping status]]></en>
</locale>
<locale name="control.profile.orders.shipping">
<de><![CDATA[Versandstatus]]></de>
<en><![CDATA[Shipping status]]></en>
</locale>
</groups>
<groups name="quiqqer/shipping" datatype="php">
......@@ -430,6 +434,19 @@
The order is now <b>[shippingStatus]</b>.
]]></en>
</locale>
<locale name="shipping.status.default.1">
<de><![CDATA[Aufgenommen]]></de>
<en><![CDATA[Received]]></en>
</locale>
<locale name="shipping.status.default.2">
<de><![CDATA[In Bearbeitung]]></de>
<en><![CDATA[In process]]></en>
</locale>
<locale name="shipping.status.default.3">
<de><![CDATA[Versendet]]></de>
<en><![CDATA[Sent]]></en>
</locale>
</groups>
......
......@@ -25,8 +25,8 @@ class EventHandler
public static function onPackageSetup()
{
// Translations
$languages = QUI\Translator::getAvailableLanguages();
$languages = QUI\Translator::getAvailableLanguages();
$StatusFactory = QUI\ERP\Shipping\ShippingStatus\Factory::getInstance();
// create locale
$var = 'message.no.rule.found.order.continue';
......@@ -70,6 +70,23 @@ public static function onPackageSetup()
QUI\System\Log::addNotice($Exception->getMessage());
}
// create shipping order status
$getLocaleTranslations = function ($key) use ($languages) {
$result = [];
foreach ($languages as $language) {
$result[$language] = QUI::getLocale()->getByLang($language, 'quiqqer/order', $key);
}
return $result;
};
$StatusFactory->createShippingStatus(1, '#dbb50c', $getLocaleTranslations('processing.status.default.1'));
$StatusFactory->createShippingStatus(2, '#418e73', $getLocaleTranslations('processing.status.default.2'));
$StatusFactory->createShippingStatus(3, '#4fd500', $getLocaleTranslations('processing.status.default.3'));
// Product fields
self::createProductFields();
}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren