PrestaShopCorp / bpostshm

3 stars 5 forks source link

bpostshm.php enhancements #7

Closed tchauviere closed 9 years ago

tchauviere commented 9 years ago

Here are some few enhancements that can be done to improve module stability:

Stigmi commented 9 years ago
tchauviere commented 9 years ago

Update with latest commits

tchauviere commented 9 years ago

Update with latest commits

=> Tested on 1.5 / 1.6 no problem doing so, it works like I said (null or 0 return a new empty object)

=> Tested on 1.5 / 1.6 no problem doing so, it works like I said (null or 0 return a new empty object)

Stigmi commented 9 years ago

Thibaud, I realize that there was a misunderstanding here, the part that was NOK for us was that:

https://github.com/PrestaShop/bpostshm/blob/master/bpostshm.php#L259 https://github.com/PrestaShop/bpostshm/blob/master/bpostshm.php#L348 Once you have done “new Carrier()”, please check if the object is well loaded with “Validate::isLoadedObject($carrier)” and add error message if needed

https://github.com/PrestaShop/bpostshm/blob/master/bpostshm.php#L387 Once you have done “new OrderState()”, please check if the object is well loaded with “Validate::isLoadedObject($order_state)” and add error message if needed

We'll add (int) and that Tools:copy()

tchauviere commented 9 years ago

Hi @Stigmi,

Yes I realized the misunderstanding this morning too. That's why I removed these lines in the update ;)

Stigmi commented 9 years ago

OK last commit have taken all your comments.

tchauviere commented 9 years ago

Fixed!