Originally Posted by
lat9
That formatting is provided by includes/templates/bootstrap/templates/tpl_checkout_shipping_default.php (or your template clone's version).
Thanks--I understand that and found the code creating the cards; however, I'm failing to see how I can make the shipping options combine into one. It looks like it is calling each shipping module (Flat Rate and USPS in my example) separately. I'm not savvy enough to figure out how to break it up. In the responsive classic template I would just modify the code within the <fieldset> tags, but this is entirely different. I'm still learning bootstrap so hoping you can point me in the right direction? What part of this should I be changing to combine both modules into one display card?
Code:
<!--bof shipping method option card-->
<div class="card mb-3">
<div class="card-header">
<?php echo $quotes[$i]['module']; ?>
<?php
if (!empty($quotes[$i]['icon'])) {
echo $quotes[$i]['icon'];
}
?>
</div>
<div class="card-body p-3">
<?php
if (isset($quotes[$i]['error'])) {
?>
<div><?php echo $quotes[$i]['error']; ?></div>
<?php
} else {
for ($j = 0, $n2 = count($quotes[$i]['methods']); $j < $n2; $j++) {
// set the radio button to be checked if it is the method chosen
$checked = false;
if (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) {
$checked = ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']);
}
if ($n > 1 || $n2 > 1) {
?>
<div class="float-right"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></div>
<?php
} else {
?>
<div class="float-right"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . zen_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></div>
<?php
}
?>
<div class="custom-control custom-radio custom-control-inline">
<?php echo zen_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="ship-'.$quotes[$i]['id'] . '-' . str_replace(' ', '-', $quotes[$i]['methods'][$j]['id']) .'"'); ?>
<label for="ship-<?php echo $quotes[$i]['id'] . '-' . str_replace(' ', '-', $quotes[$i]['methods'][$j]['id']); ?>" class="custom-control-label checkboxLabel"><?php echo $quotes[$i]['methods'][$j]['title']; ?></label>
</div>
<div class="p-1"></div>
<?php
$radio_buttons++;
}
}
?>
</div>
</div>
<?php
}
}
}
?>
</div>
</div>
Screenshot of what I'm talking about attached. THanks!shippingmethod.pdf
Bookmarks