Thursday, October 22, 2009

Magento

CMS name:Magento http://www.siteground.com/tutorials/magento/
http://www.magentocommerce.com/support/magento-user-guide-book/table-of-contents
is based on Zend Framework http://framework.zend.com/

Inno DB issue in wamp 2.4
Download Url: 
http://www.magentocommerce.com/download.

System Requirements: http://www.magentocommerce.com/system-requirements
Other Helpful links:


Magento user's guide: http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide
Magento support: http://www.magentocommerce.com/support/overview
Magento screencasts: http://www.magentocommerce.com/media/screencasts

Good link :http://www.richardcastera.com/tag/magento/

SVN details

Class and interface documentation

CMS Type:


Installation: Install sample data into the first and then call magento url
http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide
http://www.siteground.com/tutorials/magento/magento_installation.htm

Installation errors (protocol error http://,https etc) and database connection error
www.magentocommerce.com/boards/viewthread/460305/#t467824
http://www.magentocommerce.com/boards/viewreply/467822/
if sample data is to be imported follow the steps below after installation

drop database
if table_prefix was set remove it (in app/etc/local.xml)
After installation unzip magento-sample-data-1.2.0.zip,copy media folder into magento folder (overwriting the original one there) and import the sql file

d:
cd D:\wamp\bin\mysql\mysql5.1.33\bin
mysql -u root  magento < magento_sample_data_for_1.2.0.sql
default admin login is
admin
123123

sample user in sample data

john.doe@example.com
123123


Admin login issue

with localhost/ admin login works only in opera
to enable admin login in firefox follow the steps below(not worked yet though)

http://www.nickbartlett.com/wordpress/magento-cannot-log-into-admin/
http://web-funda.blogspot.com/2009/07/magento-admin-login-problem.html
The solution is to add the following line to your hosts file so you can access your localhost as www.localhost.com.
C:Windows\System32\drivers\etc\hosts (edit this file in notepad)
127.0.0.1        magento.localhost.com www.localhost.com

Other solutions
http://asia-connect.com.vn/2009/04/after-installing-magento-cant-log-in-to-admin-panel/

http://www.vinagento.com/blog/magento-tutorial/fix-admin-login-issue-when-install-magento-at-localhost/
for magento 1.4

edit app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
replace 'httponly' => $cookie->getHttponly() with 'httponly' => false
 actually no need to change code .first time login with opera browser
go to admin >>System>>Configuration >>Web>>Session Cookie Management
set 'Use HTTP Only' to 'No'

to get default store code:
Mage::app()->getStore()->getCode();
 

Demo store
http://demo-admin.magentocommerce.com/

admin
http://demo-admin.magentocommerce.com/index.php/admin/
admin
123123

Tips
http://visionwidget.com/inspiration/web/374-free-magento-extensions.html


Add addtional admin user to magento



Whoops our bad issue when trying to access product details page in frontend
Cache control is located in admin panel at System > >  Cache Management
Set All Cache in Cache control to 'disable' and submit the form
Magento: Clear the cache with PHP script.(not tested)

Class files missing error

Extensions folder

Installing extensions from magento connect  through admin panel
File permissions for magento connect

Free Magento Template
In case categories are not showing in this template
  1. check catalog.xml in \app\design\frontend\blank\lloyds\layout
  2. check the
    < reference name="top.menu" >
    < block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/ >
    < /reference >
  3. check if there is template/catalog/navigation/top.phtml
  4. if not copy the file from default template.
Custom attributes as in virtuemart

vide of custom attributes http://www.magentocommerce.com/magento-on-the-fly/custom-product-options/

magento WSDL API (url of wsdl  in magento site is index.php/api/?wsdl)    example of export with soap
http://www.magentocommerce.com/boards/viewreply/113901/
    First: I created a web services user in Admin -> Web Services -> Add new user
    Second: I created a new Role for that user in Admin-> Web Servivces -> Roles and gave it full access to all services.
    Third: I assigned that new role to the new user
    My Webservices user is “soaper” and the key or password is also “soaper”.
overriding a model or block(customize part of a configuration)

Add to cart with custom price based on attribues and Values
add a field ringsize to table `sales_flat_quote_item`.
ALTER TABLE `sales_flat_quote_item` ADD `osol_field_custom_size` VARCHAR( 10 ) NOT NULL 
Product details page : app\design\frontend\default\default\template\catalog\product\view.phtml

Product Item in list page:app\design\frontend\default\default\template\catalog\product\list.phtml
add input box inside < ?php if($_product->isSaleable()): ? >(should edit for both // List mode and  //Grid Mode )

add in \app\code\core\Mage\Core\Block\Template.php :class Mage_Core_Block_Template
public function showCustomSize()
    {
        ?>
        Size : < input name="customSize" size="3" type="text" />

            }

  in app\design\frontend\default\default\template\catalog\product\view.phtml
add
$this->showCustomSize() where needed
http://magentodev.blogspot.com/2009/05/how-to-import-products-with-custom.html
http://todd.be/notes/exporting-importing-magento-product-options

To update products using Mage:getSingleTon('catalog/product')- >load($product_id)- >setSku('newSku')- >save();
* Updated the core code (/app/code/core/Mage/Eav/Model/Entity/Abstract.php)  so it checks for a valid array on line 970.
* Added the following call to the controller:

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

http://www.magentocommerce.com/boards/viewthread/67133/ 

dynamic product creation http://magentoexpert.co.uk/2009/02/10/creating-magento-products-on-the-fly/

http://activecodeline.com/programatically-manually-creating-simple-magento-product

http://ecommlab.com/21/how-to-import-images-into-magento/
 image management through admin
changing product image sizes by editing code  and  this

Delete all products




Terminology:

Tips: 
  1. Configuration:http://www.magentocommerce.com/wiki/how-to/customize_part_of_configuration
  2. Add Website:Admin > System > Manage Stores > Click Create Website
  3. Add Store:Admin > System > Manage Stores > Click Create Store
  4. To create a Role, navigate to System > Permissions > Roles and click Add New Role.
  5. Add Category, import category  summary (with images ),direct import with php and mysql
  6. Manufacturers : is added as attribute
    http://littleripplesproject.blogspot.com/2009/03/adding-new-manufacturer-field-to.html
  7. Add product
  8. Stock enabling and disabling  Configuration, and click on the 'Inventory' under 'Catalog' tab in the left column.
  9. Product Types : Simple,virtual,bundled,downloadable,  Configurable Products ,Grouped Products
  10. Attributes
  11. Tax :System> Configuration > Sales > Tax > Tax Classes > Tax Class for Shipping . video .importing
  12. discount: Admin > Promotions :forum thread
    - It is possible make discounts per customer
    - It is possible make discounts per product
    - It is possible make discounts by category
    - It is possible make discounts for the purchase value of a particular category
  13. coupon :article
  14. Customer Group :Customers > Customer Groups
  15. Payment Modules : System> Configuration > Sales >
  16. Shipping modules : System> Configuration > Sales >
  17. Export
  18. Export categories and this
  19. Export products : Under Magento Admin, go to System → Import/Export → Profiles (profiles are saved in 'dataflow_profile' table) will be exported into \var\export\export_all_products.csv  Forum discussion
  20. Export products with addtional images  :http://devzone.pratthost.com/2009/10/09/magento-import-multiple-images-for-products-module/comment-page-1/
  21. Import category structure with products using DataFlow
  22. Creating a copy of siteChange values of web/unsecure/base_url and web/secure/base_url in core_config_data table.
  23. Import SQL http://activecodeline.com/moving-magento-site-from-development-to-live-server

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;



    Notice
    Undefined index:  0  in /home/sygma/www/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

    http://www.magentocommerce.com/boards/viewthread/23276/P15/
  24. ERROR: failed to mkdir  after porting from one servet to another

    Follow the steps and you’ll get it done. magento/downloader/pearlib/pear.ini
    Delete the file - don’t try to edit it - it doesn’t work

    http://www.magentocommerce.com/boards/viewthread/3379/

  25. moving magento from one site to another http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
  26. problem with SEF URLS http://www.magentocommerce.com/boards/viewthread/1590/

  27. Add site / multi store http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/   different stores in frontend
  28. Layout customizations (skins):to change akin Admin > Design > Add  design change (later edit this)http://www.magentocommerce.com/wiki/how-to/designing/designing-for-magento
  29. http://vincirufus.wordpress.com/2009/06/12/magento-templating-jumpstart/ 
  30. http://magentotuts.wordpress.com/2009/05/25/understanding-templates/
  31. http://www.chr00t.com/2008/06/magento-theme-customization/
  32. http://www.magentocommerce.com/boards/viewthread/1210/  
  33. http://www.free-ebusinesshelp.com/magento/how-to-edit-the-magento-footer-footer-links.html
  34. Adding custom structuralblock: http://inchoo.net/ecommerce/magento/custom-reference-structural-block/
  35. Show products in home page

    {{block type="catalog/product_list"  category_id="2" template="catalog/product/list.phtml"}}

    cheange id to the id of the rquired category

  36. retrieving base urls in php/phtml files magento http://activecodeline.com/retrieving-url-paths-in-magento see also http://www.magentocommerce.com/boards/viewthread/16324/
  37. getting current url in template :http://blog.chapagain.com.np/magento-get-current-url-of-the-page/

    at any place you can get the current url with Mage::helper('core/url')->getCurrentUrl();











  38. $this->getRequest()->getRequestString()
    or











    $this->getRequest()->getRouteName()
    to get the first subfolder like “customer” or “checkout”

    eg:if(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' && Mage::getSingleton('cms/page')->getIdentifier() == 'home')

  39. creating admin  urls
    http://subesh.com.np/2010/03/generating-backend-admin-url-key-parameters-magento/#more-228
  40. changing title,keyword,meta description :http://blog.chapagain.com.np/magento-setchange-page-layout-title-tag-meta-keywords-and-description/
  41. Setting breadcrumbs :http://blog.chapagain.com.np/magento-easily-add-breadcrumbs-to-any-page/ 
  42. url tags used in magento cms pages http://www.magentocommerce.com/wiki/markup_tags
  43. setting  messages to show in 'global_messages' http://activecodeline.com/utilizing-magento-notification-system
  44. in template file it can be retrieved as echo $this->getUrl('')  or echo $this->getUrl('contacts') etc
    same as Mage::
    getUrl('')
    I had an issue with https in my custom module,my work around was like this
    $loadFromSSL = $_SERVER['SERVER_PORT']==443?true:false;
    Mage::getUrl('', array('_secure'= >$loadFromSSL))
  45. Change logo file through admin panel:http://www.magentocommerce.com/boards/viewreply/141205/
  46. Stuck on billing information in checkout 
  47. one page checkout breaks if right-column div class names are changed
  48. Email Templates Path is \app\locale\en_US\template\email\
  49. Very good magento tutorial http://alanstorm.com/category/magento 
  50. http://stackoverflow.com/questions/576908/how-does-magento-code-work
  51. Creating custom module
  52. Creating custom module example 2:Custom contact us form with zend mailing fuction
  53. Creating addtional product tab with frontend display http://ecommerce.aheadworks.com/free-stuff/video-module.html
  54. Best seller module : 
  55. Adding Language pack :http://inchoo.net/ecommerce/magento/adding-a-new-language-in-magento/
  56. customizing magento code

    important files and folder

    app/etc/modules/XyzCorp_Catalog.xml
    app/code/local/
    app/code/local/XyzCorp/Catalog/etc/config.xml 
  57. Overloading Controllers
  58. How to Add a Custom Module for Custom Admin Config Options
  59. To get rid of index.php from magento urls ,in configuration set 'Use Web Server Rewrites' to 'Yes'
  60. To show subctegories with images
    http://www.magentocommerce.com/boards/viewthread/14527/   and http://onerutter.com/web/magento-custom-category-images-listing-block-tutorial.html
  61. Show subcategories of active category in left nav

    http://www.magentocommerce.com/boards/viewthread/4810/P0/
    New file -app\design\frontend\blank\default\template\catalog\layer\homeview.phtml
    Edit file - app\code\core\Mage\Cms\controllers\Indexcontroller.php

  62. Use magento code for custom pages(eg:logged in,cart contents etc)
  63. Some API Tips
  64. Database tables and fields of categories and tables
  65. Write custom queries
    Database connection object in magento(lib\Zend\Db\Statement\Pdo.php) http://gogotuts.com/site/node/10    
    to run select
    $data = Mage::getSingleton(’core/resource’) ->getConnection(’core_read’)->fetchAll($sql);
    to run other queries
    http://www.magentocommerce.com/boards/viewthread/2235/
    Mage::getSingleton('core/resource') ->getConnection('core_write')->query($sql);
    can also run prepared queries like this
    $sql         "INSERT INTO 











































































     SET field1 = ?, field2 = ?, ..."; $connection->query($sql, array($field1_value$field2_value, ...)); last insert id http://www.magentocommerce.com/boards/viewthread/51096/
  66. Template positions
    To know which all phtml files are included fo each postions
    edit
    \app\code\core\Mage\Core\Block\Template.php

    add

    echo "".$this->_viewDir.DS.$fileName."";

    just above

    include $this->_viewDir.DS.$fileName;
  67. another usefull url for template
    http://www.topinternetguides.com/2008/05/26/magento-tutorial-turning-on-template-path-hints/

    http://classyllama.com/development/magento-development/enable-templateblock-hints-in-admin-panel/
    Footer links editing

    Compare Products
    ================

    \app\design\frontend\blank\lloyds\template\catalog\product\compare\sidebar.phtml

    NewsLetter
    ==============

    app\design\frontend\blank\lloyds\template\newsletter\subscribe.phtml

    Polls
    =====

    app\design\frontend\blank\lloyds\template\poll\active.phtml

    Cart
    =====

    app\design\frontend\blank\lloyds\template\checkout\cart\sidebar.phtml

    FrontEnd Dashboard
    ===================

    app\design\frontend\blank\lloyds\template\customer\account\dashboard.phtml

    Customer registrationa nd related forms
    =======================================

    \app\design\frontend\blank\lloyds\template\customer\form

    logout
    ======

    app\design\frontend\blank\lloyds\template\customer\logout.phtml

    order
    =====

    \app\design\frontend\blank\lloyds\template\customer\order\view.phtml

    breadcrumbs
    ===========

    app\design\frontend\blank\lloyds\template\page\html\breadcrumbs.phtml

    Reecntly compared products
    =============================

    app\design\frontend\blank\lloyds\template\reports\product_compared.phtml


    Reecntly viewed products
    ========================

    app\design\frontend\blank\lloyds\template\reports\product_viewed.phtml


    Currency Header
    ===============

    app\design\frontend\blank\lloyds\template\directory\currency_header.phtml
    get Currecy code(like USD,GBP)

    $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
    Product under category
    ======================

    app\design\frontend\blank\lloyds\template\catalog\product\list.phtml

    Product Description
    =====================

    app\design\frontend\blank\lloyds\template\catalog\product\view.phtml
  68. Config viewer :http://alanstorm.com/magento_config
  69. handling static blocks
  70. Writing a custom magento module
  71. Security Issues:Backup : Porting:Good Reference URLS:Entity Relationship::downloadsGeneral Details
    1. What are the main features ?
    2. Type of users
    3. What can be done for each user?
    4. What features can be extended?What can be added?
    5. Main Extensions:Shopping cart,Forum,Seo,Gallery,Blog
    Admin:
    1. How to enable and disable offline mode
    2. What all can be monitored? 
    3. How can a content be added
    4. How can menu items be controlled?
    5. How can template be changed?
    6. How SEO is enabled?Limits of basic SEO options
    7. How meta tags are set?
    8. How mass mail is done?
    9. Banner Management:
    10. News letter
    11. RSS
    Backend:
    1. How doest it differentiates betwee users
    2. How ACL works
    3. how could login be emulated
    4. how can i know if a user is logged in and get user details?
    5. How could logout be emulated
    6. How could registration be emulated
    7. How a user record be emulated.
    8. How could a user be deleted
    9. How can a content be added,edited and deleted
    Programming Core CMS
    1. Steps of Skinning screencast
    2. Steps for customizing menus
    3. Steps for creating an extention:Extenstion Type:Details
    Popular Extensions
    1. Ecommerce:
    2. SEO:
    3. Blogging:
    4. Gallery:
    5. Calendar:
    6. Forums:
    7. Directory Listings:
    8. Social neworking:
    9. Multi Language
    10. Other:
    Adding captcha http://www.fontis.com.au/magento/extension/recaptcha AJAX with magento http://subesh.com.np/2009/11/working-with-ajax-in-magento/ creating a payment module: http://www.lakevillewebdesign.com/how-to-create-magento-payment-module/ Blog module http://ecommerce.aheadworks.com/blog.html To check if the current page is a CSM page in a template  $cmsPage=(in_array(Mage::app()- >getFrontController()->getAction()- >getFullActionName(),array('cms_page_view')));//'cms_index_index' is home page  //Mage_Cms_IndexController is the class of the home page controller To know which controlloller,action or module is used from template  //check http://blogchapagain.com.np/magento-how-to-get-controller-action-and-module-name-in-template-file/ to get module ,controller,action name in template     /* echo $this->getRequest()- >getParam('page_id');     echo "< pre >";         print_r($this- >getRequest());     echo "< /pre >";     */ to get $_REQUEST outside phtml files use this $appCls = Mage::getSingleton('core/app'); $params = $appCls- >getRequest()- >getParams(); Creating a magento module http://codes.prometsupport.com/2009/05/27/magento-how-to-create-an-extension-with-its-own-layout/ http://www.magentocommerce.com/magento-connect/Daniel+Nitz/extension/1108/modulecreator Packinging for magento connect http://www.magentocommerce.com/wiki/packaging_a_magento_extension http://www.magentocommerce.com/wiki/how_to_use_magentoconnect possible error messages:
    1. Invalid tag order in , found  expected one of "lead"

      solution:When you create a new package. You need to add a “Maintainer” with Level “Lead”. 
    Manually downloading extension file tgz/direct download url of a custom module http://www.magentocommerce.com/boards/viewthread/198339/ 
    http://connect.magentocommerce.com/community/get/EXTKEY_EXCLUDING(magento-community/)-VERSION.tgz eg:
http://connect.magentocommerce.com/community/get/
magento_easy_lightbox-1.0.1.tgz

if you are looking for the package of an already installed community module,its tgz will be there in your site at
downloader/pearlib/download/ folder 

if you are creating a package for magento connect the tgz and the xml file of paths and other details(not package.xml) eg:outsourceOnlineCaptcha.xml will be saved in var\pear folder you can use this xml to modify and repackage the extension to submit a revised version of the module to magento connect

      Manually Uninstalling a module from magento
       
       
      DELETE FROM `core_config_dataWHERE path LIKE 'payment/something%'; DELETE FROM `core_config_dataWHERE path LIKE 'Ve;ndor_Something%';  DELETE FROM `core_resourceWHERE `code`='something_setup';DELETE FROM `eav_attributeWHERE attribute_code LIKE 'something%';  DROP TABLE IF EXISTS `something_audit_log`;     Magento Outsourcing And Customization,Hire Magento Developers 

      10 comments:

      1. That is so nice of you for sharing this very helpful info. I want to know that how to give different pages to different category in Magento.
        Magento Online Templates

        ReplyDelete
      2. you need a custom magento module for that

        ReplyDelete
      3. I just a want to thanks for writer.It is really great.I am happy to found your blogs.Thanks for making a wonderful blogs.

        Joomla developer

        ReplyDelete
      4. Its really a good collection of websites for creating Magento website.It will be helpful for the beginner as well as the experts. Hire Magento Designer

        ReplyDelete
      5. Hello, According to me this article is good and it is worth reading. Here is a site from which you all can also learn about magneto customisation-

        http://www.thewebartists.com/services-ecommercesolutions.php

        ReplyDelete
      6. Excellent comments with interesting topics and very useful resources. Thanks for sharing. ...

        Commercial doors

        ReplyDelete
      7. Its great really! thanx for share to everyone...
        Bespoke Shower Cubicles

        ReplyDelete
      8. Great Read! I am impressed on how you make your article easy to understand. I'll come back for more :D

        Japs Buidon is a Social Media Specialist and belongs to a team of Magento Developer in Florida. He loves hiking as well as electronics.

        ReplyDelete
      9. Due to the rapid increase in eCommerce marketing, the overall economy has increased over the past time. Along with this crucial time, online growth for Magento eCommerce development became more important. In short, Adobe sensei revealed new product recommendations for Artificial intelligence (AI) as well as machine level language to customers, including businesses.

        ReplyDelete