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!

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, privacy policy and cookie policy

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