Hello again,

after searching and traying for nearly 2.5 hours and beeing close to
loosing my mind i posted to the list. NOW I found the solution: I also
overload oxbasketitem. If I register oxbasket AFTER oxbasketitem the
error occurs. So simply registering oxbasket in the first line of System
-> Modules in the backend solves the whole problem.

As happy as I am now with having a solution for this, I still do not
really understand it. Each and every class is testet for having
overloads when being instantiated. So why does it make any difference in
wich position oxbasket is listed in the modules-section???

Regards, Kai

Am 16.03.2011 09:54, schrieb Kai Gazmaga:
> Hello,
>
> im writing a module currently and  found a flaw in
> oxorder->validateStock. When it comes to unsufficient stock in the
> last orderstep an exception is generated. After checking stock by
>     $iOnStock = $oProd->checkForStock( $oContent->getAmount(),
> $dArtStockAmount );
> in line 1110
>     $oEx->setRemainingAmount( $oProd->oxarticles__oxstock->value );
> does not use the return-value of checkForStock ($iOnStock).  So it is
> not possible to pass through a value generated in checkForStock, wich
> I have to do in my special case. I now have to overload oxorder and
> copy the whole function only for fixing this.
>
> I do not see any reason, why using the oxarticle-value from the object
> instead of the calculated value of the function, or do I miss
> something here?
>
> Regards, Kai
> VektorDesign - Online-Shops und Programmierung
> Kai Gazmaga
> Neue Strasse 83
> 89 073 Ulm    Tel.: +49 731 - 3781953
> Fax: +49 731 - 3781952
>       Mail: [email protected]
> Web: www.vektordesign.de
>
>
>
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to