magento css according browser
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"> <block type="page/html_head" name="head" as="head"> <action method="addJs"><script>prototype/prototype.js</script></action> <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</scrip......
magento change xml
$node = Mage::getConfig()->getNode('maxcache/cache/type'); Zend_Debug::dump($node); $parentNode = Mage::getConfig()->getNode('maxcache/cache'); Zend_Debug::dump($parentNode); //change child named 'type' value to be test $parentNode->setNode('type','test',true); Zend_Debug::dump($p......
Magento collection columns
$collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect(); $select = $collection->getSelect(); $columns = $select->getPart('columns'); $select->setPart('columns',array(array('e','entity_id','entity_id'),array('e','price','price'))); Zend_Debug::dump($select->__toString()); ......
magento随机显示产品-可在cms中调用
magento随机显示产品-可在cms中调用 在可以cms静态块中调用,可以以在产品页面插入, 1.建立phtml文件, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 <?php $chosen_category = Mage::getModel('catalog/category')->load($this->getCategoryId()); $_helper = $this->helper('catalog/output'); $_productCollection = $this......
htaccess
#RewriteBase /magento/ RewriteCond %{REQUEST_URI} ^/$ [NC] RewriteRule (.*) http://www.magento1510.com/default/$1 [R=301,L] rewrite index.php to default store index cms page......
still display attributes in layer
app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) { $filter = $request->getParam($this->_requestVar); if (is_array($filter)) { return $this; } $text = $this->_getOptionText($filter); if ($filter && $text) { $this->_getResource()->applyFilterToCollection($this, $filter); $this->getLayer()->getState()->addFilter($this->_createItem($text, $filter)); //注释掉下面这行 // $this......
magento varian form datetime,date
$dateFormatIso = 'yyyy-M-d HH:mm:ss'; $fieldset->addField( 'start_time', 'date', array( 'name' => 'start_time', 'time' => true, &nb......
magento date
$date="2012-7-18 14:00:00"; $change= Mage::getModel('core/date')->gmtDate("Y-m-d H:i:s", $date); Zend_Debug::dump($change); Zend_Debug::dump(Mage::getModel('core/date')->date("Y-m-d H:i:s", $change)); die(); ......
magento admin form 表单元素大全
开发Magento后台的时候经常用到表单(Varien_Data_Form),下面是所有表单元素的添加方法: 1.input type=”text” $fieldset->addField(‘title’, ‘text’, array( ‘label’ => Mage::helper(‘form’)->__(‘Title3′), ‘class’ => ‘required-entry’, ‘required’ => true, ‘name’ => ‘title’, ‘onclick’ => “alert(‘on click’);”, ‘onchange’ => “alert(‘on change’);”, ‘style’ => “border:10px”, ‘value’ => ‘hello !!’, ‘disabled’ => false, ‘readonly’ =&......
- Page:2/26 258 Blogs
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 |
文章分类
- 默认(751)
- 日志(47)
- 感悟(15)
- testIT(4)
- PHP_XML(5)
- PHP(78)
- 明星(1)
- 笑话(31)
- 毕业论文(2)
- 生活(60)
- HTML(11)
- CSS(6)
- 考研(3)
- JS(21)
- 简历(6)
- svn(3)
- 音乐(1)
- 学习(7)
- jQuery(9)
- 英语口语(9)
- 书籍(2)
- magento(258)
- apache(12)
- 创意(4)
- 设计(4)
- 休闲(1)
- IT咨询(11)
- 工作(23)
- ubuntu(21)
- bysoft(1)
- zend(1)
- web(2)
- software(1)
- sql(5)
- 娱乐(5)
- photoshop(3)
- zend framework(2)
- nginx(3)
- 小说(1)
- 名言(1)
- 牛人(1)
- Mysql(6)
- vim(2)
- wordpress(8)
- drupal(1)