magento分类下的博客

get product stock qty

piaoling  2011-07-22 11:56:30

<?php (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>   ......

类别 :  magento(258)  |  浏览(3118)  |  评论(0)

How to get currency symbol?

piaoling  2011-07-22 10:52:18

How to get currency symbol? Code is useful for get currency symbol           Mage::app()->getLocale()->currency(Mage::app()->getStore()->      getCurrentCurrencyCode())->getSymbol() or if you want to pass a certain currency code simply specify it:      Mage::app()->getLocale()->currency('EUR')->getSymbol()     Source  : http://www.activecodewar.com/ ......

类别 :  magento(258)  |  浏览(3048)  |  评论(0)

magento category

piaoling  2011-07-21 13:34:47

$store = Mage::getModel('catalog/category')->setStoreId(3)->load(10); ......

类别 :  magento(258)  |  浏览(3504)  |  评论(0)

get a list of all categories about target store

piaoling  2011-07-21 13:23:50

require_once $_SERVER[’DOCUMENT_ROOT’]."/app/Mage.php"; Mage::app(’1’); function nodeToArray(Varien_Data_Tree_Node $node) { $result = array(); $result[’category_id’] = $node->getId(); $result[’parent_id’] = $node->getParentId(); $result[’name’] = $node->getName(); $result[’is_active’] = $node->getIsActive(); $result[’position’] = $node->getPosition(); $result[’level’] = $node->getLevel(); $result[’children’] = array(); foreach ($node->getChil......

类别 :  magento(258)  |  浏览(3342)  |  评论(0)

load store by code

piaoling  2011-07-21 10:17:54

$store = Mage::getModel("core/store")->load("french","code"); ......

类别 :  magento(258)  |  浏览(3283)  |  评论(0)

Read Timed Out after 10 seconds magento

piaoling  2011-07-20 18:47:41

TheGingerOne - 06 October 2010 05:34 AM Hi, I had a similar problem recently with only being able to submit a few records at a time before the timeout message. I found out that you can increase the timeout limit in the Zend directories and thus give yourself a better chance of your items going through. Edit the following file on your server:  /lib/Zend/Http/Client.php Locate the following line: ‘timeout’ => 10 Increase it to what you need it to be. I set it to 30 which did the job for me. I’m very new to Magento and haven’t got......

类别 :  magento(258)  |  浏览(5353)  |  评论(0)

magento api

piaoling  2011-07-19 10:21:30

If you are in the business of developing a mobile application or external web/desktop or some other application/service that needs to communicate with Magento trough its API, then my friend you are out of luck. I am not going to say Magento API is a trash, I’ll simply say it massively lacks certain methods within the existing exposed classes that will make your external application usable. Its all about simple things, right? Well, here is one bottom line simple thing I would like to do with my Magento API. I would like to get a list of all available websites, stores and store vie......

类别 :  magento(258)  |  浏览(3645)  |  评论(0)

magento -- 修改代码让后台属性组合里的属性显示中文

piaoling  2011-07-18 14:13:35

Magento后台属性组合管理里的各个属性显示的是属性的code,也就是说,即便给每个属性加上了中文的标签(label),这里显示的依然是大片的英文,对一个不懂技术的后台管理者来说,这样多的英文时他们不愿意看到的,所以要想办法变一下。   打开/app/code/local/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php文件,找到几个用来显示的代码,替换成如下所示   view plaincopy to clipboardprint? public function getGroupTreeJson()  ......

类别 :  magento(258)  |  浏览(3776)  |  评论(0)

Magento创建新支付模块

piaoling  2011-07-18 11:59:14

大家都知道,Magento 自带 paypal 支付模块,但对于中国大陆的网购用户来说,经常用的是网银,支付宝,财付通,等这些第三方支付。如果你的 Magento 跟踪官方升级到最新版本,也许后续版本中会有添加支付方式的后台操作模块,但是现在,我们必须以编程方式创建新的支付方式模块。 下面有一个小例子,Rikku 将解释如何创建一个简单的 Magento 支付模块。 当然,Rikku 在过去的涂鸦中,介绍过如何建立 Magento 模块,如果您不甚了解,那么请看 Rikku 的另外两篇涂鸦......

类别 :  magento(258)  |  浏览(4064)  |  评论(1)

新Magento开发者最容易出现的3个错误

piaoling  2011-07-18 11:53:41

首先,Rikku 要告诉您,这是写给刚刚开始接触 Magento 的开发者的一篇涂鸦。这里面列举了三个典型的错误例子,即使您现在是一位 Magento 的专家,那么在您还是菜鸟的时候也有可能犯过。所以,请仔细阅读,那么你在起步学习 Magento 的时候可以回避这些错误。 第一个错误时下载 Magento full release,然后尝试通过 FTP 上传至服务器。其实有一种更容易的方式就是使用 Magento downloader method ,它不仅可以保证你的 Magento 版本最新,最重要的是这么做不会使你的 ......

类别 :  magento(258)  |  浏览(3855)  |  评论(0)
  • Page:10/26  258 Blogs
    <<
    >>
    20088
    周日 周一 周二 周三 周四 周五 周六

    文章分类