0

I am trying to customize the Fooman Email PDF module, so the PDF will only be added if the order contains at least one virtual product. I have been working in Observer.php where I added a single line of code to the original file, but after adding it the order emails are not being sent. I therefore need help revise the code or how else it can be achieved.

The original code enter image description here

The customized code enter image description here

What am I doing wrong?

1

Try debugging by logging the value of $order->getQuote()->geVirtualItemsQty() like this Mage::log($order->getQuote()->geVirtualItemsQty(), null, 'orderemails.log') Add this line of code before the if condition. This will help you to identify whether its returning value greater than zero or not, in case of Virtual products in order. If not you then have to change your approach.

Good Luck!:)

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.