Passing Variables to Child Templates in Magento

January 22nd, 2010 § 2

#mental note

Imagine if you have a Template with a Child Template aliased details_default and you want to pass a parameter to it before outputing (echoing) it.
On the template do:


$this->getChild('details_default')->setAttribute("var","something_to_pass")->toHtml();?>

and on the Child Template if you need to work with that passed variable do:

$this->getData("var"); ?>

Production to Development MySQL Sync

January 17th, 2010 § 0

#this is a another mental note and guide to those who want a fast solution for Prod to Dev MySQL Sync

  • UseĀ AutoMySQLBackup for Daily/Monthly/ backups on the development server.
  • On the Production machine run some simple commands

scp -r user@dev.server.com://backups/daily/mysql_database_name/* .
gzip -d *.gz
mysql -u root -ptiagofilipe < *.sql

Later a MySQL replication server will join the party. Any thoughts or sugestions on this?

“ajax not defined” on Facebook Developers

January 6th, 2010 § 0

#mental reminder

If you bounce into an “ajax not defined”
while trying a simple
var ajax = new Ajax();
in order to make a simplist AJAX call via FBJS, remember FBJS does not work in iFrames (that was the point of the hole thing) and you have to change it in the applications settings.

Where Am I?

You are currently browsing the reminder category at Tiago Matos’ Nest.