View Issue Details

IDProjectCategoryView StatusLast Update
0003098OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:28
ReporterAndreas Hochgesand Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Fixed in Version4.6.0_beta2 
Summary0003098: Child-Article is offline while stock-message is "Wenn ausverkauft nicht bestellbar"
DescriptionUsing multi-dimensional Articles, Parent stock-message ist "Standard". Everey Child with stock=0 and stock-message "Wenn ausverkauft nicht bestellbar" is offline.
So there ist no difference in choosing "Wenn ausverkauft offline" and "Wenn ausverkauft nicht bestellbar.
Steps To ReproduceOXID Support could reproduce
Additional Informationwe need Hotfix if possible! our Shop is offline until Solution.
TagsProducts
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

related to 0004500 resolvedvilma_liorensaityte Child-Article is offline while stock-message is "if out of stock not orderable" 

Activities

svetlana

2011-08-04 14:20

reporter   ~0004930

steps to reproduce :
1) create new products
2) create 3 multidimensional variants: (if out of stock not orderable)
    size | color
    1 | black stock=2
    1 | red stock=1
    1 | green stock=0
3) in frontend green variant is not shown at all.

arvydas_vapsva

2011-08-04 16:27

reporter   ~0004935

fixed!

arvydas_vapsva

2011-08-04 16:27

reporter   ~0004936

hotfix: write a module for oxarticle class with method:

    public function getVariantSelections( $aFilterIds = null, $sActVariantId = null, $iLimit = 0 )
    {
        $iLimit = (int) $iLimit;
        if ( !isset($this->_aVariantSelections[$iLimit])) {
            $this->_aVariantSelections[$iLimit] = false;
            if ( ( $oVariantList = $this->getVariants( false ) ) ) {
                $this->_aVariantSelections[$iLimit] = oxNew( "oxVariantHandler" )->buildVariantSelections( $this->oxarticles__oxvarname->getRawValue(), $oVariantList, $aFilterIds, $sActVariantId, $iLimit );
            }
        }
        return $this->_aVariantSelections[$iLimit];
    }

Andreas Hochgesand

2011-08-09 09:44

reporter   ~0004954

need help to get it work:

- i made a newfile.php file with the code above
- put it in /modules/newmodule
- in settings i call "oxarticle => newmodule/newfile"

the shop is a blank page after that

what to do ?

arvydas_vapsva

2011-08-09 09:48

reporter   ~0004955

Hi, please do not use given fix, this was canceled as couses other unexpected behaviour in azure theme MD variant selection

arvydas_vapsva

2011-08-09 10:37

reporter   ~0004958

fix now is clear:
1. you must make a module for oxArticle::getVariantSelections() like was in given example (on 2011-08-04 16:27);
2. open "out/azure/tpl/page/details/inc/productmain.tpl" and remove "[{if !$oDetailsProduct->isNotBuyable()}]" surrounding forms.

and here is info URL about module writing http://www.oxid-esales.com/en/news/blog/howto-extend-oxid-eshop-modules-part-1

Andreas Hochgesand

2011-08-09 11:06

reporter   ~0004960

thank you. but i get an blank page.
I read http://www.oxid-esales.com/en/news/blog/howto-extend-oxid-eshop-modules-part-1

but i dont know whats wrong. Is the code in the new module only like this:

<?php
public function getVariantSelections( $aFilterIds = null, $sActVariantId = null, $iLimit = 0 )
    {
        $iLimit = (int) $iLimit;
        if ( !isset($this->_aVariantSelections[$iLimit])) {
            $this->_aVariantSelections[$iLimit] = false;
            if ( ( $oVariantList = $this->getVariants( false ) ) ) {
                $this->_aVariantSelections[$iLimit] = oxNew( "oxVariantHandler" )->buildVariantSelections( $this->oxarticles__oxvarname->getRawValue(), $oVariantList, $aFilterIds, $sActVariantId, $iLimit );
            }
        }
        return $this->_aVariantSelections[$iLimit];
    }

arvydas_vapsva

2011-08-09 13:04

reporter   ~0004966

seems like you did not read this :-)

you forgot to wrap function into:

class newmodule extends newmodule_parent
{
...
}

Andreas Hochgesand

2011-08-09 13:26

reporter   ~0004967

now the module works, but:

after klicking a variant which is "ausverkauft" you cant klick another variant.

see: http://www.wecycle.de/Nach-Marke/Dainese/Dainese-Atrax-MTB-Cross-Handschuhe-lang-schwarz-2011.html

klick variant L(on stock) -> OK
klick variant XS(not on stock) -> OK
klick any variant after Xs -> not possible

how about 4.5.1? same probleme here?

thanks?

arvydas_vapsva

2011-08-09 13:36

reporter   ~0004969

did u:

...
2. open "out/azure/tpl/page/details/inc/productmain.tpl" and remove "[{if !$oDetailsProduct->isNotBuyable()}]" surrounding forms.
...

?

Andreas Hochgesand

2011-08-09 13:42

reporter   ~0004970

Yes i did, but after deleting tmp and "Überprüfen ob Templates neu kompiliert werden müssen. Schalten Sie diese Einstellung aus, wenn der eShop in den Live-Betrieb geht" it works!

thanks a lot !

arvydas_vapsva

2011-08-09 13:45

reporter   ~0004971

then please close this bug :-)