Tuesday, March 16, 2010

Jut for fun!

While working on a theme for Magento 1.4.0.1 I found this in app\design\frontend\base\default\template\checkout\onepage\shipping.phtml between lines 49 and 56
<?php if(false): ?>
<div class="fields">
<label for="shipping:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
<div class="input-box">
<input type="text" name="shipping[email]" id="shipping:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
</div>
</div>
<?php endif ?>

Good one Magento Team.

3 comments:

  1. huahuauhahuahuahua
    the code is incomplete, missing (else if(true) :)
    very good!

    ReplyDelete
  2. They might didnt want to remove the code that why they put false........

    ReplyDelete
    Replies
    1. i know it's a common technique, but that's why version control systems exist. you remove the code so it's clean a nice and if you need it later you have it in a previous revision.

      Delete