[TYPO3-commerce] Checkout->setStep, what is it for?
Michiel Roos [netcreators]
michiel at netcreators.com
Thu Oct 11 13:51:50 CEST 2007
Hi,
In class.tx_commerce_pi3.php around line 259 the following code is called:
$this->piVars['step'] = $paymentObj->setStep($_REQUEST,
$this->piVars['step']);
The thing I don't understand is why the piVars is used to hold this
information. Some functions may expect the piVars to be 'virgin'. The
piVars should only be read and not written to.
Besides that . . .
If you happen to have a checkout procedure that needs an extra step,
then you want to be able to jump to that step from any other step. In
your own setStep function you could make your step come after the
delivery step like so:
function setStep(&$request, &$step) {
if ($step === 'delivery') {
return 'some_other_custom_step';
}
}
Because of the code on line 259, I expect the $this->piVars['step'] to
be used to set the next step.
The next step after delivery is hard coded as 'payment'. This makes the
setStep function pretty useless.
Can anyone enlighten me?
Maybe it would be more clear if a hook function was implemented to do:
$this->nextStep = $paymentObj->setNextStep($_REQUEST,
$this->piVars['step']);
Kind regards,
Michiel Roos
--
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
More information about the TYPO3-project-commerce
mailing list