Postări

Se afișează postări din octombrie, 2012

Magento home display products

in admin - cms - pages home page in content insert this lines {{block type="catalog/product_new" template="catalog/product/new.phtml"}} {{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}} {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="3" template="catalog/product/list.phtml" column_count="4"}}

Zend

get config in controller $config = $this->getServiceLocator()->get('Config'); $config = $this->getServiceLocator()->get('ApplicationConfig'); get get params $this->params()->fromQuery('getVar',null);

Typo3 snippets

Clear cache from fe extension $GLOBALS [ 'TSFE' ] -> clearPageCacheContent_pidList ( $pidList ) Language menu graph with flags temp.langMenu = COA temp.langMenu.10 = IMAGE temp.langMenu.10{ file=fileadmin/img/ro.gif stdWrap.typolink.parameter={TSFE:id} stdWrap.typolink.additionalParams=&L=0 stdWrap.typolink.parameter.insertData=1 titleText=Romana params=class="img-polaroid" } temp.langMenu.11 = TEXT temp.langMenu.11 { typolink.parameter.data = TSFE: id typolink.additionalParams = &L=0 value = Română } temp.langMenu.20 = IMAGE temp.langMenu.20{ file=fileadmin/img/gb.gif stdWrap.typolink.parameter={TSFE:id} stdWrap.typolink.additionalParams=&L=3 stdWrap.typolink.parameter.insertData=1 titleText=Romana params=class="img-polaroid" } temp.langMenu.21 = TEXT temp.langMenu.21 { typolink.parameter.data = TSFE: id typolink.additionalParams = &L=3 value = English }

Select Range Datepicker

1. display selector for change month / year 2. on month/year change preserve day and modify input 3. restriction selection prev or future date $(function(){     var d = new Date();     d.setMonth(d.getMonth(),1);     $('#from_date').datepicker({         dateFormat: 'yy-mm-dd',         changeMonth: true,         changeYear: true,         showButtonPanel: true,         beforeShow: function(input, instance) {             window.from_day = $('#from_date').val().split('-')[2];             if($('#from_date').val()==''){                 $(input).datepicker('setDate', d);             }         },         onSelect: function( selectedDate ) {     ...

Block email from postfix to yahoo

Block email from postfix to yahoo in etc/postfix/main.cf  insert transport_maps = hash:/etc/postfix/yahoo create file yahoo in folder /etc/postfix with this content: yahoo.com error:Emails to yahoo are banned