本文整理汇总了PHP中Mage_Core_Model_Store::getCurrentCurrencyCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Store::getCurrentCurrencyCode方法的具体用法?PHP Mage_Core_Model_Store::getCurrentCurrencyCode怎么用?PHP Mage_Core_Model_Store::getCurrentCurrencyCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Store
的用法示例。
在下文中一共展示了Mage_Core_Model_Store::getCurrentCurrencyCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlockCacheKeyData
/**
* @param Mage_Core_Block_Template $block
* @param Mage_Core_Model_Store $store
* @param Mage_Catalog_Model_Category|null $category
* @param Mage_Catalog_Model_Product|null $product
* @return string;
*/
protected function getBlockCacheKeyData($block, $store, $category = null, $product = null)
{
/** @noinspection PhpUndefinedMethodInspection */
$result = '|' . $this->getFilterUrl();
// covers secure, url param, page nr
$result .= '|' . get_class($block);
$result .= '|' . $block->getTemplate();
$customerSession = Mage::getSingleton('customer/session');
if ($customerSession instanceof Mage_Customer_Model_Session) {
$result .= '|cg' . $customerSession->getCustomerGroupId();
}
$result .= '|' . $store->getId();
$result .= '|' . $store->getCurrentCurrencyCode();
if ($category instanceof Mage_Catalog_Model_Category) {
$result .= '|c' . $category->getId();
}
if ($product instanceof Mage_Catalog_Model_Product) {
$result .= '|p' . $product->getId();
}
return $result;
}
示例2: _buildStore
/**
* Builds a record for a given store
*
* @param Mage_Core_Model_Store $store
* @return array
*/
protected function _buildStore(Mage_Core_Model_Store $store)
{
$locale = preg_split('/_/', $store->getConfig('general/locale/code'));
return array('webStoreName' => $store->getName(), 'webStoreId' => $store->getStoreId(), 'language' => $locale[1], 'currencyCode' => $store->getCurrentCurrencyCode(), 'url' => $store->getUrl());
}