回答
截圖來說明Jevgeni橫溢的回答是:
正如他所說的,你應該去系統 - >管理存儲並在右列單擊所需的商店名稱。
這真的很有幫助的隊友。歡呼 – 2014-10-02 10:32:29
當您在URL欄中點擊Manage stores中的特定商店時,應該有一個像store_id之類的參數。這是您的商店ID。或者,如果您將鼠標懸停在商店上,並且鏈接可能顯示在瀏覽器的右側(左側),則在「管理商店」屏幕中。在url中有store_id參數。我猜這是最簡單的。
或者在數據庫中有表:core_store。
正確的你,謝謝 – 2012-02-21 23:21:56
你應該去「系統 - >管理商店」,並在右欄中點擊需要的商店視圖名稱。點擊這個/懸停,並檢查你的網址下找到的網址店鋪ID後/ STORE_ID/
一樣----- system_store/editStore/STORE_ID//按鍵/
從store_code
獲得store_id
用途:
echo Mage::app()->getStore('store_code')->getId();
務實,你可以得到網站ID,網站名稱,商店ID,商店名稱和商店這樣的代碼:
<?php
echo "Website ID: " . Mage::app()->getWebsite()->getId() . "<br/>";
echo "Website Name: " . Mage::app()->getWebsite()->getName() . "<br/>";
echo "Store ID: " . Mage::app()->getStore()->getId() . "<br/>";
echo "Store Name: ".Mage::app()->getStore()->getName(). "<br/>";
echo "Store code: ". Mage::app()->getStore()->getCode()."<br/>";
?>
下面是一個例子,通過所有的網站,循環和打印你已經在你的Magento設立的所有商店的ID和店鋪名稱:
<?php
foreach (Mage::app()->getWebsites() as $website) {
foreach ($website->getGroups() as $group) {
$stores = $group->getStores();
foreach ($stores as $store) {
echo $store->getId() ." ".$store->getName()."<br/>";
}
}
?>
第二個ftw! – ahnbizcad 2017-09-18 18:58:38
查找到數據庫中core_store
表。
- 1. mongoengine-什麼是referencefield商店
- 2. 什麼是商店comonad?
- 3. 如何更改商店ID?
- 4. 什麼是bigcartel商店的「checkout complete」URL?
- 5. 什麼是正確的商店?
- 6. 商店名稱中的@param是什麼?
- 7. ExtJS 4中的商店是什麼?
- 8. 商店ID表
- 9. 什麼是商戶ID?
- 10. 什麼是原子商店類型?
- 11. Ext JS - 克隆進出商店的最佳方式是什麼?
- 12. 爲什麼我的redux商店不是不可變的?
- 13. 我的USB令牌被列出的證書商店是什麼? (Crypto API)
- 14. 小商店,爲什麼DVCS?
- 15. 爲什麼不是我的ExtJS商店協會工作
- 16. Tablet Genesis的供應商ID是什麼?
- 17. 什麼是關鍵商店和如何實施谷歌地圖
- 18. 商店ID在localStorage的
- 19. jQuery的商店ID在Cookie中作爲JSON或者什麼
- 20. 輸出商店
- 21. 在PHP中,我該如何找出$這是指的是什麼?
- 22. 爲什麼我的減速器不能更新我的商店?
- 23. 如何找出電子商店正在使用的模板?
- 24. Magento商店ID在cronjob
- 25. 商店ID和文本
- 26. 使用opencart獲取多商店設置的商店ID
- 27. 爲什麼不是autoLoad的商店項目數量是0?
- 28. 我如何建立自己的商店?
- 29. 如何通過商店ID在PHP數組中獲取Magento商店詳情?
- 30. ExtJS的4.0專賣店 - 如何找到商店(或模型)
爲什麼你需要這個商店ID?如果您確實需要它,請查看錶core_store中的數據庫。 – Alexandre 2012-02-21 08:41:16
@Alexandre在通過API插入產品時,您需要它。 – feeela 2012-02-28 14:46:37
相關問題:http://stackoverflow.com/questions/2713042/how-to-get-store-information-in-magento – 2013-08-29 10:37:00