Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file: Match group groupsftp ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand…
Continue reading Create SFTP User on Linux
Comments closedIndonesian Magento Developer
Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file: Match group groupsftp ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand…
Continue reading Create SFTP User on Linux
Comments closedlong time no post :p let’s get straight to the point, here is how we do this first open your installer file at app/code/local/YOURMODULE/MODULENAME/sql/modulename_setup/mysql4-install-1.0.0.php here…
Continue reading Add New Order Status on Custom Magento Extension Installer
Comments closedI just uploaded Indonesian Language Pack to Magento Connect, it takes 10 bussines days to approve & review my extension, but i also uploaded it to…
Continue reading Magento : Indonesian Translation Pack for Magento
Comments closedthis is killer sql codes to get those values create view wp_post_view as SELECT DISTINCT ID, post_title ,(SELECT group_concat(wp_terms.name separator ‘, ‘) FROM wp_terms…
Continue reading WordPress : SQL get Id, post title,categories, & Tags
Comments closedthis is one coolest magento trick i ever found 😀 you can set on Catalog->Manage Categories, select a category, go to tab Custom Design, then…
Continue reading Magento : Force Display Mode List/Grid to Specific Categories
Leave a CommentSince yesterday, i’v decided to change my PHP IDE from Dreamweaver CS6 (DW) to Notepad++, DW caused my laptop stop working & unresponsive which is…
Continue reading Retrieve NPPFTP Settings
Leave a Commenthere example script how to display custom xml on your custom magento plugin class Module_Modulename_IndexController extends Mage_Core_Controller_Front_Action{ public function IndexAction() { $this->loadLayout(false); $this->getResponse()->setHeader(‘Content-Type’,’text/xml’); echo…
Continue reading Magento : Render any XML doc on controller
Leave a Commenti wrote some jquery script to perform infinite scroll WordPress posts on magento site, here you go <style> /*hide the toolbars */ .pager.pager-no-toolbar{ display:none; }…
Continue reading Magento : Infinite Scroll for WordPress Posts Integration on Magento
Leave a Commentlet say we have cron setup on config.xml, like this <crontab> <jobs> <alertreminder_abdcart> <schedule><cron_expr>*/5 * * * *</cron_expr></schedule> <run><model>alertreminder/cron::Abdcart</model></run> </alertreminder_abdcart> </jobs> </crontab> and then a…
Continue reading Magento : Execute Custom Module Cron Manually
Leave a Commenthere the XML guide <template> <email> <{section_name}_{group_name}_{fields_name} translate=”label” module=”mymodule”> <label>Custom Email Template</label> <file>mymodule/custom_email.html</file> <type>html</type> </{section_name}_{group_name}_{fields_name}> </email> </template> <{fields_name} translate=”label”> <label>Email Template</label> <frontend_type>select</frontend_type> <source_model>adminhtml/system_config_source_email_template</source_model> <sort_order>5</sort_order>…
Continue reading Magento : Custom Email Template on Custom Module
Leave a Commenthere you go $mod = Mage::getModel(‘wishlist/wishlist’)->getCollection(); $data_wishlist = array(); foreach($mod as $data) { $item_array = array(); $load = Mage::getModel(‘wishlist/wishlist’)->load($data->getId())->getItemCollection(); $customer = Mage::getModel(‘customer/customer’)->load($data->getCustomerId()); $count = 0;…
Continue reading Magento : Get All Customer Wishlist Items
Leave a Commentsederhana sih, ngan sok poho wae…jadi mending di catet weh, mangga $product = Mage::getModel(‘catalog/product’); print_r($product->load($product->getIdBySku(‘SKU_DI_DIEU’))->getData());
Continue reading Magento : Manggil data produk ngangge SKU
Leave a Commentjaga2 bisi poho..soalna sering dipake,….ieu carana keur munculkeun attribute value, mangga ah..haha $name=’size’; /*kode attribute na di dieu*/ $attributeInfo = Mage::getResourceModel(‘eav/entity_attribute_collection’)->setCodeFilter($name)->getFirstItem(); $attributeId = $attributeInfo->getAttributeId();…
Continue reading Magento : Munculkeun Daftar Nilai Attribute ti Spesifik Attribute
Leave a Commentthis is a dirty way to fix this issue, go to Fatal error: Call to a member function getName() on a non-object in app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line…
Leave a Commenti think this is common problem after development phase, yes, server disk space… usually a developer having problem with this kind issue, especially if your…
Continue reading Linux : Check files & directories size
Leave a Commenthere you go! echo ‘<pre>’; $kron = Mage::app()->getConfig()->getNode(‘crontab/jobs’); print_r($kron); here the example results Mage_Core_Model_Config_Element Object ( [core_clean_cache] => Mage_Core_Model_Config_Element Object ( [schedule] => Mage_Core_Model_Config_Element Object…
Continue reading Magento : List All Magento Cronjobs
Leave a Commentit takes >30mins to discover this shit (sorry) here you go $cart = Mage::getModel(‘checkout/cart’)->getQuote(); foreach ($cart->getAllItems() as $item) { $productName = $item->getName(); $sku = $item->getSku();…
Continue reading Magento : Force Update Qty at Shopping Cart
Leave a Commentjust discover how to did this for example you want disable required on postcode / zipcode field on frontend, first go to phpmyadmin, run this…
Continue reading Magento : Stupid way to disable required field from eav table
Leave a Commenthmmm… here we go $itemsVisible = Mage::getSingleton(‘checkout/session’)->getQuote()->getAllVisibleItems(); foreach($itemsVisible as $item) { $selected_options= $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct()); print_r($selected_options); } //the result will be like this, haha: /* [0] =>…
Continue reading Magento: Display selected product options in cart
Leave a Commentif 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 Commenthere some jquery tricks for select button: anyway, i just use following tricks coulpe minutes ago 😀 here we go! /* sort options by text…
Continue reading JQuery: Manipulate Select Button
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 example how to change style for input text or text area, here you go your-selector::-webkit-input-placeholder { color: red; } your-selector:-moz-placeholder { color:…
Continue reading CSS: Styling Input Text/Textarea Element
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 an old trick how to styling select button and also must working (at least) on Chrome,FF & Safari here you go font:…
Continue reading CSS: Styling Select Button
1 Commentthis is sholud be working on All browser, except the legend IE6 .share-action a:hover{ opacity:0.8; -moz-opacity:0.8; -khtml-opacity: 0.8; -ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=80)”; }
Continue reading CSS: Opacity for All Browser
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 Commentthis is example how to add breadcrumbs on My Account Dashboard page, here we go <customer_account_index translate=”label”> <reference name=”breadcrumbs”> <action method=”addCrumb”> <crumbName>home</crumbName> <crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo> </action>…
Continue reading Magento: Add breadcrumbs via layout XML
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 Commentit took me couple hours to figured this out, here we go!!, mangstabhhh $prod = Mage::getModel(‘catalog/product’)->load(1243); foreach($prod->getOptions() as $kunci=>$nilai) { echo $nilai->getId().” | “.$nilai->getTitle().'<br>’;…
Continue reading Magento : Get Product Custom Options Data
1 Commentwell maybe this is something we needed in the future…to do this, login to your cpanel, go to advance/cronjobs menu let say we will execute…
Continue reading Cpanel: Use Cron jobs to visit a URL
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 Commentjust figure it out couple minutes ago, hope this is useful jQuery(‘body’).each(function(index) { jQuery(this).find(‘*’).each(function() { var cur_size = jQuery(this).css(‘font-size’); //alert(cur_size); cur_size = cur_size.replace(“px”,””); jQuery(this).css(‘font-size’, (cur_size…
Continue reading jQuery : Increase / Decrease All Element Font Size
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 Commentto detect when browser is scrollable, use below jQuery script: if (jQuery(document).height() > jQuery(window).height()) { //alert(‘scroll bar exist’); }else { //alert(‘scroll bar Not exist’);…
Continue reading jQuery: Detect if Browser Scrollable
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 Comment