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}}

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?


1 Answer 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.