[TYPO3-commerce] Request for hook and some changes to allow "virtual" articles
Franz Koch
typo.removeformessage at fx-graefix.de
Thu Sep 6 19:16:37 CEST 2007
Hi list,
I made some small modifications to the commerce basket system that allow
for "virtual" articles (like one article with different attributes).
Mostly I added two hooks (one is used so far) to the method
'add_article' and implemented a new variable which stores the basket-id
- so the basket-id is no longer bound to the article-id (which is not
necessary to be the article-id btw).
So by simply allowing custom basket-ids for the articles in the basket,
it is possible to add the same article several times (by altering the
basket-id over a hook).
This seems to work fine so far and doesn't break with previous versions,
the checkout or the regular rendering of the articles. The following
files needed changes:
- class.tx_commerce_pi2.php
- class.tx_commerce_basic_basket.php
- class.tx_commerce_basket.php
- class.tx_commerce_basket_item.php (just storing the custom id for
probably later use in hooks or whatever)
everything else is done with hooks and if no hook is used for any
manipulation, commerce works just like before.
Is it possible to get those small changes into the commerce core? I
added it to bugtracker [1] as well as the needed patches and a short howto:
[1] http://bugs.typo3.org/view.php?id=6289
--
Kind regards,
Franz
More information about the TYPO3-project-commerce
mailing list