【问题标题】:success message after adding a product in Magentowith Ajax在 Magentowith Ajax 中添加产品后的成功消息
【发布时间】:2013-04-26 08:45:32
【问题描述】:

我知道 Firebug Json 在成功后会生成一条消息:函数但找不到如何显示它......所以我尝试添加这个:

if(data.status == 'ERROR'){
                        jQuery("#ajax_message").html("product out of stock.").hide().fadeIn().delay(10000).fadeOut();
                    }else{if(data.status == 'SUCCESS'){
                             jQuery("#ajax_message").html("product added.").hide().fadeIn().delay(10000).fadeOut();
                        } 

但是添加产品后什么都没有发现..

有什么想法吗?

【问题讨论】:

    标签: javascript ajax json magento message


    【解决方案1】:

    检查您在 data.status 中是否收到响应

    检查是否存在冲突。使用 noConflict。 .hide 会隐藏 div

    希望你解决它:)

    【讨论】:

    • 是的,我已经检查了上面所有这些,没有任何问题,也许 hide 会隐藏 div 直到函数被触发
    猜你喜欢
    • 2015-04-22
    • 1970-01-01
    • 2015-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-17
    • 2017-09-28
    相关资源
    最近更新 更多