Everybody's Changing

and I don't feel the same.

Category: Tech (Page 4 of 8)

Magento Customization

Basic Magento Directory Overview (by Moshe from Magento Wiki)

Important Paths
  / -Directory Root
      /app     – This is where all the php code for the application resides
      /lib     – The external code library.
      /skin    – This is where css and other images reside


Thats the quick overview.
  /app
      /code       – Where all modules reside
      /design     – Contains both layout xml files and template .phtml files
      /etc        – Global configuration
      Mage.php    – Static class Mage, where everything is held together.

Before I move on to the other two directories (/lib, /skin) I’ll explain the directories in this (/app) dir.
  /app
      /code
          /community     – Downloaded modules built by Magento community members
          /core          – The core modules ‘out of the box’ build by Magento
          /local         – Any module we build ourselves


Within these three subdirectories we find the /Mage directory. This is where all the modules should reside. Also, upon startup Magento includes the paths /app/code/core/ and /app/code/local. So, by default the system has access to those directories. Now here is the trick: If we create a module ‘RandomModule’ and within that model we create a ‘/model’ directory, we must follow a convention for every class we put inside that folder. For instance a class would be named the following:
class Mage_RandomModule_Model_SomeClass extends Varien_Object { }


With this convention we can call this class anywhere from within the application. Magento will take the name, replace underscores with forward slashes, include that file, then load the requested class, and return an instance of that class. Pretty cool.


As for the individual modules, you will see a directory pattern that all follow, it is pretty simple there. I have noticed that Magento likes to separate their model. For instance, there will be a directory that will ONLY contain classes/methods that query the db and return results. They follow that pretty strictly, I never see methods access db from within a model that is not dedicated to db access. They do that in their practice, we are not forced to do so, but I have tried it, it makes a lot of sense to me.


Thats pretty much it for the /app/code directory for now
  /app
      /design
          /adminhtml   -Admin designs
          /frontend    – Front End designs
              /default   -This is the default Interface, we can create other interfaces
                  /default – This is the default theme, we can also create multiple themes
                      /layout       – Contains all the layout xml files
                      /template     – Contains all the template .phtml files


Here, we can create multiple interfaces and themes within each interface. From the admin page in a browser, we assign a theme to each website or store. The power here is that we can create multiple themes, such as spring, christmas, or whatever, then they can be enabled and disabled by a simple click from the admin panel.
This interface/theme pattern is used again in our /skin directory from the root. This assures that when the administrator switches an interface or theme, the appropriate css sheets will be applied.
Also, very cool to me.


Lastly, lets overview the /skin directory from the root directory.
  /
      /skin
          /adminhtml   – Admin styles directory
          /frontend    – frontend styles directory
                  /default    – Our default interface
                      /default    – Our default theme
                          /css
                          /images
                          /js


Notice the correlation of the /skin directory to the /app/design directory.
To create a new interface or theme, we MUST make a new interface or theme in both of these directories or there will be mayhem!


Thats the basic directory structure overview.


– Store logo
  /skin/frontend/blank/default/images/logo.jpg
– Header
  /app/design/frontend/blank/theme081/template/page/html/header.phtml
– Top menu
  /app/design/frontend/default/lingeriestore/template/catalog/navigation/top.phtml
– Catalog pages
  /app/design/frontend/blank/theme081/layout/catalog.xml
  /app/design/frontend/blank/theme081/template/catalog/product/list.phtml
  /app/design/frontend/blank/theme081/template/catalog/product/list/toolbar.phtml
  /app/design/frontend/blank/theme081/template/catalog/layer/view.phtml
– Product detail
  /app/design/frontend/blank/theme081/template/catalog/product/view.phtml

– Removing the Compare function in Magento, the easy way
  http://www.aschroder.com/2009/07/removing-the-compare-function-in-magento-the-easy-way/

– Category layout to 2-column
  http://www.magentocommerce.com/boards/viewthread/16838/

– Remove “Recently Viewed” box
  http://www.magentocommerce.com/boards/viewthread/8365/

– Disable sidebar cart, tags and newsletter
  http://www.westwideweb.com/wp/2008/11/29/magento-disable-sidebar-cart-tags-and-newsletter/

– Edit orders with Configurable Products
  http://www.chilipepperdesign.com/2009/08/10/how-to-edit-orders-with-configurable-products-in-magento

– Misc
  http://roysimkes.net/blog/2008/09/using-custom-php-codes-on-magento/
  http://magentoexpert.co.uk/2009/05/23/tips-for-creating-dynamic-category-landing-pages/
  http://www.chilipepperdesign.com/2009/03/03/how-to-add-dynamic-content-to-magento-static-blocks-and-pages
  http://inchoo.net/ecommerce/magento/custom-reference-structural-block/
  http://devzone.pratthost.com/2008/10/27/magento-displaying-categories-and-current-subcategories/comment-page-1/

World Wide Web



Windows 3.1 쓸때만 해도,
DOS 에서 win.com 실행해서 Windows 띄우고 Winsock 실행해서,
SLIP (맞나.. 가물가물;;) 으로 인터넷 연결하고,
Netscape 띄어서 웹 브라우징 했었는데…

Windows 95 부터인가 IE 가 붙여서 나오는 바람에 Netscape 은 그림자 속으로 사라지고…
그때부터 브라우저 시장은 MS 가 장악하기 시작한듯…

얼마전에 기사 보니까 FireFox 가 기세 등등하게 IE 시장 점유율을 뚫고
자리 잡았다는 기사를 본거 같은데…

User image(from w3schools.com)

개인적인 생각이지만 한국에 인터넷, 특히 온라인 뱅킹과 같은 금융 쪽 사이트 들은…
PKI 도입할 때(시기상으로 90년대말~2000년도 초반 이었던거 같은데…)
ActiveX 말고 Java 로 만들어야 했던거 같다.

미국에서 이런 저런 사이트 많이 봤지만 ActiveX 설치하라는 사이트 본 기억이 없고,
학교 관련된 웹사이트만 봐도 Browser Compatibility 때문에 그런지
종종 Tray Icon 에 보면 Java 뜨는걸 볼 수 있는데,
IE, FireFox, Chrome, Safari 로 접속해도 아무런 문제가 없다는…

마찬가지로 Bank of America 웹사이트도 ActiveX 같은거 전혀 설치안하고
돈도 보내고, 페이먼도 내고…

유독 한국에서만 ActiveX 사용이 너무 많고 그로 인해 IE 를 무조건 써야하는 상황이 발생되고…
한국이야 인터넷 인프라가 워낙 잘 되어 있으니 온라인 뱅킹해도 느린지 모르겠지만,
예전에 미국에서 한번 한국 온라인 뱅킹 접속하려 했다가 관둔 기억이 있는데…
ActiveX 다운 받고 설치 한다고 삽질하다가 관뒀다.

요즘에 데스크탑에서 브라우저를 3개 쓰는데…
Chrome 이 주 브라우저로 gmail 과 이곳저곳 사이트 다닐때 사용,
FireFox 는 Firebug 와 같은 훌륭한 플러그인 때문에 개발할때 사용,
IE 는 한국 웹사이트 들어갈때 사용한다.

요즘 한국 사이트들도 예전보다는 많이 나아진걸 느끼긴 하는데…
ActiveX 사용을 자제하지 않는다면 크게 변하기는 힘들것 같다.

Apple Magic Mouse

User image
http://www.apple.com/magicmouse/

역시 애플의 디자인과 아이디어는!!
mighty mouse bluetooth 쓰고 있긴 한데 그닥 마음에 들진 않는데
magic mouse 는 실제로 써보면 어떨라나…

Page 4 of 8

Powered by WordPress & Theme by Anders Norén