【问题标题】:magento admin - retrieve current selected store in a multistore backendmagento admin - 在多存储后端检索当前选定的存储
【发布时间】:2012-05-22 14:56:50
【问题描述】:

是否可以在多商店 magento 后端检索当前选定的商店视图?我在一个 admi 页面中(目录-> 管理类别-> 一般信息),我必须检索当前选择的商店/商店 ID。有可能吗?如何实现?

谢谢

【问题讨论】:

    标签: magento-1.4 magento-1.5 magento magento-1.6


    【解决方案1】:

    有很多选项,但你应该能够使用,

    Mage::app()->getRequest()->getParam('store');
    

    如果您不是在寻找特定的 ID,您可以使用

    Mage::getModel('core/store')->getCollection()->load()->getAllIds();
    

    分配您自己的变量以与它们一起使用。

    【讨论】:

      猜你喜欢
      • 2017-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-26
      • 1970-01-01
      • 2011-12-09
      • 2012-10-26
      • 1970-01-01
      相关资源
      最近更新 更多