<?php /** * Isotope "simple stock management" for Contao Open Source CMS * * Copyright (c) 2016 Richard Henkenjohann * * @package Isotope * @author Richard Henkenjohann <*****@*****.**> */ /** @noinspection PhpUndefinedMethodInspection */ $table = Isotope\Model\Stock::getTable(); /** * Legends */ $GLOBALS['TL_LANG'][$table]['stock_legend'] = 'Eine neue Lagerbestandsänderung buchen'; /** * Fields */ $GLOBALS['TL_LANG'][$table]['pid'][0] = 'Produkt'; $GLOBALS['TL_LANG'][$table]['product_collection_id'][0] = 'Bestellung'; $GLOBALS['TL_LANG'][$table]['quantity'][0] = 'Anzahl'; $GLOBALS['TL_LANG'][$table]['quantity'][1] = 'Geben Sie den Lagerbestandszugang (positive Zahl) oder die Lagerentnahme (negative Zahl) ein.'; $GLOBALS['TL_LANG'][$table]['source'][0] = 'Herkunft'; $GLOBALS['TL_LANG'][$table]['comment'][0] = 'Kommentar'; $GLOBALS['TL_LANG'][$table]['comment'][1] = 'Geben Sie einen optionalen Hinweis ein.'; /** * References */ $GLOBALS['TL_LANG'][$table]['source_options'][Isotope\Model\Stock::STOCKMANAGEMENT_SOURCE_BACKEND] = 'Backend'; $GLOBALS['TL_LANG'][$table]['source_options'][Isotope\Model\Stock::STOCKMANAGEMENT_SOURCE_ORDER] = 'Bestellung';
* * Copyright (c) 2016 Richard Henkenjohann * * @package Isotope * @author Richard Henkenjohann <*****@*****.**> */ /** * Back end modules */ /** @noinspection PhpUndefinedMethodInspection */ $GLOBALS['BE_MOD']['isotope']['iso_products']['tables'][] = \Isotope\Model\Stock::getTable(); /** * Models */ /** @noinspection PhpUndefinedMethodInspection */ $GLOBALS['TL_MODELS'][Isotope\Model\Stock::getTable()] = 'Isotope\\Model\\Stock'; /** * Hooks */ $GLOBALS['ISO_HOOKS']['addProductToCollection'][] = ['Isotope\\SimpleStockmanagement\\Hooks', 'checkBeforeAddToCollection']; $GLOBALS['ISO_HOOKS']['updateItemInCollection'][] = ['Isotope\\SimpleStockmanagement\\Hooks', 'checkBeforeUpdateCollection']; $GLOBALS['ISO_HOOKS']['itemIsAvailable'][] = ['Isotope\\SimpleStockmanagement\\Hooks', 'checkItemIsAvailable']; $GLOBALS['ISO_HOOKS']['preCheckout'][] = ['Isotope\\SimpleStockmanagement\\Hooks', 'checkBeforeCheckout']; $GLOBALS['ISO_HOOKS']['postCheckout'][] = ['Isotope\\SimpleStockmanagement\\Hooks', 'updateStockPostCheckout']; /** * Notification Center Notification Types */ $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['recipients'] = ['admin_email']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['email_text'] = ['product_*', 'order_*', 'config_*']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['email_subject'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['email_text']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['email_html'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_stockmanagement_change']['email_text'];
<?php /** * Isotope "simple stock management" for Contao Open Source CMS * * Copyright (c) 2016 Richard Henkenjohann * * @package Isotope * @author Richard Henkenjohann <*****@*****.**> */ /** @noinspection PhpUndefinedMethodInspection */ $table = Isotope\Model\Product::getTable(); /** * Fields */ /** @noinspection PhpUndefinedMethodInspection */ $GLOBALS['TL_DCA'][$table]['fields']['stock'] = ['label' => &$GLOBALS['TL_LANG'][$table]['stock'], 'inputType' => 'dcaWizard', 'foreignTable' => Isotope\Model\Stock::getTable(), 'params' => ['mode' => 2, 'pid' => \Input::get('id'), 'act' => 'create'], 'eval' => ['fields' => ['quantity', 'source', 'product_collection_id', 'comment', 'tstamp'], 'editButtonLabel' => $GLOBALS['TL_LANG'][$table]['stock_create_button'], 'orderField' => 'tstamp ASC', 'showOperations' => true, 'operations' => ['show'], 'listCallback' => ['Isotope\\SimpleStockmanagement\\Dca', 'generateWizardList'], 'tl_class' => 'clr'], 'attributes' => ['legend' => 'inventory_legend']];