if you a web developer, this is one the most common issue when you develop a website, yes… some css script not working properly on…
Continue reading CSS tricks for Cross Browser Issues
Leave a CommentIndonesian Magento Developer
if you a web developer, this is one the most common issue when you develop a website, yes… some css script not working properly on…
Continue reading CSS tricks for Cross Browser Issues
Leave a Commentjust found the way how to do this..haha <yourmodule_controller> <reference name=”head”> <action method=”setTitle”><title>The Title Here</title></action> <action method=”setDescription”><title>The Description here, make sure no line break</title></action> <action…
Continue reading Magento : Assign Title, Meta Description & Meta Keywords via XML
Leave a Commentbut first, i have tell something, the image must stored in “Media” directory :D, ok let we start, let say you have an image url…
Continue reading Magento : Resize Any Image URL
Leave a Commenti just figure it out how to do this …let me show you 😀 let say we want to rewrite customer account controller class by…
Continue reading Magento: Example Rewrite Multiple Controller Class
Leave a Commentuse this simple script to locate rewrite class print_r(Mage::getConfig()->getNode()->xpath(‘//global//rewrite’)); example result : Array ( [0] => Mage_Core_Model_Config_Element Object ( [layout] => Aitoc_Aitsys_Model_Core_Layout [locale]…
Continue reading Magento: How to Find Rewrite Class?
Leave a Commentlong time no post, this is useful script to get option list of product attribute $attribute = Mage::getSingleton(‘eav/config’)->getAttribute(‘catalog_product’, ‘brand’); if ($attribute->usesSource()) { $options = $attribute->getSource()->getAllOptions(false);…
Continue reading Magento: Get Attribute Options by Attribute Code
Leave a Commentlong time no post 😀 this is example how to send email transaction programatically, here we go!! function sendTransactionalEmail($templateId,$recepientEmail,$recepientName,$vars) { $senderName = Mage::getStoreConfig(‘trans_email/ident_support/name’); $senderEmail =…
Continue reading Send Transaction Email Programatically
Leave a Commentthis is short script to create an invoice & send email invoice to the client, here you go $orderId = 250; $order = Mage::getModel(‘sales/order’)->load($orderId); try…
Continue reading Magento: Create & Send Invoice Programatically
Leave a Commentthis is magento hack how to re-open or uncancel the order, use following script, here we go $order = Mage::getModel(‘sales/order’)->load($ORDER_ID); $order->setState(Mage_Sales_Model_Order::STATE_NEW); $order->setStatus(‘pending’); $order->save(); foreach…
Continue reading Magento: Reopen Canceled or Complete Order
Leave a Commentthis is made me crazy, fortunaley i found it after loooong hours, here we go $product = Mage::getModel(“catalog/product”)->load(173); $theoptions = $product->getOptions(); foreach($theoptions as $opkey=>…
Continue reading Magento: Get Product Custom Options Label & Id
Leave a Commenti’m going to show how to join table on sales order grid, this is very very basic way to join table in magento let’s say…
Continue reading Magento: Join Table on Sales Order Grid
Leave a Commentthis is useful trick, i found on stackoverflow monggo gan open js/mage/adminhtml/wysiwyg/tiny_mce/setup.js find this block : var settings = { mode : (mode != undefined…
Continue reading Magento : Add certain tags (iframe, script, etc) in CMS editor?
Leave a Commentuse this script to check is your server meet the requirement to run Magento enjoy gan !!! <?php extension_check(array( ‘curl’, ‘dom’, ‘gd’, ‘hash’, ‘iconv’, ‘mcrypt’,…
Continue reading PHP Script to Check Magento Server Requirement
1 Commenthere you go $rcv = Mage::getSingleton(‘Mage_Reports_Block_Product_Viewed’)->getItemsCollection(); foreach ($rcv as $item) { $_product = Mage::getModel(‘catalog/product’)->load($item->getProductId()); var_dump($_product->getData()); } mantap gan!!
Continue reading Magento: Get Recently Viewed Products
Leave a Commentrecently i worked on creating for ‘bad words’ filter comment, here is the basic php script to get the username & api key, visit this…
Continue reading PHP: Using Bad Words Filter API
Leave a CommentThis is My Favorite Online Tools to Check Website Performance, help me indentify which part need to optimized: 1. Speed test & performance test: http://gtmetrix.com/ 2. Http…
Continue reading My Favorite Online Tools to Check Website Performance
Leave a Commentit took me 2 days to figure this out man!! hopes it help please: $productAttrs = Mage::getResourceModel(‘catalog/product_attribute_collection’); print_r($productAttrs->toArray()); /* sample print out Array…
Continue reading Magento: Get All Product Attributes
Leave a Commentit’s common issue when you implement separate theme for mobile & desktop version. make sure you already set the mobile theme (add exception) on backend…
Continue reading Magento: Create Switch Button from Mobile to Desktop
Leave a Commentthis is functions to get / print list active shipping & payment methods, here we go!! mantaps gann!! public function getActivePaymentMethods() { $payments = Mage::getSingleton(‘payment/config’)->getActiveMethods();…
Continue reading Magento: Get List Active Shipping Methods & Payment Methods
Leave a Commentthis for copy paste purposes, i made this list since i fall in love with Magento, here we go: public function getProductCategory($cat_id) { $data =…
Continue reading Magento: My Favorite Functions List
Leave a Commentthis is example how to manage cookies in Magento: Set Cookies: $name_c = ‘cookies_name’; $val_c = ‘cookies_value’; $expired = 31556926; /* 1 year */…
Continue reading Magento: Set, Get & Delete Cookies
1 Commentok guys, here the directive syntax: <?php echo Mage::app() ->getLayout() ->createBlock(‘review/product_view_list’) ->setTemplate(‘review/product/view/list.phtml’) ->toHtml(); echo Mage::app() ->getLayout() ->createBlock(‘review/form’) ->setTemplate(‘review/form.phtml’) ->toHtml(); ?>
Continue reading Magento: Directive Review Form & Review List
Leave a Commentthis an old trick, but very useful for me, especially when dealing with html page only or simple php, here you go, put this code…
Continue reading HTML : Avoid Page Cache
1 Commentthis is the way how to clear everything in the cart, clear the items & cart session, $cartHelper = Mage::helper(‘checkout/cart’); $items = $cartHelper->getCart()->getItems(); foreach ($items…
Continue reading Magento: Clear Everything in The Cart
Leave a Commentbelow script is to get all store views data: Mage::app()->getWebsites(); Mage::app()->getStores(); foreach (Mage::app()->getWebsites() as $website) { foreach ($website->getGroups() as $group) { $stores = $group->getStores(); foreach…
Continue reading Magento: Get All Store Views Data
Leave a Commentthis how i did it, load customer array data by email $email = “[email protected]”; $customer = Mage::getModel(“customer/customer”); $customer->setWebsiteId(Mage::app()->getWebsite()->getId()); $customer->loadByEmail($email); /*—print the object array–*/ print_r($customer->getData());
Continue reading Magento: Load Customer Data by Email
Leave a CommentGo to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory. $cookieParams = array( ‘lifetime’ => $cookie->getLifetime(), ‘path’ => $cookie->getPath(), /* comment this line ‘domain’ => $cookie->getConfigDomain(), ‘secure’…
Continue reading Magento: Backend Login issue on Chrome Browser
Leave a Commentthis is how i did it add to cart: echo Mage::getUrl(‘checkout/cart/add’, array(‘product’=>$_product->getId(),’qty’=>1)) addto wishlist: Mage::helper(‘wishlist’)->getAddUrl($_product);
Continue reading Magento: Create Directive Button Add to Cart & Add to Wishlist
2 Commentsit is very stupid way to create jquery tabs… the CSS code: .product-tabs li a{ float: left; display: block; padding: 20px 0px; width: 187px; text-align:…
Continue reading jQuery: Stupid Way to Create Tabs
Leave a Commentfor attribute type “text field” : $_product->getData(‘attribute_code’) for attribute type “dropdown” : $_product-getAttributeText(‘attribute_code’)
Continue reading Magento: Get Product Attribute Data Dropdown & Text
Leave a Commentfor example change indonesian locale currecy format edit file: lib/Zend/Locale/Data/id.xml <currencyFormats> <currencyFormatLength> <currencyFormat> <pattern>¤#.##0,00</pattern> </currencyFormat> </currencyFormatLength> </currencyFormats> Change to <currencyFormats> <currencyFormatLength> <currencyFormat> <pattern>¤#,##0.00</pattern> </currencyFormat> </currencyFormatLength>…
Continue reading Magento: Change Currency Thousand Separator from Comma to Dot
Leave a CommentDisplay sub category list with name/title & url: $catID = 33; $datas = array(); $children = Mage::getModel(‘catalog/category’)->load($catID)->getChildren(); $children = explode(“,”,$children); foreach ($children as $category) {…
Continue reading Magento: Get Sub Category List
Leave a Comment1. skinDirective Description: Used to retrieve path of skin folder and its files, theme fallback respected Example: {{skin url=’images/image.jpg’ _theme=’blank’}} Synonym: Mage::getDesign()->getSkinUrl($params[‘url’], $params) Params: url…
Continue reading My Favorite Magento Directive Syntax
Leave a Comment