1

I have an extension in use in my Magento store to display various delivery methods during the checkout.

In my email confirmation template is this piece of code:

    <td class="method-info">
        <h6>Your delivery method:</h6>
        <p class="delivery-method-text">
            {{layout handle="deliverydate_email_information" order=$order}}
        </p>
    </td>

The customer can also choose "pick up" to get his goods directly from the store. How can I modify the email template so that the delivery method is only shown if the customer has not selected pick up?

Any hints how I can achieve this?

Thanks!

Torben
  • 231
  • 3
  • 11

1 Answers1

1

Assuming the handle deliverydate_email_information renders the bit you want to be optional, you can just wrap the output in a conditional if statement.

if ($this->getOrder->getShippingMethod() !== 'collect_from_store') :

If you don't want the <h6> and <p> either, then simply move them into the custom template.

Peter O'Callaghan
  • 5,027
  • 3
  • 23
  • 32