Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bestandsanzeige im Backend für Varianten #11

Open
sgei opened this issue Mar 22, 2018 · 2 comments
Open

Bestandsanzeige im Backend für Varianten #11

sgei opened this issue Mar 22, 2018 · 2 comments
Labels

Comments

@sgei
Copy link

sgei commented Mar 22, 2018

Hallo Richard,

Kannst du die Bestandsanzeige auch in die Variantentabelle integrieren?

grafik

Eine Frage am Rande: In der Variantenübersicht wird die ID der Variante lieblos mit ausgegeben. Kann man die über eine DCA-Einstellung entfernen?
grafik

Vielen Dank,

Steffen

@sgei
Copy link
Author

sgei commented Oct 17, 2018

Hallo Richard,
kannst du dir den Bug mal anschauen?
Wir wollen nächsten Monat live gehen und das eine Puzzelteil fehlt noch.

Steffen

@haendersonfox
Copy link

hallo. aktuell habe ich es so gelöst - die letzten drei zeilen nach dem price-listen-eintrag, anhängen.

sicherlich geht das noch intelligenter in der eigenen DCA aber ich habs nicht hinbekommen...

lagerbestand in varianten anzeigen
system/modules/isotope/library/Isotope/Backend/Product/DcaManager.php

/**
* Change the displayed columns in the variants view
*/
public function changeVariantColumns()
{
if ((\Input::get('act') != '' && 'select' !== \Input::get('act'))
|| \Input::get('id') == ''
|| ($objProduct = Product::findByPk(\Input::get('id'))) === null
) {
return;
}

    $GLOBALS['TL_DCA']['tl_iso_product']['list']['sorting']['mode']    = 4;
    $GLOBALS['TL_DCA']['tl_iso_product']['list']['sorting']['fields']  = ['id'];
    $GLOBALS['TL_DCA']['tl_iso_product']['fields']['alias']['sorting'] = false;

    $arrFields = array();
    $objType = $objProduct->getType();

    $arrVariantFields = $objType->getVariantAttributes();
    $arrVariantOptions = array_intersect($arrVariantFields, Attribute::getVariantOptionFields());

    if (\in_array('images', $arrVariantFields, true)) {
        $arrFields[] = 'images';
    }

    if (\in_array('name', $arrVariantFields, true)) {
        $arrFields[] = 'name';
        $GLOBALS['TL_DCA']['tl_iso_product']['list']['sorting']['fields'] = array('name');
    }

    if (\in_array('sku', $arrVariantFields, true)) {
        $arrFields[] = 'sku';
        $GLOBALS['TL_DCA']['tl_iso_product']['list']['sorting']['fields'] = array('sku');
    }

    if (\in_array('price', $arrVariantFields, true)) {
        $arrFields[] = 'price';
    }
    
    if (\in_array('stock', $arrVariantFields, true)) {
        $arrFields[] = 'stock';
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants