我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

检索产品并对Magento进行分类

I'm having a problem with my code currently it's loading the products but not accepting the order filter. here is what I have. Would appreciate any help.

 $_productCollection->clear()
               ->setOrder('entity_id', 'DESC')
               ->setPage($_GET['pageNo'],12)
               ->load()
               ;

Hello check below code

$collection = Mage::getModel('catalog/product')->getCollection();

$collection->setOrder('entity_id', 'DESC');

$products = $collection->load();

近期文章

  • PHP:如何在数组中保存递归函数的结果?
  • linux上的blueimp jquery上传删除不起作用
  • PHP foreach不会迭代第一个结果
  • Postfix用ip地址代替域名
  • 如果在wordpress页面中是其他的 - 总是一个或另一个
  • php:从POST请求中检索二进制文件
  • SimpleXML用于复杂XML的加载文件功能?
  • 显示一天mysqli查询的每小时点击次数
  • Symfony 1.4:index.php上的Applet问题(在frontend_dev上工作)
  • 部分搜索solr与sql相同,如Drupal 6中的%que%
  • jquery没有使用ajax
  • 将UTF-8翻译为GB2312
  • 使用PHP DOM更改CSS
  • 为MissingTag规则自定义标签列表
  • 我怎样才能对变量进行排序?
  • 如何在查询中从日期转换时间?
  • 在php中加载Zend Recaptcha时出错
  • 在CodeIgniter中上传图像不起作用
  • PHP字符串:在“\ end {Figure}”之后删除“ ewline”
  • Wordpress自定义查询

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华