[TYPO3-commerce] TYPO3-project-commerce Digest, Vol 38, Issue 14

Jörg Leshel j.leshel at gmail.com
Thu Mar 18 10:46:57 CET 2010


Hi Morten,

I am almost ok with you. But with the way dropdowns are handled I am
still not ok.
Somehow the logic is flawed because it results in inconsistent
information in the frontend.

I think it's about this lines:

			if (is_array($articles_uids)) {
				$artId = $articles_uids[0];
			} else {
				$artId = $prod->articles_uids[0];
			}

Maybe it's better instead of setting a default article to communicate
to the costumer that there is no valid article for the selected
combination.

			return $this->pi_getLL('lang_novalidarticle') //just to show :)


regards

Joerg


> 2. There is in class.tx_commerce_pibase.php the part to build the dropdowns.
> The author left as comment "correct like this?"
> I think it's not correct like this.
>

>It's a very old comment that related to a specific part of the code at
>the time.

> For me the behaviour of the dropdowns
> (plugin.tx_commerce_pi1.allArticles=0) should be implemented on server
> side like Dmitry Pikhno did it with jQuery in his extension
> fe_attr_commerce on clientside. So thats chained dropdowns. An
> additional field  in the  product or category / attributes assignment
> is needed to specify the chain for a product or category.
>
>Then feel free to do so in an extension, it's the philosophy that
>commerce should be the foundation on witch you build the specialized
>shop - it's should not force a specific javascript library.

>For instance in our shops we typically automatically load the selected
>article via ajax to make sure that any article specific images, test and
>price is rendered correctly - which in turn also makes sure that the
>drop downs again only contain valid choices. This works for us, but wont
>be ideal for everyone.


More information about the TYPO3-project-commerce mailing list