You can create and use any existed widget type in your Magento site.
{{widget type="cms/widget_page_link" template="cms/widget/link/link_block.phtml" page_id="2"}}| <?php | |
| require_once('app/Mage.php'); | |
| ini_set('display_errors', 1); | |
| Mage::app('admin'); | |
| $orderIds = array(1,2,3,4); | |
| $orders = Mage::getModel('sales/order')->getCollection() | |
| ->addFieldToFilter('entity_id', (array) $orderIds); | |
| foreach ($orders as $o) { | |
| //load order object - I know it's not ok to use load in a loop but it should be ok since it's a one time script | |
| $order = Mage::getModel('sales/order')->load($o->getId()); |
| // JavaScript Document | |
| //adiciona mascara de cnpj | |
| function MascaraCNPJ(cnpj){ | |
| if(mascaraInteiro(cnpj)==false){ | |
| event.returnValue = false; | |
| } | |
| return formataCampo(cnpj, '00.000.000/0000-00', event); | |
| } | |
| //adiciona mascara de cep |
| /** | |
| * Address Auto Fill based on Postcode | |
| * | |
| * Author: | |
| * Rafael Patro <[email protected]> | |
| * | |
| * Intallation: | |
| * Add a CMS Static Block applying the entire script below. | |
| * Add a Widget to pages with address forms. | |
| * |
| */5 * * * * php /home/bender/htdocs/cron.php -malways 1 > /dev/null | |
| */5 * * * * php /home/bender/htdocs/cron.php -mdefault 1 > /dev/null | |
| * * * * * ! test -e /home/bender/htdocs_dev/www/maintenance.flag && /bin/bash /home/bender/htdocs_dev/www/scheduler_cron.sh --mode always | |
| * * * * * ! test -e /home/bender/htdocs_dev/www/maintenance.flag && /bin/bash /home/bender/htdocs_dev/www/scheduler_cron.sh --mode default |
| login url | |
| <?php echo Mage::getUrl('customer/account/login'); ?> | |
| logout url | |
| <?php echo Mage::getUrl('customer/account/logout'); ?> | |
| My Account url | |
| <?php echo Mage::getUrl('customer/account'); ?> | |
| Register url |
| const TYPE_BOOLEAN = 'boolean'; | |
| const TYPE_SMALLINT = 'smallint'; | |
| const TYPE_INTEGER = 'integer'; | |
| const TYPE_BIGINT = 'bigint'; | |
| const TYPE_FLOAT = 'float'; | |
| const TYPE_NUMERIC = 'numeric'; | |
| const TYPE_DECIMAL = 'decimal'; | |
| const TYPE_DATE = 'date'; | |
| const TYPE_TIMESTAMP = 'timestamp'; // Capable to support date-time from 1970 + auto-triggers in some RDBMS | |
| const TYPE_DATETIME = 'datetime'; // Capable to support long date-time before 1970 |
| <?php | |
| $isMobile = Zend_Http_UserAgent_Mobile::match( | |
| Mage::helper('core/http')->getHttpUserAgent(), | |
| $_SERVER | |
| ); |
| if (Mage::getSingleton('customer/session')->isLoggedIn()) { | |
| // Load the customer's data | |
| $customer = Mage::getSingleton('customer/session')->getCustomer(); | |
| $customer->getPrefix(); | |
| $customer->getName(); // Full Name | |
| $customer->getFirstname(); // First Name | |
| $customer->getMiddlename(); // Middle Name |
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * jv_clean_product_images.php | |
| * | |
| * NOTICE OF LICENSE | |
| * | |
| * This source file is subject to the Open Software License (OSL 3.0) | |
| * that is bundled with this package in the file LICENSE.txt. | |
| * It is also available through the world-wide-web at this URL: |