• magento首页调用最新产品


    这个需要我们自己添加一个block块供我们调用,可参考new products的block类,建立文件app/code/core/Mage/Catalog/Block/Product/Special.php

    复制app/design/frontend/base/default/template/catalog/product/new.phtml到app/design/frontend/theme/default/template/catalog/product/special.phtml,修改为相应标题和产品显示数量
    在后台首页的CMS Page模块添加调用代码:

    当然要想显示特价产品,在产品管理处还是要设置的,进入产品管理的Prices栏,Special Price和Special Price From Date都要设置,那么前台就会显示特价产品。

  • 相关阅读:
    位置匹配
    匹配重复
    使用元字符
    匹配一组字符
    匹配任意单个字符
    python-全局替换程序
    python37-encode与decode
    python37-能检测文件编码的模块
    super方法
    类-易错题
  • 原文地址:https://www.cnblogs.com/focai/p/4172015.html
Copyright © 2020-2023  润新知