Magento: How to assign a group to user based on domain name email registration

First of all, you create customer group. let say you already create customer group with group_id 7. you can create customer group in backend Admin => Customer => Customer Group. my group_id is 7 & my group name Student.

You can do this by Magento event observer and also register Observer in config.xml

#1 STEP

Register Module in app/etc/modules/Rifki_MembershipGroup.xml

Continue reading

Magento2: MySQL server has gone away during installation

I have problem durring installation magento2 in my macbook. I think same way if you using Linux.

Problem in MySQL

MySQL server has gone away

Solution

After search in google i found the solution:

create or edit file /etc/my.cnf

After edit or create my.cnf than restart your mysql server

$ mysql.server restart

I hope these helps 🙂

Other resource:

  • http://devdocs.magento.com/guides/v2.1/install-gde/trouble/tshoot_mysql_table-open-cache.html
  • http://stackoverflow.com/questions/17813630/mysql-5-6-headaches-on-mac-osx/22773887#22773887
  • https://github.com/magento/magento2/issues/2805
  • http://bugs.mysql.com/bug.php?id=79125

Implementasi CouchDB dan Memcached di PHP

Asumsi saya pembaca tau bedanya RDBMS dan NoSQL, dan familiar dengan system caching, khususnya memcached. Jika memang belum tau perbedaannya bisa pelajari dasar-dasar NoSQL disini http://nosql-database.org dan untuk memcached bisa baca-baca disini https://en.wikipedia.org/wiki/Memcached

Untuk bisa implementasikan 3 tech CouchDB, Memcached & PHP, tentu harus mempersiapkan instalasinya kan? Benar sekali :). Harus download CouchDB, install memcached extension dan web server. Pengguna mac dan nginx dapat install via homebrew bisa ikuti caranya disini http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew lengkap dan mudah dipahami. Continue reading

Custom Zend_Controller routes

Controller pada zend framework 1.x umumnya host/controller/action/, tapi kadang kala kita butuh menampilkan dengan route action yang “serupa” controller atau custom controller. Jadi jika kita punya URL host/company/about maka kita bisa ubahnya dengan host/about yang menampilkan serupa.

Saya asumsikan kita sudah membuat controller company dan action about.

Controller Company Continue reading