View Issue Details

IDProjectCategoryView StatusLast Update
0001069OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:25
Reportermarco_steinhaeuser Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.1.3 revision 19918 
Fixed in Version4.1.4 revision 21266 
Summary0001069: Selection lists are inherited from father articel although they are not assigned to the variant
DescriptionAssign a selection list to the father article. It will be inherited to the variant article. Editing the variant article, there is no selection list assigned to it.

See screenshots attached
Additional Informationgathered here:
http://www.oxid-esales.com/forum/showthread.php?t=1647
TagsSelection List
Attached Files
variant_of_sphere.png (130,794 bytes)   
variant_of_sphere.png (130,794 bytes)   
selection_list_for_variant.png (34,086 bytes)   
selection_list_for_variant.png (34,086 bytes)   
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

marco_steinhaeuser

2009-07-04 09:48

reporter   ~0001149

Assigning another selection list, the first list is deleted from the variant and the new list appears as this one is inherited. Clearing the entries, the empty selection field still appears in the front end.

marco_steinhaeuser

2009-07-04 16:01

reporter   ~0001150

fixed by module:

oxarticle => datame/datame_modul_oxarticleVariantlistNoInherit

#########################

<?
class datame_modul_oxarticleVariantlistNoInherit extends datame_modul_oxarticleVariantlistNoInherit_parent{
    /**
    * Diese Methode ist eine 1:1 Kopie der Elternklasse (oxarticle::getSelectLists()).
    * Hier wurde implementiert, dass die Slave-Artikel nicht die Selectlist des Masters (falls Slave keine Selectlist hat) erbt.
    * => Siehe auskommentierte Zeilen #1104S ff.
    */
    public function getSelectLists($sKeyPrefix = null)
    {
        //#1468C - more then one article in basket with different selectlist...
        //optionall function parameter $sKeyPrefix added, used only in basket.php
        $sKey = $this->getId();
        if ( isset( $sKeyPrefix ) ) {
            $sKey = $sKeyPrefix.'__'.$this->getId();
        }

        if ( self::$_aSelList[$sKey]) {
            return self::$_aSelList[$sKey];
        }

        // all selectlists this article has
        $oLists = oxNew( 'oxlist' );
        $oLists->init('oxselectlist');
        $sSLViewName = getViewName('oxselectlist');
        $sSelect = "select $sSLViewName.* from oxobject2selectlist left join $sSLViewName on $sSLViewName.oxid=oxobject2selectlist.oxselnid ";
        $sSelect .= 'where oxobject2selectlist.oxobjectid=\''.$this->getId().'\' ';
        //sorting
        $sSelect .= ' order by oxobject2selectlist.oxsort';

        $oLists->selectString( $sSelect );

// //#1104S if this is variant ant it has no selectlists, trying with parent
// if ( $this->oxarticles__oxparentid->value && $oLists->count() == 0 ) {
// //#1496C - select fixed ( * => $sSLViewName.*)
// $sSelect = "select $sSLViewName.* from oxobject2selectlist left join $sSLViewName on $sSLViewName.oxid=oxobject2selectlist.oxselnid ";
// $sSelect .= "where oxobject2selectlist.oxobjectid='{$this->oxarticles__oxparentid->value}' ";
// //sorting
// $sSelect .= ' order by oxobject2selectlist.oxsort';
// $oLists->selectString( $sSelect);
// }

        $dVat = 0;
        if ( $this->getPrice() != null ) {
            $dVat = $this->getPrice()->getVat();
        }

        $iCnt = 0;
        self::$_aSelList[$sKey] = array();
        foreach ( $oLists as $oSelectlist ) {
            self::$_aSelList[$sKey][$iCnt] = $oSelectlist->getFieldList( $dVat );
            self::$_aSelList[$sKey][$iCnt]['name'] = $oSelectlist->oxselectlist__oxtitle->value;
            $iCnt++;
        }
        return self::$_aSelList[$sKey];
    }
}

vilma_liorensaityte

2009-07-27 16:01

reporter   ~0001282

This module doesn't solve this bug entry, it just removes other fix.

vilma_liorensaityte

2009-07-28 13:00

reporter   ~0001289

If variant has no selectlists, It will be inherited from parent article and displayed in frontend or admin. If some selectionlist will be assigned to variant, only this selectionlist will be displayed, the selection from parent article not.