[TYPO3-commerce] Strange behaviour of dropdownfields (Typo 4.2.6, Commerce 0.9.8)

Morten Olesen mo at idefa.dk
Thu Jun 25 09:11:07 CEST 2009


Hej Chris,

There is no way to achive what you want in version 0.9.8 - current svn ( 
0.11.10 ) has it working ( but not if you chose to hide out of stock 
articles )

your best bet would be to write an XCLASS that implements your own drop 
downs - if you search back in the archive you may notice I've made quite 
a few post on the subject ( patch files were attached to posts but 
netfielders archive dont show them unfortunately ) this should give you 
an idea of how to solve the taske in your version of commerce.

There was also a extension named something like commerce chained 
attributes - I never got it working but the code may be of inspiration 
to you.

/Morten

Chris Bernhard wrote:
> Good morning dear list,
> 
> im offering articles like this in my online store:
> 
> T-Shirt / Size S / Color: Red
> T-Shirt / Size M / Color: Red
> T-Shirt / Size M / Color: Black
> 
> I changed the following line in class.tx_commerce_pi1.php
> to remove the ALL Option.
> 
> (ca. line no. 559)
> 
> $attCode.= '<select 
> onchange="document.getElementById(\'attList_'.$prod->get_uid().'_changed\').value 
> = 
> '.$attribute_uid.';document.getElementById(\'attList_'.$prod->get_uid().'\').submit();" 
> name="'.$this->prefixId.'[attsel_'.$attribute_uid.']" 
> '.$this->conf['selectAttributesParams'].'><option 
> value="">'.$this->pi_getLL('all_options','all',1).'</option>'."\n";
> 
> $attCode.= '<select 
> onchange="document.getElementById(\'attList_'.$prod->get_uid().'_changed\').value 
> = 
> '.$attribute_uid.';document.getElementById(\'attList_'.$prod->get_uid().'\').submit();" 
> name="'.$this->prefixId.'[attsel_'.$attribute_uid.']" 
> '.$this->conf['selectAttributesParams'].'>'."\n";
>                                        
> Now, if im loading the article detailview site, in the dropdownbox all
> colors appearing, but if im right, it has to show in the Size Dropdown:
> 
> S + M
> 
> Color Dropdown: only red.
> 
> The right behaviour should be, that black appears only if im changing 
> the size dropdown to size M.
> 
> And the next problem is, after changing to M, the S Attribute disappears 
> from the dropdown.
> 
> Is there an workaround for this problem?
> 
> Many thanks in advantage and best regards,
> 
> Chris
> 
>                                    


More information about the TYPO3-project-commerce mailing list