What I don't understand is why this treats more than one of the same product as only 1 instance in the foreach. Anyone have any ideas on returning $up for each individual item. those that are alike as well as those that are not?
Code: Select all
foreach ($this->cart->getProducts() as $product){
$up .= ' <Package><PackagingType><Code>02</Code></PackagingType><PackageWeight><UnitOfMeasurement>
<Code>lbs</Code></UnitOfMeasurement><Weight>' . $product['weight'] . '</Weight></PackageWeight></Package>';
$ups = $up;
}
return $ups;