Here is a little something to use on template/catalog/product/view.phtml page. I got few inquiries on how to get the “in_stock” status of a product. Here is a working sample code that shows different messages when and if the product is in stock or out of stock.

<?php // Check to see if the item is in stock
if($_product->stock_item->is_in_stock == 1): echo $this->__('Availability') ?>:<strong><?php echo $this->__('In stock') ?></strong>
?>
<?php else:?><strong><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) ?>contacts/" title="<?php echo $this->__('Email') ?>"><?php echo $this->__('Email') ?></a></strong><?php echo $this->__('or Call for Availability') ?>&nbsp;1-222-333-444
<?php endif; ?>

来源:http://inchoo.net/magento/user-friendly-product-availability-message-in-magento/

Magento: 友好显示库存 User friendly product availability message in Magento相关推荐

  1. 在Magento首页显示新产品怎么设置

     要在Magento首页显示新产品怎么设置呢?如果是自己安装mogento程序,想要在首页显示新产品(New Products)按照下面介绍的4个步骤来操作就ok了. 1.在magento后台CMS= ...

  2. excel不显示0_进销存软件如何设置仓库库存查询默认不显示库存为0的商品? 常见问题文章中心信管飞软件官网...

    信管飞仓库管理软件.信管飞RMS支持管理仓库库存,可在仓库库存查询界面查询当前商品库存数量,软件支持设置在仓库库存查询时默认不显示库存为0的商品,方便汇总有库存的商品信息.本文以信管飞RMS为例,示范 ...

  3. 深入理解Magento-第九章-修改、扩展、重写Magento代码

    重写Magento模块(Module) 第一步,你需要创建属于你自己代码的命名空间,例如Wemvc,App等,为了方便与大家分享代码,我将空间命名为App . app/code/core/commun ...

  4. Magento: 设置产品列表默认排序方式 How to sort Magento products by date added as default

    方法一: 安装插件 Sort By Date(https://www.magentocommerce.com/magento-connect/sort-by-date.html) 方法二: 非插件 T ...

  5. Magento教程 1:免费购物车系统,轻松建立Magento第一步!

    Magento为多功能购物车系统,为电子商务提供了灵活.强大的管理系统,让商家在经营网购事业时能够事半功倍,顺利掌管订单.库存等大小琐事. 若您对Magento有兴趣,并正在经营网购事业,欢迎至官方网 ...

  6. magento: configurable 显示所有属性及获取 Json Config how to get Json Config by product id

    1. 显示所有属性 $config_product = Mage::getModel('catalog/product')->load($_product->getId()); $prod ...

  7. magento 在产品页添加评论 Add Review Form in Magento Product View Page

    Magento产看产品评论需要点击到另外一个页面中,这种设计对于用户体验和SEO都相当不利.一方面用户无法在产品页面查看该产品的一些用户评 价,另外,搜索引擎也会收录很多与产品无关的页面.那么如何让产 ...

  8. php商品低库存报警,Magento中产品库存不报警解决方案

    简单说来,这个事件在Magento处理产品报库存警的集合方法里.我们的客户有超过40000封订阅和超过30000个需要将"缺货"状态改为"有货".所以当Mage ...

  9. Magento: 后台添加预览按钮 View product in frontend from Magento admin

    When you are editing some product in Magento admin and want to check it out in frontend of your Mage ...

最新文章

  1. .net 将html写成的table 转换成excel_如何使用Pandas将二维表(DataFrame)反转为一维列表?...
  2. freebsd下vi的使用
  3. mysql许多连接错误而被阻止_怎样解决mysql连接过多的错误?
  4. 工作83:wacch的使用
  5. linux系统shell知识点,Linux 系统中shell知识点说明和常用的帮助命令简单介绍 | IT工程师的生活足迹...
  6. Python更改数据类型——astype()方法和to_numeric()函数
  7. 如何判断web应用是否添加到主屏幕
  8. OpenCV图像处理(2)——形态学操作
  9. 设计模式那点事读书笔记(3)----建造者模式
  10. Hyper-V 3.0 - 关于存储迁移的一些说明
  11. Ubuntu sudo nopasswd方法
  12. 2022年(第八届)全国大学生统计建模大赛
  13. 超好用的团队计划管理软件,推荐给大家~
  14. pandas时间序列——时间基础、时间增量、时间周期、日期偏移处理
  15. CiteSpace分析专利概况
  16. 最后一课——没有拥抱,已成永远
  17. 如何选择合适焦距工业相机镜头
  18. P2440 木材加工
  19. 2台路由器串联接法(有线路由+无线路由)
  20. 项目质量管理全部精华看这篇就够了

热门文章

  1. 不要62(HDU-2089)
  2. 最短路径问题(信息学奥赛一本通-T1342)
  3. 信息学奥赛一本通C++语言——1055:判断闰年
  4. 云服务器运行gpu程序很卡,请问怎样才使程序在GPU上运行?
  5. php+loaction+框架,【集锦】nginx【php,location,alias,504】
  6. python直接用解释器编写和编辑器的区别_Python语言编译器与解释器
  7. 高级语言中的关键字:const用法分析
  8. opencv 扩大区域_python-----opencv图像边界扩充
  9. MySql-phpMyAdmin
  10. sql建立到mysql的会话_SQLalchemy会话和多个数据库尝试创建twi索引