
Originally Posted by
mcqueeneycoins
Forgive me, but I'm completely out of my element on this one. I can work with basic html and css, and am slowly getting the hang of bootstrap, but adding if/then statements to php files starts getting over my head. I completely understand what you're saying needs to be done, I'm just lost as to how to execute. I've looked at the modules and classes files trying to get a better understanding of the $xxxx commands, but still confused as to specifically take the flat shipping modules quote value, "store it" and then output it. Even if you could give me a sample of what it might look like so I can use trial and error that would help.
If it really is too complicated I will just have to learn to live with it, but since I only ship USPS would prefer for all shipping options to display in one card so as to not confuse the customer.
I think I found a useable workaround--I moved the <div class="card-header"> and it displays all shipping options together with a less than perfect heading. This should work I would think, but any tips on how to make the heading and card body a little cleaner? It looks like it's inheriting the border-radius from the card class--the rounded-bottom, etc. doesn't seem to change anything. I tried messing with the mb, p, etc. as well but not having much luck.
Code:
<div class="card card-header mb-0 rounded-top">USPS</div>
<div class="card p-3 border-top-0 rounded-bottom">
<?php
if ($free_shipping === true) {
?>
<div id="shippingMethod-content-two" class="content"><?php echo FREE_SHIPPING_TITLE . (isset($quotes[$i]['icon']) ? ' ' . $quotes[$i]['icon'] : ''); ?></div>
<div id="shippingMethod-selected" class="selected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>
<?php
} else {
$radio_buttons = 0;
for ($i = 0, $n = count($quotes); $i < $n; $i++) {
// bof: field set
// allows FedEx to work comment comment out Standard and Uncomment FedEx
// if (!empty($quotes[$i]['id']) || !empty($quotes[$i]['module'])) { // FedEx
if (!empty($quotes[$i]['module'])) { // Standard
?>
<!--bof shipping method option card-->
<div class="card mb-3">
<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
Bookmarks