_init();}protected function _init(){$this->_store=Mage::app()->getStore();$this->_baseUrl=Mage::getBaseUrl();}public function getAllCategory(){$parent...
分类:
其他好文 时间:
2015-09-15 00:15:41
阅读次数:
149
add these fields to your gird class class *** extends Mage_Adminhtml_Block_Widget_Grid
{
protected $_countTotals = true;
public function getTotals()
{
$totals = new Varien_Obje...
分类:
其他好文 时间:
2015-09-14 17:00:12
阅读次数:
172
1.加载某个attribute: $attributeCode=Mage::getModel('catalog/resource_eav_attribute') ->load($attrbuteId) ->getData("attribute_code")...
分类:
其他好文 时间:
2015-09-10 10:59:25
阅读次数:
198
magento判断用户登录Magento 登陆之后返回登录之前的页面magento 在登陆后一般会自动跳转到 My Account 页面但是经常会有需求 就是登陆自动跳转到 之前的页面里面工具/原料php+mysql+apache方法/步骤只要加代码Mage::getSingleton('custo...
分类:
其他好文 时间:
2015-09-06 22:49:48
阅读次数:
309
1.DB add field ‘except‘ - ‘catalogsearch_query‘ 2.app\code\core\Mage\Adminhtml\Block\Catalog\Search\Edit\Form.php add field
// feng
$fieldset->addField(‘except‘, ‘text‘, array(
‘name‘ => ‘except...
分类:
其他好文 时间:
2015-08-31 17:46:44
阅读次数:
134
app\code\core\Mage\Dataflow\Model\Convert\Parser\csv.php文件是后台上传csv,插入到dataflow_batch_import中转表的代码,有如下代码片段1.$batchModel = $this->getBatchModel();2.$bat...
分类:
Web程序 时间:
2015-08-27 15:07:17
阅读次数:
188
查:$read = Mage::getSingleton("core/resource")->getConnection('core_read');$sql = "select * from `abc`"; $result = $read->fetchAll($sql); //fetchRow查找一...
分类:
数据库 时间:
2015-08-26 23:52:36
阅读次数:
159
有时我们需要仅仅显示一层目录的URL路径.而不要出现多个路径的现实,我们可以用以下方法修改:Edit /app/code/core/Mage/Catalog/Model/Url.php找到632行,然后将下面的注释掉//if (null === $parentPath) {//$parentPath...
分类:
Web程序 时间:
2015-08-03 18:59:39
阅读次数:
178
Magento代码之订单创建流程 直接看代码吧。下面的代码是如何通过程序创建一个完美订单。 getStore('default'); //通过电子邮件获取用户,当然也可以不获取,创建guest订单 $customer = Mage::getModel('customer/customer');...
分类:
其他好文 时间:
2015-08-01 11:22:49
阅读次数:
306
Magento是一个php电子商务系统.内部模块化.创建模块流程Magento系统模块app/code/core/Mage其中每一个子目录都是一个单独的模块自己创建的模块放在下面路径app/code/local/Packagename自创的新模块应该包含以下目录结构app/code/local/Pa...
分类:
其他好文 时间:
2015-07-16 13:44:31
阅读次数:
107