File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
app/code/Magento/Sales/Model Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -887,8 +887,16 @@ public function canShip()
887
887
private function checkItemShipping (): bool
888
888
{
889
889
foreach ($ this ->getAllItems () as $ item ) {
890
- $ qtyToShip = !$ item ->getParentItem () || $ item ->getParentItem ()->getProductType () !== Type::TYPE_BUNDLE ?
891
- $ item ->getQtyToShip () : $ item ->getSimpleQtyToShip ();
890
+ if (!$ item ->getParentItem () || $ item ->getParentItem ()->getProductType () !== Type::TYPE_BUNDLE ) {
891
+ $ qtyToShip = $ item ->getQtyToShip ();
892
+ } else {
893
+ if ($ item ->getParentItem ()->getProductType () === Type::TYPE_BUNDLE &&
894
+ $ item ->getParentItem ()->getProduct ()->getShipmentType () == Type \AbstractType::SHIPMENT_TOGETHER ) {
895
+ $ qtyToShip = $ item ->getParentItem ()->getQtyToShip ();
896
+ } else {
897
+ $ qtyToShip = $ item ->getSimpleQtyToShip ();
898
+ }
899
+ }
892
900
893
901
if ($ qtyToShip > 0 && !$ item ->getIsVirtual () && !$ item ->getLockedDoShip ()) {
894
902
return true ;
You can’t perform that action at this time.
0 commit comments