text有用(代码片段)

author author     2022-11-30     504

关键词:

$request = $this->getRequest();
$module = $request->getModuleName();
$controller = $request->getControllerName();
$action = $request->getActionName();

<?php if(strrpos($this->helper('core/url')->getCurrentUrl(),'checkout/onepage') != false) echo 'class = "inner-main"';   ?>

\!h ----- Secure Url SSL

Go to admin System -> Configuration -> Web -> Secure  

change ‘Base URL’ to
https://your-domain

change ‘Use Secure URLs in Frontend’ to ‘Yes’ and Save Config. 


\!h ----- currency symbol price anywhere product price

<?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol().number_format($_product->getFinalPrice(), 2) ?> 


\!h ----- Currency Symbol to right. after price

lib/Zend/Currency.php

self::RIGHT

http://www.youtube.com/watch?v=6Xj2Xn6OAZE

 Mage::app()->getLocale()->currency(Mage::app()->getStore()->
     getCurrentCurrencyCode())->getSymbol()

- See more at: http://magentoexpert.blogspot.com/2010/01/how-to-get-currency-symbol.html#sthash.7sYQNfJu.dpuf

http://xme.im/format-magento-currency-or-number-base-on-locale


\!h ----- parse url url without index path парсить url

substr($this->getUrl(''), 0, strrpos($this->getUrl(''), '/index.php')).'/skin/'.$productvideo
<?php if(strrpos($this->helper('core/url')->getCurrentUrl(),'checkout/onepage') != false) echo 'class = "inner-main"';   ?>


\!h ----- welcome message

app/code/core/Mage/Page/Block/Html/Header.php 

\!h ----- custom variables

echo Mage::getModel('core/variable')->loadByCode('recently_searched')->getValue('text');
echo Mage::getModel('core/variable')->loadByCode('recently_searched')->getValue('html');

\!h move block in xml

<sales_order_view translate="label">
    <reference name="my.account.wrapper">
        <action method="unsetChild"><name>sales.order.view</name></action>
    </reference>
    <reference name="sales.order.info">
        <action method="insert"><block>sales.order.view</block></action>
    </reference>
</sales_order_view>

text有用(代码片段)

查看详情

text有用(代码片段)

查看详情

text有用(代码片段)

查看详情

text有用的东西(代码片段)

查看详情

text有用的书签。(代码片段)

查看详情

text有用的命令(代码片段)

查看详情

text有用的链接(代码片段)

查看详情

text有用的命令(代码片段)

查看详情

text有用的数学(代码片段)

查看详情

text有用的功能(代码片段)

查看详情

text我有用的别名(代码片段)

查看详情

text有用的码头图像(代码片段)

查看详情

text有用的快捷方式(代码片段)

查看详情

text一个有用的技巧(代码片段)

查看详情

text*shogun*-很有用(代码片段)

查看详情

text一些有用的扩展(代码片段)

查看详情

text有用的反应命令(代码片段)

查看详情

text[有用的库]一些有用的android库(代码片段)

查看详情