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

Chris Bernhard chris at dreamride.de
Thu Jun 25 12:15:27 CEST 2009


Morten Olesen schrieb:
> 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
>>
>>                                    

Hi Morten,

many thanks for your answer! Okay, the best way would be to upgrade to 
the newest SVN-Version. Whats the best way to upgrade from an older 
version to an actual version? First Step would be:

1. Checkout from SVN
2. Rename ext/commerce into ext/commerce_OLD
3. Upload into ext/commerce folder
4. In Extension Manager choose upgrade

Thats it or is there something more to take care about?

I'll have an look at the chained attributes extension, because there are 
a lot extensions in my current installation like previous - next article 
pagination and some more i dont want to integrate again manually in an 
actual SVN.

Thanks in advantage and best regards,

Chris


More information about the TYPO3-project-commerce mailing list