magento 笔记
来源:互联网 发布:网站域名注册流程 编辑:程序博客网 时间:2024/04/29 19:29
根据 entity_attribute 的code 读取 AttributeId (新增字段)
$data_active_id = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'active_end_date')->getAttributeId();
获取storeid
Mage::app()->getStore()->getId
sql 查询(可以写在model 中,然后调用)
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$query = "select attribute_id from eav_attribute where attribute_code ='is_active_date' and entity_type_id=4 ";
$results = $readConnection->fetchAll($query);
model 调用
sql 方法写在model,在使用中进行调用
Mage::getModel('newship/product')->getallproduct();
0 0
- magento 笔记
- magento学习笔记之一
- magento学习笔记之一
- Magento开发笔记
- magento 开发者笔记1
- magento 开发笔记2
- Magento 开发笔记3
- Magento 开发笔记4
- Magento 开发笔记5
- magento 开发笔记6
- magento后台设置笔记
- magento学习笔记一
- Magento笔记/记录
- Magento笔记--安装篇
- Magento架构师的笔记
- Magento开发配置操作笔记
- Magento笔记--分类设置篇
- Magento 学习笔记 (六) 高级Magento模型
- protect your eye
- 安卓-android.intent.category.DEFAULT
- Hibernate 相关jar包详细介绍 .
- Android 程序员必备
- HTML5+Spring-MVC实现手机端上传图片
- magento 笔记
- [MS Office使用] Word无法合并单元格
- centos命令
- 安装orcale11g 出现[INS-07009] 无法加载 BeanStore
- 监控脚本程序
- magento 后台menu 添加item
- web项目报404一直找不到图片(路径绝对正确)
- RabbitMQ (五)主题(Topic)
- Win8系统丢失mfc110.dll