Not sure if this belongs here, code suggestions, or somewhere else.
I noticed a while ago that I was getting two empty fieldsets below my shipping options on checkout_shipping. I found that these were produced by my zone shipping modules--I have two, I cloned the stock one--when the destination country for shipping was one of the zone module's "skip" countries.
I didn't go too far into the matter, beyond confirming that, but it seemed as though the zone shipping modules were being considered valid options by the loop which produces the fieldsets--and everything inside of them--but when it came time to produce text the zone modules were like, "No, no, no, I don't ship to /that/ country."
Forgive my colloquial explanation. (;
Anyway, this was a quick and easy fix. I didn't see it anywhere else on the forums, so I'm posting it here. I hope this is the right place for it.
Code is from 1.3.7, though I suspect this could be applied to other versions.
In tpl_checkout_shipping_default.tpl:
The first <fieldset> looks like this: (line 64)
Code:
<fieldset>
<legend><?php echo $quotes[$i]['module']; ?> <?php if (isset($quotes[$i]['icon']) && zen_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></legend>
Wrap <fieldset> in a php conditional so that the above becomes:
Code:
<?php if($quotes[$i]['module']) { ?> <fieldset> <?php } ?>
<legend><?php echo $quotes[$i]['module']; ?> <?php if (isset($quotes[$i]['icon']) && zen_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></legend>
Do the same thing with the corresponding </fieldset>
So this: (line 105)
Becomes this:
Code:
<?php if($quotes[$i]['module']) { ?> </fieldset> <?php } ?>
Very simple, the php basically checks to make sure there's a shipping module name before it opens and closes the <fieldset>.
WinMerge suggests this should work for 1.3.6
Hope this helps,
Joe
Bookmarks