Magento Module config.xml - magento

I'm learning Magento extension developing, Already understand enough to start with PHP OOP, MVC and Zend framework.
Now i need to understand the concept of config.xml file in the /etc folder in my module, Already found table explain each entry like what is ,, .. etc.
But i need to understand in more details how it works.
An example of what in my mind is to add for example (new payment method) it will be easier to explain with example.
Already created my controllers, models, blocks .. etc folders.
Anybody can explain it in details or provide me with resources?

I found this quite useful as a starting point
http://coding.smashingmagazine.com/2012/03/01/basics-creating-magento-module/
I'm still learning module development but the module works

Related

Is it possible to use Twitter Bootstrap to create a Magento site?

A client wants a Magento site done, and I have never used it before. I thought, "Sure, I'll create a standard site using Bootstrap and just query the database for the products". Now that I've been looking into it, it looks like the only way to use Magento is by creating a Theme which doesn't look to be Bootstrap friendly.
Please someone tell me that creating Themes isn't the only legitimate way of creating a Magento site.
Some starting points:
http://www.bootstrapstart.com/portfolio-type/bootstrap-magento-theme/
http://magenthon.com (info and code) or demo here
https://github.com/cvaldemar/magento-bootstrap (doesn't seem too active though ?)
If this is something you are planning on doing yourself, the second link looks like a promising candidate to download, reverse engineer then cusomise!
Good luck
https://github.com/webcomm/magento-boilerplate
http://www.webcomm.com.au/blog/2013/09/introducing-magento-boilerplate-a-twitter-bootstrap-3-powered-html5-mobile-first-starter-theme
Newest, Magento 1.8 supported
Yes, Try this Magento Bootstrap framework but it's unstable version.

Need documentation for Magento Models (Mage::getModel())

I've read Alan Storm's guide here on Magento ORM principles and how to access the data. I'm writing a plugin to export data from magento.
Question
Where do I find documentation for the different types of models available in Magento?
For example,
Mage::getModel("catalog/categories");
What are the other allowable models in getModel?.
There's some information in the API documentation, like product.list, and if I were to guess, then I would say that this some how translates over to the getModel call, but i'm not sure how. Can anyone link me? google searches for "getModel documentation" and
"Magento models" produce no relevant results.
Here are the links I have looked at:
DB Diagram
SO Question
getModel and getData methods
Alan Storm's guide
So far, Alan's stuff has been the most helpful.
Help me, #Alan Storm :)
You should dig into code. Using getModel you're able to get an instance of each class of each module which is located in Models directories. In catalog/product_option_a_b_c expression, the fitst part (catalog) references to module and the second part references to Product/Option/A/B/C.php file in the Models directory of catalog module. So if you want to get an instance of Mage_Sales_Model_Quote_Address class, you need this: Mage::getModel('sales/quote_address')
you probably know that magento is comprised of several MVC modules so according to its standard each module has a Model directory. getModel() uses this structure to find which model you want to load. basically the call is in this format:
module/path_to_the_name_of_model_including_the_model_file_name
remember not to include model directory and use underscore to separate directories. also the name of the directories are in lowercase however in reality they start with uppercase.

Joomla extension for people posts with categories

Are there any type of extensions that let people post what they want with categories. So they need to sign-up and sign-in, and then create a new post, then select the relative category that the post will be shown in to other people.
I may need to show posts by geo-localisation restriction, for example, posts appears in just US or UK.
I'm a PHP developer. I can achieve this system, but I wondered if it does already exist some CMS like Joomla doing what I need, to save time. I may also be able to develop such Joomla modules if it's allowed. Please need a push around these requirements since I don't have too much experience with Joomla.
I would recommend you use the article section of joomla which is a built in one. I think the things available in joomla package will suit your category, post and signin and signup requirements.
For geo-localisation restrictions I think your php knowledge is more than enough to change or modify few parts of the code in the joomla. I think this way will help you save some time. I have done these before.They have worked fine for me. Hope this helps you.

code igniter framework guidance for beginners

I am just a beginner in code igniter. I have just downloaded the code igniter framework. But i don't know that where should i keep my html, php files and stylesheets, images etc. Is there any procedure to do the things? Please guide me.
CodeIgniter has an awesome user guide that will come with the install you can read through (or read it online at - http://codeigniter.com/user_guide/ ), or you can watch some of the videos on their site - http://codeigniter.com/tutorials/
In comparison to most other frameworks you're going to find they have maybe the smallest learning curve and great documentation. I would also recommend learning basic PHP and getting familiar with your web environment maybe before beginning.
I used these tutorials to help get me started with the framework haven't look back since! http://net.tutsplus.com/sessions/codeigniter-from-scratch/
hi I am a weekend coder and picked up CI about a year ago.
It helped me a lot.
The best tutorial I found was on the IBM's developer site. It runs through putting together a simple application. Admittedly, there's nothing in it about directory and file placement but it helps cement ideas about how models, views and controllers (MVC), and why MVC is so helpful. Because the basic idea is quite simple, it's worth running through a simple CI tutorial again and again till you 'feel' or intuit the basic helpfulness of the setup.
Things like JS, CSS files can be kept in their own folders at the first level of your website folder e.g /js or /css or /images. You ask about PHP files as well. PHP files which you, the coder, write, are either 'views', 'models' or 'controllers'. These go in the folders with those names in the /application folder e.g /application/views/yourview.php or /application/controllers/yourcontroller.php. The CI install comes with a default view file and a default controller, which you are probably already aware of.
The files inside /application/config are important as well. Read the user-guide about tweaking these files. The most obvious tweaks are to database.php to connect to your db, autoload to give automatic use of CI helpers/libraries which you can choose, and to config.php to give CI the name of your website e.g the name you give to '/'.
The file 'index.php' comes with the CI installation (/index.php). You don't need to fiddle with it at all really except to determine the level of error reporting you want ('environment') and that's not a priority at all. But it's important to remember this about index.php - that CI uses it as the essential reference for defining paths to useful folders like CSS or images. So even if your view file is in /application/views, if it refers to an image like a logo.gif in /images for example, the path to it is just /images/logo.gif. It is not anything more complicated like ../../images/logo.gif.
I hope that helps.
Tom
Offline version of CodeIgniter user guide is available with CodeIgniter which already downloaded by you.
just extract your CodeIgniter zip file in your localhost server root directory,
Then http://localhost/www/CodeIgniter_2.1.2/user_guide/ open this url with browser ,here you can access offline version of CodeIgniter user guide.
Here I am using wamp server so I used this url, If you are using xampp server then please use http://localhost/CodeIgniter_2.1.2/user_guide/
Okay this is what I would usually do for code igniter
here is my directory structure.
CI App Path (e.g "c:\xampp\htdocs\ci_app_name" )
-application
-system
-assets
--css (new folder , where css files will be included)
--js (javascript and jquery libraries location)
Basic HTML and PHP files should be location
CI_app_pah
-application
--views (this is where to put HTML and PHP files)
For other things such as Controller , Models and Views , you can't put any where but put in their related area.
That will be
CI app
-application
--controllers
--models
--views

Magento - local controller is not working

I have a question regarding Magento's local directory.
I am trying to override a core controller - Mage/Contacts/controllers/IndexController.php.
So I copied IndexController.php to /app/local/Mage/Contacts/controllers/
but Magento is still using core file. I can confirm it because I see 404 page when I rename Mage/Contacts/controllers/IndexController.php to IndexController.php_.
Please advise me.
Thanks!
Copying a controller into the app/code/local path doesn't work unfortunately due to Magento's autoload architecture. It does work with Blocks, Models and other objects, but not controllers.
There is a detailed walkthrough of how to override a controller on the wiki. And a blog post by #prattski
Try following those, then come back with any specific questions.
HTH,
JD

Resources