Day: December 21, 2015

Magento: 左栏筛选条件 Select Box / Button / Dropdown List on Layered Navigation

1. 下拉框 Select Box You have plain text and link to those text in Magento Layered Navigation section. You can easily change the display of Layered Navigation links into a selection box / dropdown list. To do so, you need to edit the following file: app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/catalog/layer/filter.phtml filter.phtml file con… Read More

Bootstrap3 价格滑动块 price range bootstrap-slider

实例: HTML <input type="text" class="span2" value="" data-slider-min="0" data-slider-max="255" data-slider-step="1" data-slider-value="128" data-slider-id="GC" id="G" data-slider-tooltip="hide" data-slider-handle="round" > CSS /*! * Slider for Bootstrap * * Copyright 2012 Stefan Petre * Licensed under the Apache License v2.0 * ht… Read More

Magento: 单产品(product)或者当前类别(category)最大和最小价格 Min/Max Product Price in a Category

1. 当前类别最大最小价格: $minPrice = Mage::getModel('catalog/product')->getCollection() ->addStoreFilter() ->addAttributeToSelect('price') ->addAttributeToSort('price', 'ASC')->getFirstItem()->getMinimalPrice()*1; $maxPrice = Mage::getModel('catalog/product')->getCollection() ->addStoreFilter() -&g… Read More

linux: 命令行运行php Run PHP from the command line

As an alternative to /opt/lampp/bin/php, to run a php script from the command line, you just need to install php5-cli: sudo apt-get install php5-cli And run your script with: php myscript.php To open an interactive php shell, just type in a terminal: 如果想在terminal里面直接写php,可以用: php -a   本文:linux: 命令行运行php Run PHP from the command line… Read More