I tried working on this by adding an extra foreach like you mentioned, but I'm losing something. I've not done anything quite like this before. This is what I have now:
$min_rates = array();
foreach($this->rates as $min_rate) {
if(array_key_exists($min_rate->shipping_name,$min_rates)){
if($min_rate->shipping_price < $min_rates[$min_rate->shipping_name]){
$min_rates[$min_rate->shipping_name]= $min_rate->shipping_price;
}else{
continue;
}
}else{
$min_rates[$min_rate->shipping_name]= $min_rate->shipping_price;
}
foreach($min_rates as $rate) {
......existing code
I then added a closing } for the extra foreach after:
<div class="hikashop_checkout_shipping_description"><?php echo $rate->shipping_description;?></div>
</td>
</tr>
<?php
$k = 1-$k;
}
} //added this closing for extra foreach
Now nothing is showing. I believe it has something to do with I'm losing values through the first foreach. Can you help me fix this?