在magento外获取订单信息

三月 21, 2012

下载文件aaa.rar解压可以得到aaa.php,丢入magento根目录就可以运行,使用http://www.domain.com/aaa.php?orderid=10000XXXX,的格式就可以的到相应的订单信息。  


查看全文...
0

使用Magento Api给产品添加图片

三月 21, 2012

magento的Api默认就有更新产品图片的功能,今天将我自己测试的代码共享下,供大家学习参考。本次使用magento 1.5版Api,其它版本可能稍有不同。 //省略初始化Api过程,见我的其余magento API文章 www.hellokeykey.com // 产品图片 // 初始化产品图片信息,注意自己上传个产品图片到magento的产品图片文件夹 // $imagePath为图片路径,如果你使用相对路径,注意测试下是正确 // label为图片的alt属性 // position 为图片的显示顺序 // type 为此图片作为’thumbnail’,’small_image’,’image’中的哪一个 // mime为图片类型 $imagePath = “http://www…….magento/media/catalog/product/h/t/htc-touch-diamond.jpg”; //产品图片路径 $newImage = array( ‘file’ => array( ‘name’ => ‘file_name’, ‘content’ => base64_encode(file_get_contents($imagePath)), ‘mime’ => ‘image/jpeg’ ), ‘label’ => ‘Cool Image Through Soap’, ‘position’ => 1, ‘types’ => array(‘thumbnail’, ‘small_image’, ‘image’), [...]


查看全文...
0

magento主机推荐-Bluehost

一月 30, 2012

用过不少magento主机,比如hostmonster, simplehelix , godday , 真正物美价廉的可能只有Bluehost , 所以推荐magento初学者可以买一个玩玩。


查看全文...
3

magento — 项目迁移后无法在线安装插件问题的解决

一月 18, 2012

安装完的magento项目移动位置后再用magento connect在线安装插件会失败,列表中会显示已安装,后台却看不到,检查downloader文件夹会发现文件并不存在,这是怎么回事?


查看全文...
0

Magento connect的文件下载目录

一月 18, 2012

magento connect 只需要输入 相应的扩展key 即可自动下载,安装。文件的默认下载目录:

1.4以前是

Downloader/perlib/download/下

1.5是

Downloader\.cache


查看全文...
0

magento到处数据后上传不了

一月 16, 2012

添加在前面 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’; SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0; 添加在后面 SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT; SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS; SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION; SET SQL_NOTES=@OLD_SQL_NOTES;


查看全文...
0

如何添加属性类产品网格

一月 16, 2012

1. 添加方法在 Mage_Catalog_Block_Product_List: app/code/core/Mage/Catalog/Block/Product/List.php: //… /** * Use this method in layouts for extra attributes * * @param string $code internal name of attribute */ public function addAttribute($code) { $this->_getProductCollection()->addAttributeToSelect($code); return $this; } 2.? 更新布局文件layout/catalog.xml <layout> <!– … –> <catalog_category_default> <!– … –> <block type=”catalog/product_list” name=”product_list” template=”catalog/product/list.phtml”> <!– START UPDATE –> <action method=”addAttribute”><name>MyAttribute</name></action> <action method=”addAttribute”><name>AnotherCustomAttribute</name></action> [...]


查看全文...
0

magento修改美元符号

十一月 16, 2011

进入下面目录 MAGENTO_ROOT/lib/Zend/Locale/Data/ 下载文件en.xml ,查找以下代码 <currency type=”USD”> <displayName>US Dollar</displayName> <displayName count=”one”>US dollar</displayName> <displayName count=”other”>US dollars</displayName> <symbol>$</symbol> </currency> 将$符号换成US$,替换原来的文件!清楚缓存,就可以看到变化了


查看全文...
1

addAttributeToFilter Condition in Magento Model Collection

十一月 1, 2011

The function addAttributeToFilter can be called on a product collection in Magento. In short, it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database. This is helpful when you need to filter your product listing result for some requirement such as showing featured products [...]


查看全文...
1

Magento数据库图表

十月 21, 2011

图样本数据库     上面的影像只是一个低分辨率图的例子。实际的高分辨率Magento数据库图表可以在这里下载到。 Magento“EAV”的数据模型 一句话概括magento的数据库设计:为了更灵活,Magento大量利用Entity-Attribute-Value数据库(EAV)。通常情况下,成本灵活性——Magento复杂性也不例外。处理数据的过程Magento往往更为“参与”比一般经验丰富的使用传统关系型数据表。


查看全文...
2