E commerce, Tips & Tricks - October 29, 2009 - No Comment
Magento : how to learn from free templates
The power of Magento is great but it requires long days of learning and suffering to get through relative simple features, such as the now common front page slide banner. I had a quick look at magento free templates on google and was conquered by Magento ’s classic theme, the kind of  stuff that’s really given free of charge when I would have paid for it. It actually comes with an interesting development of Magento’s block systems, and demonstrates how to add a custom block between navigation and content : the prototype glider that scrolls images is defined a cms static block, which is then called in the home page CMS  custom xml definition, with a reference to the slider block that’s positionned in phtml files and declared in the xml layouts as a core/text_list type . Impressive stuff : that’s pure  magento design and illustrates how versatile the system is.
Links : 25 free templates for Magento
Web Applications - October 23, 2009 - No Comment
Jquery drop down menu
After the Mega Drop down menu comes the sroll drop down menu, a solution for long choices display dilemna : Make menu scroll up and down as you mouse through it. http://css-tricks.com/examples/LongDropdowns//
Tips & Tricks - October 19, 2009 - No Comment
Use Zend_Form to create SQL table
A quick code snippet that uses a Zend form (in the case below, with subforms) to generate a SQL table create statement. Useful for scaffolding : create your form with Zend Form Elements then the SQL table automatically.
-
<textarea rows="50" cols="80">
-
create table yrbeaute (`id` int(10) NOT NULL AUTO_INCREMENT,<?
-
foreach($this->form as $k=>$subform)
-
{
-
foreach($subform as $k=>$element)
-
{
-
if ($element->getType()=="Zend_Form_Element_Select") $type="varchar(50)";
-
if ($element->getType()=="Zend_Form_Element_Radio") $type="varchar(50)";
-
if ($element->getType()=="Zend_Form_Element_Text") $type="varchar(255)";
-
if ($element->getType()=="Zend_Form_Element_Textarea") $type="text";
-
if ($element->getType()=="Zend_Form_Element_MultiCheckbox") $type="varchar(255)";
-
?>
-
<?=$element->getName() ?> <?=$type?>,
-
<?
-
} else
-
foreach($element as $k=>$elem )
-
{
-
?><?=$elem->getName() ?> varchar(50),
-
<?
-
}
-
-
}}
-
?> step int(5), `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
Web Applications - October 15, 2009 - No Comment
Silverstripe : Nested data object manager
One decisive sign that some contributors can make a change is the sincere thankyou they openly receive from community members: silverstripe’s UncleCheese certainly deserves the thankyou’s he’s getting from Silvesrtripe users that obviously benefit from the amazing Data Object Manager  modules , that also include the  innovative image gallery manager from which I kept the idea of my own jquery drag and drop image manager. UncleCheese’s latest innovation is the nested object manager, which deals with 1 to n relation ships in one of the most user friendly ways, as Silverstripe likes it :
E commerce - October 12, 2009 - 1 Comment
Magento log cleaner
Magento, in earlier versions, does not seem to handle log cleaning very well. A lot of configuration options are vailable under the configuration  / Advanced / System menu, that seem to have an impact on the cron.php process. But trying to remove logs this way is a complicated task that involves full log counting (select count on mage_log_visitor) and the result is not always there, don’t know why. A full truncate on log tables seems more appropriate, as described on the knowledge base, to use with caution obviously : Magento Maintenance Script was posted a few days ago but I tried it and it’s pretty efficient. Let us know how it performed on your install, on mine it works well. Go ahead after you’ve performed the appropriate backups !


