Extending email/html/order_owner.tpl

I try to extend this template using blocks but my data is not added.
I’ve double checked paths, blockname and filename in metadata.php but still, even if I put some string in my tpl it doesn’t show up. Modifying directly order_owner.tpl show up data.

Could there be any obvious reason for this? In the same metadata.php I have another tpl file that I am extending and that works correctly.
here is the block part of my metadata.php:


'blocks'         => array(
        array('template' => 'page/checkout/payment.tpl', 'block' => 'change_shipping', 'file' => 'application/views/blocks/elo_payment_collect.tpl'),
        array('template' => 'email/html/order_owner.tpl', 'block' => 'email_html_order_owner_deliveryinfo', 'file' => 'application/views/blocks/elo_email_html_owner.tpl'),
    )

The module doesn’t show any error, and the module’s other behavior is normal so I don’t get it.

Thanks
Greg

Hello all,

I’ve put together a basic module that should show a hardcoded string at checkout/order just after the shippingAndPayment block.
And it doesn’t show up for me.
Is there an obvious error that I keep overlooking?

Many thanks!
Greg

Hi,

you have to put the blocks in [B]out/blocks[/B]. Take a look: http://wiki.oxidforge.org/Features/Extension_metadata_file#blocks

Hi, thanks for your reply.
For info the shop I use is 4.7.5
I’ve followed this tutorial:
http://www.marco-steinhaeuser.de/how-to-write-a-module-for-oxid-eshop-display-you-will-save-x-percent-on-the-product-details-page.html

In this tutorial blocks are in application/views/blocks/

And I have an extension block that works with this path, so when do I have to put in view when in out/blocks?

Thanks
Greg

Differences in block file definition per shop/metadata version.

In OXID eShop >= 4.6 with metadata version 1.0 template block "file" value was relative to "out/blocks" directory inside module root.

In OXID eShop 4.7 / 5.0 with metadata version 1.1 template block "file" value has to be specified directly from module root. 

Your metadata is:

$sMetadataVersion = '1.1';

deprecated: /out/blocks, no path info in metadata
since 4.7: any path, path info in metadata

if you change blocks in metadata, you have to delete all blocks of the module in table oxtplblocks before activation.

Ok, so according to what you say, from shop 4.7 I must define block path in metadata and I must use metadata version 1.1.

If you look into my example module I do just like that. In metadata, the path is defined to the block.
So I still don’t get it.

Greg

What about

[QUOTE=leofonic;133728]
if you change blocks in metadata, you have to delete all blocks of the module in table oxtplblocks before activation.[/QUOTE]
Your testmodule works.

Argh, in the stress I’ve overlooked that. It works indeed. Thank you very much!
Greg