Some help with blocks

I’m trying to create a quotation module.
Basic principle, if price is zero, then show an extra tab in the product details page, with a form. When forms been sent, show a thank you.

i’ve created a module/anfragge/out/blocks/tabs_anfrage.tpl

and inserted it into the db

INSERT INTO `oxtplblocks` (`OXID`, `OXACTIVE`, `OXSHOPID`, `OXTEMPLATE`, `OXBLOCKNAME`, `OXPOS`, `OXFILE`, `OXMODULE`, `OXTIMESTAMP`)
VALUES ('fkg587121d1d47be0bda2253922d4e26', '1', 'oxbaseshop', 'layout/base.tpl', 'details_tabs_pricealarm', '0', 'tabs_anfrage', 'anfrage', CURRENT_TIMESTAMP);

Have i understood correctly you cannot create a new block, only overwrite another ?
ie here details_tabs_pricealarm

What is the OXID - just random 32 char or ?

Another problem at the moment is my module (class) is being repeatedly loaded, in a loop until the memory runs out.
This is my metadata for the module

$aModule = array(
    'id'           => 'anfrage',
    'title'        => 'Send anfrage email for products',
    'description'  => array(
        'de' => 'Sendet Anfrage email, spezifisch für Sonderbau, aber geht für jeden Produkt mit ein preis von 0.00',
        'en' => 'Send quotation email, mainly for Sonderbau,but should work for all products with a price of 0.00'
    ),
    'version'      => '1.0.0',
    'extend'       => array(
		'details' => 'anfrage/views/anfrage'
    ),
    'settings' => array(
    )
);

Whats wrong ?

[QUOTE=soup;113832]
i’ve created a module/anfragge/out/blocks/tabs_anfrage.tpl
[/QUOTE]
there is a typo, only one “g” would be correct - only in your post or as well in code?

[QUOTE=soup;113832]
Have i understood correctly you cannot create a new block, only overwrite another ?
ie here details_tabs_pricealarm
[/QUOTE]
right, use existing blocks

maybe this can help?
http://forum.oxid-esales.com/showthread.php?t=12350#post74782

[QUOTE=soup;113832]
What is the OXID - just random 32 char or ?
[/QUOTE]
yes, sort of, generated if not given - but can be given (must be unique throughout the shop)

[QUOTE=soup;113832]
my metadata for the module[/QUOTE]

if I understood correctly you have to mention used blocks in metadata

[QUOTE=Hebsacker;113844]there is a typo, only one “g” would be correct - only in your post or as well in code?[/QUOTE]

  • just in post
    thanks !

I still dont get the smarty parent bit ?
At the moment, as i understand it, the block “details_tabs_pricealarm” is “overwritten” with my block ?
How would i append / prepend it ?

[QUOTE=Hebsacker;113844]if I understood correctly you have to mention used blocks in metadata

hmmm true, although it says there “On module activation they are automaticly inserted into database” - so should i not have insterted manually int othe db ?

WOW its actually works :slight_smile:
…there is of course a but, i have deleted the tmp, updated the views, and in the frontend it works, but for some reason now in the backend, by admin modules, i can see the lower right frame, but not the top frame, where the modules should be listed, just a blank page, no modules listed to click on and then activate or deactivate ?
ideas ?

EDIT ONLY WORKS IN 4.7.2 - in 4.6.2 i’m still getting the error

Allowed memory size of 134217728 bytes exhausted (tried to allocate 50 bytes) in /var/www/bartels462/core/oxutilsobject.php on line 150 

caused by the repeated loading of anfrage class - any ideas why ?