2

I am working on a quotation form module I would like to implement on my Shop Home Page

My config.xml is (app/code/community/Mine/Quotemodule/etc/config.xml)

<?xml version="1.0"?> <config> <modules> <Mine_Quotemodule> <version>0.0.1</version> </Mine_Quotemodule> </modules> <frontend> <routers> <routeurfrontend> <use>standard</use> <args> <module>Mine_Quotemodule</module> <frontName>quotemodule</frontName> </args> </routeurfrontend> </routers> <layout> <updates> <quotemodule> <file>quotemodule.xml</file> </quotemodule> </updates> </layout> </frontend> <global> <blocks> <quotemodule> <class>Mine_Quotemodule_Block</class> </quotemodule> </blocks> </global> </config> 

app/etc/modules/Mine_Quotemodule.xml

<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Mine_Quotemodule> <active>true</active> <codePool>community</codePool> </Mine_Quotemodule> </modules> </config> 

app/design/frontend/rwd/default/layout/quotemodule.xml

<?xml version="1.0"?> <layout version="0.1.0"> <default> <reference name="content"> </reference> </default> <routeurfrontend_index_index> <reference name="content"> <block type="quotemodule/quoteformblock" name="quoteform_quoteformblock" template="quotemodule/quoteform.phtml" /> </reference> </routeurfrontend_index_index> </layout> 

app/code/community/Mine/Quotemodule/controllers/IndexController.php

<?php class Mine_Quotemodule_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } public function mamethodeAction() { echo 'test mamethode'; } } ?> 

app/code/community/Mine/Quotemodule/Block/Quoteformblock.php (unsued for the moment)

<?php class Mine_Quotemodule_Block_Quoteformblock extends Mage_Core_Block_Template { public function methodblock() { return 'informations de mon block !!'; } } ?> 

and I have a app/design/frontend/rwd/default/template/quotemodule/quoteform.phtml file containing my html form.

When I go to the url my www.myshop.com/quotemodule/index, It works.

I then tried to implement the form by calling the module in my CMS Home page, by adding in content :

{{block type="mine/quotemodule" name="quoteform_quoteformblock" template="quotemodule/quoteform.phtml"}} 

But when loading my homepage, it is empty..

Thank you for your help,

Alex

2 Answers 2

3

It looks like the block on your cms page is wrong.

I think it should be type quotemodule/quoteformblock the same as in the layout.xml file.

0
1

In the calling the module in CMS Home page is not proper. The Right module form calling is:

{{block type="quotemodule/quoteformblock" name="quoteform_quoteformblock" template="quotemodule/quoteform.phtml"}} 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.