上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 对于flat表,也就是普通的表,例如订单之类的sales_flat_order,这类型的连接,Collection连接 上述连接其实也适用于EAV模型的表,只是在grid过滤的情况下会出错。上述语句中 1 storetable.name as storename 其实是防止grid表中重复的索引,比 阅读全文
posted @ 2016-08-04 16:43 郑彦彬 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1,获得store的配置变量 Mage::getStoreConfig('sectionname/groupname/fields'); 1 Mage::getStoreConfig('sectionname/groupname/fields'); Mage::getStoreConfig('sec 阅读全文
posted @ 2016-08-03 16:03 郑彦彬 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 查: $read = Mage::getSingleton(“core/resource”)->getConnection(‘core_read’); $sql = “select * from `abc`”; $result = $read->fetchAll($sql); //fetchRow查 阅读全文
posted @ 2016-08-03 11:16 郑彦彬 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 我们以 catalog_category_layered 控制器为例说明 在catalog.xml 找到catalog_category_layered配置段 其中catalog/product_list是产品显示的block,而catalog/product_list_toolbar是控制产品排序 阅读全文
posted @ 2016-08-01 10:21 郑彦彬 阅读(707) 评论(0) 推荐(0) 编辑
摘要: 1.json_decode() json_decode (PHP 5 >= 5.2.0, PECL json >= 1.2.0) json_decode — 对 JSON 格式的字符串进行编码 说明 mixed json_decode ( string $json [, bool $assoc ] 阅读全文
posted @ 2016-07-29 10:59 郑彦彬 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 通过在 Magento 中的多个类别的筛选产品集合。 按只 1 类别筛选 Magento 提供筛选器,可以使用直接从该集合的类型: $_category = Mage::getModel('catalog/category')-> load($category_id); $collection-> 阅读全文
posted @ 2016-07-28 17:08 郑彦彬 阅读(512) 评论(0) 推荐(0) 编辑
摘要: Modules->模块 Controller->控制器 Model->模型 Magento是这个星球上最强大的购物车网店平台。当然,你应该已经对此毫无疑问了。不过,你可能还不知道,Magento同样是一个面向对象的PHP框架。你可以配合Magento购物车程序强大的功能,开发动态WEB应用程序。 这 阅读全文
posted @ 2016-07-20 15:47 郑彦彬 阅读(1615) 评论(0) 推荐(0) 编辑
摘要: 有的产品,比如服装,同一件衣服有S、M、L、XL、XXL等尺码供客户选择,或者有多种颜色可以供客户选择,Magento中管这种有选项供客户选择的产品叫做可配置产品 (Configurable Product)。 如何添加一个可配置产品呢? 步骤可以概括为: 创建属性 Catalog -> Attri 阅读全文
posted @ 2016-06-22 20:01 郑彦彬 阅读(1723) 评论(0) 推荐(0) 编辑
摘要: 记录一下Magento模型集合Model Collection中addFieldToFilter()方法常用的过滤条件。以下参数也同样适用于产品实体的addAttributeToFilter()方法。 也可以有: $collection->addAttributeToFilter( 实例: Whic 阅读全文
posted @ 2016-06-22 14:05 郑彦彬 阅读(1454) 评论(0) 推荐(0) 编辑
摘要: 1.Magento eav_attribute表中source如何指定自定义数据来源 如果你引用的类名为yebihai_usermanage_model_entity_school你必须完整的给出地址,不能usermanage/entity_school,这样默认是在Mage下面去找的。 如: $s 阅读全文
posted @ 2016-06-22 11:24 郑彦彬 阅读(1730) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页