`
kirenenko04
  • 浏览: 149571 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

[magento] How to show add Success message and add Error message in Magento

 
阅读更多

This is one of the easiest way to show Either Error message or Success message in magento for one time.If you are thinking to show an error message or success message one time when a page load then it is the best method to use in mganeto.

Show Error Message in frontend

$message = $this->__('Email Id Already Exist.');
Mage::getSingleton('core/session')->addError($message); 

 Show Success message in frontend

$message = $this->__('You have Register Successfully');
Mage::getSingleton('core/session')->addSuccess($message);

 If you wish show Success message or Error Message in Admin html then you need to write your code little bit different

Show Error Message in Admin page

$message = $this->__('1 row has been updated successfully');
Mage::getSingleton('adminhtml/session')->addSuccess($message); 

 Show Success Message in Admin page

$message = $this->__('Email Id Already Exist.');
Mage::getSingleton(adminhtml/session')->addError($message);

 

分享到:
评论

相关推荐

    Magento 2 Cookbook

    Chapter 1, Installing Magento 2 on Apache and NGINX, is a...new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Ad

    Magento 添加后台管理 addColumn

    "Magento添加后台管理addColumn"这个主题主要涉及的是如何在Magento的后台管理面板自定义添加新的数据列,以展示更多店铺运营的相关信息。这通常涉及到对Magento的MVC(Model-View-Controller)架构的理解,以及对...

    magento2-checkout-success-misc-script-源码.rar

    "magento2-checkout-success-misc-script-源码.rar" 文件显然包含了与 Magento 2 的结账成功页面(checkout success page)相关的自定义脚本源码。在深入探讨这些脚本之前,我们先来了解一下 Magento 2 结账流程的...

    Magento2 CookBook

    new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Advanced, explains how to use advanced features in ...

    Ajax-Magento-ajax-add-to-cart.zip

    Ajax-Magento-ajax-add-to-cart.zip,[模块magento 1]magento ajax添加到购物车-ajoter vos produits au panier en ajax/感谢ajax将您的产品添加到购物车,ajax代表异步javascript和xml。它是多种web技术的集合,包括...

    Magento 2 Beginners Guide

    You’ll start by getting a general understanding of what Magento is, why and how you should use it, and whether it is possible and feasible to migrate from an old web store to Magento 2. As you work ...

    The Definitive Guide to Magento (Apress出品 Magento权威指南)

    ### Magento权威指南 #### 书籍概述 《Magento权威指南》是由Adam McCombs与Robert Banh共同编著的一本深入探讨Magento电商平台的技术手册。该书由Apress出版社于2009年出版发行,旨在为读者提供一个全面、系统的...

    The Definitive Guide to Magento.pdf

    ### Magento 全面指南知识点概览 #### 一、引言 《Magento全面指南》是电子商务平台Magento的权威参考书籍,由Adam McCombs与Robert Banh共同编写。本书不仅适用于初学者,对于有一定经验的开发者和技术人员也同样...

    magento快速复制网站_magento_magento快速复制站_

    这里,`/path/to/source/magento/`是源站点的Magento根目录,`/path/to/destination/`是目标服务器的目录。 在新服务器上安装MySQL,并导入先前备份的数据库: ```bash mysql -u [new_username] -p[new_password] ...

    Magento Theme Design and Definitive.Guide.to.Magento

    本书籍《Magento Theme Design》与《The Definitive Guide to Magento》都是深入探讨这个平台的重要资源,旨在帮助读者掌握Magento的主题设计和全面理解。 首先,《Magento Theme Design》专注于主题开发,这是...

    Magento 自定义后台menu Insert dynamical menu in Magento’s Admin

    Magento是一款强大的开源电子商务平台,它的后台管理系统非常灵活且可扩展。在Magento的后台菜单中插入动态菜单是一项常见的自定义需求,这有助于商家根据自身业务需求定制管理界面。本篇文章将详细解析如何在...

    Magento1.9 超好用积分插件Points and Rewards

    Magento1社区版,1.9可用,官网售价299刀 前台演示地址:http://points.demo.aheadworks.com/index.php/points/reward/ 后台演示地址:...

    [Magento] Magento 扩展开发入门教程 (英文版)

    Get a hands-on introduction to custom shipping and payment methods ☆ 出版信息:☆ [作者信息] Branko Ajzele [出版机构] Packt Publishing [出版日期] 2013年09月25日 [图书页数] 128页 [图书语言] 英语...

    magento创建自定义页面 (Bestseller实例) Bestseller products in Magento

    Magento是一款强大的开源电子商务平台,它提供了丰富的功能和高度的可定制性。在Magento中创建自定义页面是一项常见的任务,这通常涉及到对系统架构的理解、模板文件的编辑以及URL的配置。在这个实例中,我们将深入...

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

    这篇博客“Magento:后台添加预览按钮 View product in frontend from Magento admin”主要探讨了如何通过自定义开发来实现这一功能,让管理员能够快速检查商品在网站前台的显示状态。 在Magento中,通常管理员需要...

    Magento - Developing and Maintaining your Cloud Project

    ### Magento - 开发与维护您的云项目 #### Magento 云平台简介 Magento Commerce Cloud 是一个为企业提供强大且灵活的电子商务解决方案的平台。该平台通过整合前端用户体验与后端管理工具来帮助商家创建个性化且...

    magento数据结构分析

    标题:“Magento数据结构分析” 描述:“Magento数据字典”提供了对Magento系统中各种数据库表的深入理解,这对于理解和优化Magento的性能至关重要。 一、Magento数据结构解析 Magento是一款功能强大的电子商务...

Global site tag (gtag.js) - Google Analytics