i am a novice person to magento.I installed magneto 1.9.2.4 version.I need to create the extension for magento.I learned about the file structure of creating extension but cannot know how to run.Can anyone specify how to run the extension?
Advance Thanks!
/var/www/html/magento/app/code/local/Multidots/HelloWorld/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Multidots_HelloWorld>
<version>0.1.0</version>
</Multidots_HelloWorld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Multidots_HelloWorld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
<admin>
<routers>
<helloworld>
<use>admin</use>
<args>
<module>Multidots_HelloWorld</module>
<frontName>admin_helloworld</frontName>
</args>
</helloworld>
</routers>
</admin>
</config>
/var/www/html/magento/app/etc/modules/Multidots_HelloWorld.xml
<?xml version="1.0"?>
<config>
<modules>
<Multidots_HelloWorld>
<active>true</active>
<codePool>local</codePool>
</Multidots_HelloWorld>
</modules>
</config>
/var/www/html/magento/app/code/local/Multidots/HelloWorld/controllers/IndexController.php
<?php
class Multidots_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action{
public function indexAction() {
echo "Huhh...., I knew you can do it!!!n";
echo "Let's do it in proper way, you konow... ;) :D :P";
}
}
?>
i run this code using http://localhost/magento/helloworld also http://localhost/magento/index.php/helloworld but i got error
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Store.
Go back to the previous page.
Use the search bar at the top of the page to search for your products.
Follow these links to get you back on track!
Store Home | My Account
can anyone suggest how to run?
I think you are asking for creating extension from scratch right?
Please check this link for creating simple extension.
http://inchoo.net/magento/programming-magento/magento-hello-world-module-extension/
And for run that extension please reload the front or backend of the Magento.
Thanks
Related
I want to make the manager app to work with LDAP, at the moment i have managed to make manager app to work with the realm org.apache.catalina.realm.MemoryRealm but i need to make it work with this realm org.apache.catalina.realm.JNDIRealm. I have set the realm in the context.xml file like this:
<Realm resourceName="nalytics-web-ldap-realm" allRolesMode="authOnly"
className="org.apache.catalina.realm.MemoryRealm" connectionName="uid=admin,ou=system"
connectionPassword="myPassword" connectionURL="ldap://localhost:10389"
debug="99" userBase="ou=product,o=company,dc=com" userRoleName="memberOf"
userSearch="cn={0}" userSubtree="true" />
and my tomcat-users.xml is:
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="deployer" password="deployer" roles="manager-gui,manager-script"/>
</tomcat-users>
Finally my manager.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
</Context>
What settings/configurations do i need to do in order to make manager app to work with realm org.apache.catalina.realm.JNDIRealm? After researching i found that i have to create role names in LDAP and put there the username and then change the WEB-INF/web.xml of the manager to match the new role names but i am not sure as i haven't done something similar before.
Anyone who has achieved to make the manager app to work with LDAP it would be very helpful to share what they did.
I have read a lot of threads with the MissingResourceException problem.
I'm using Primefaces 5.1.3
In my case I have the error :
java.util.MissingResourceException: Can't find bundle for base [...], locale
In face-config.xml :
<message-bundle>message.erreur.MsgErreurPrimefaces</message-bundle>
And in my sources :
The war is packed in an EAR. It works fine when I keep the default context root but if I change the context root, I get the message.
The file is present in the war's WEB-INF folder under :
WEB-INF/classes/message/erreur/MsgErreurPrimefaces_fr_FR.properties
Thanks
I have encountered this kind of error before and my problem has been corrected by editing as below. First of all, I would recommend you to add and test the MsgErreurPrimefaces.properties file.
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<resource-bundle>
<base-name>message.erreur.MsgErreurPrimefaces</base-name>
<var>myBundle</var>
</resource-bundle>
</application>
<application>
<message-bundle>message.erreur.MsgErreurPrimefaces</message-bundle>
<locale-config>
<default-locale>fr_FR</default-locale>
<supported-locale>fr_FR</supported-locale>
<supported-locale>en_US</supported-locale>
</locale-config>
</application>
</faces-config>
We have one xml configuration file that we use in production. We also have a little test app that has a couple of additional needs. What I'd like to do is create a second, testing-only xml config file that references the embedded production configuration file. Is there any way to do this?
I'm aware of the "include" element, but am not sure where in the file it is supposed to be placed--in the castle node? The components node?
I feel like the answer is here but I'm too dense to figure it out.
Thanks for any help you can provide.
UPDATE
This is how our production config file is set up:
<?xml version="1.0" encoding="utf-8"?>
<OurCompany>
<Framework>
<castle>
<installers>
<!-- some installers-->
<installers>
<components>
<!--some components-->
<components>
<castle>
<Framework>
<OurCompany>
My most recent attempt at a non-production config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<OurCompany>
<Framework>
<castle>
<include uri="assembly://AssemblyContainingEmbeddedXml/MyEmbeddedConfig.xml" />
<components>
<!--components I only want registered with container when running in non-production environment-->
<components>
<castle>
<Framework>
<OurCompany>
The exception I get reads:
Configuration parser encountered Framework, but it was expecting to find installers, facilities or components. There might be either a typo on or you might have forgotten to nest it properly.
(In the actual message, "Framework," "installers," "facilities," and "components" are enclosed in angle brackets.)
The bottom of the page you reference has an example of loading from an embedded resourced:
IResource resource = new AssemblyResource("assembly://Acme.Crm.Data/Configuration/services.xml");
container = new WindsorContainer(new XmlInterpreter(resource));
I downloaded monodriod yesterday and was following the hello world tutorial, and came across a problem in monodevelop with resources i couldnt figure out.
When i changed the names of the two string resources in String.xml, the partial String class in Resource.designer.cs wouldnt update when i rebuild the solution. I tried building cleaning restarting the solution, but nothing worked. I then tried removing the partial String class hoping that might force itself to regenerate, but no luck that just brought a compile error.
\HelloM4A\HelloM4A\Resources\layout\main.axml(0,0): Error: No resource found that matches
the given name (at 'text' with value '#string/hello'). (HelloM4A)
can anybody give me a pointer to what i have been doing wrong.
thanks
tut:
http://docs.xamarin.com/android/getting_started/hello_world
It seems that you have not updated main.axml to use the new string name:
Use: #string/<SOME_NEW_NAME_HERE>
Main.axml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ... >
<Button ...
android:text="#string/<SOME_NEW_NAME_HERE>" />
</LinearLayout>
Strings.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
...
<string name="<SOME_NEW_NAME_HERE>">Hello Mono for Android</string>
</resources>
How can I inject the value of an appSettings entry (from app.config or web.config) into a service using the Windsor container? If I wanted to inject the value of a Windsor property into a service, I would do something like this:
<properties>
<importantIntegerProperty>666</importantIntegerProperty>
</properties>
<component
id="myComponent"
service="MyApp.IService, MyApp"
type="MyApp.Service, MyApp"
>
<parameters>
<importantInteger>#{importantIntegerProperty}</importantInteger>
</parameters>
</component>
However, what I'd really like to do is take the value represented by #{importantIntegerProperty} from an app settings variable which might be defined like this:
<appSettings>
<add key="importantInteger" value="666"/>
</appSettings>
EDIT: To clarify; I realise that this is not natively possible with Windsor and the David Hayden article that sliderhouserules refers to is actually about his own (David Hayden's) IoC container, not Windsor.
I'm surely not the first person to have this problem so what I'd like to know is how have other people solved this issue?
I came up with a solution for this eventually based on hints from various sources on the web. The end result though involved pretty much copying three classes from Windsor verbatim and modifying them just a little bit. The end result is up on codeplex for your enjoyment.
http://windsorappcfgprops.codeplex.com/
I originally wrote this code quite some time ago so it's based on Windsor 1.0.3 - yes, it took me that long to get around to publishing the result!
The code allows you to have this in your app.config (or web.config, obviously):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="theAnswer" value="42"/>
</appSettings>
</configuration>
...and access it from your Windsor XML config file like this:
<?xml version="1.0" encoding="utf-8" ?>
<castle>
<components>
<component
id="answerProvider"
service="Acme.IAnswerProvider, Acme"
type="Acme.AnswerProvider, Acme"
>
<parameters>
<theAnswer>#{AppSetting.theAnswer}</theAnswer>
</parameters>
</component>
</components>
</castle>
There's a working example in the solution.
I wrote a post about a similar case a couple of months ago. It uses a SubDependencyResolver to inject the appropriate parameters. In your case, you can just change DynamicConfigurationSettings for ConfigurationManager.