Posts

Showing posts from 2011

Magento Navigation menu of CMS pages

Image
Hi Buddy's, yeah, navigation menu of CMS pages.. As we aware Magento can provide us options to  make the CMS pages,.also we can display it on front end. . but things is those who are non IT people want to do such task then?? I have solution for it.. with Navigation menu of CMS pages.. Main point is, you don’t need of any developer / programmer this functionality, and you can manage it by your own.  By just single time installation or on one click. Backend configuration: Go on Menu: CMS >> Pages Add new CMS page over there, In general tab there is options to select the status of “Show in Horizontal Menu”. If you “enabled” it then it would be show on frontend, at anytime you can make it “enabled” or “disabled” as per your need. Here there is options to display on menu or not.. Frontend view. Currently, I enabled the “about us” and “customer service”, so it display here. However here I display in Horizontal, of course it possible to disp

Magento Budget Box - Enter your budget and get all the items without breaking the bank.!!

Image
Dear Friends, Budget box, as per the name suggest user can enter their budget and will get all the items which they afford without breaking the bank. Please see the following screen shot for how it look, (you need to design it as per your store design) How it Works; Enter your budget amount and click on “search” button, result is on front of you. One more facility is there, it’s about the message. You can set your own message, means you don’t need to take help of any developer if you want to change the message of title and change result. Which you seen in front end. And you done, let me know about your feedback, it would great for me. Cheers Gaurav

Magento _ Products Disabled after reaching end date through cron

Image
Hello Dudes, As per title say, if you would like something after reaching the specific date; my products should be disabled... It would not longer seen after reaching date which is defined for that products. For that you just have to define the end date for that products, others things should be handle by the application code.. How it look/work. Define the end date for the product. Now you just have to set the CRON on server when it would reach the end date of the products.. It would make it disabled. Let me know your feedback/ thoughts about the extension... it would be great for me. Let me know if want this extensions. Cheers, Gaurav.

Magento - Mass Shipment Create

Image
Hello Dudes, If you feel that to create the shipment is time oriented like go on each order then create the shipment one by one then I have solutions for it through it you can create the mass shipment of your orders. You just have to select the orders then click on “mass Shipment creates” and shipment is created; same as you delete the multiple customers or change the status of products, etc… How’s it look/work. As you seen I checked on some orders then go on Action tab and select the “mass Shipment creates” and click on “Submit” button and shipment(s) are created successfully. The result after creating the mass shipment..   For now it is limited editions, means if you used shipment tracking system then it not more use full, I'm looking to upgrade this edition and would bring tracking system also in mass shipment create module. Let me know about your feedback and your thoughts regarding this extension. PM me if you want this extension. Warm Regards

Integrity constraint violation when enabling/disabling Magento modules

Once i had one task which gave following error when enabled/disabled any module (System >> Configuration >> Advanced) Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'default-0-advanced/modules_disable_output/ _ ' for key 'config_scope' Solutions: First i think it may be because of dublicate entry of that module; so i was checked in "core_config_data", but i found nothing over there... there is no entry of that module in "core_config_data" table. So i execute the following query into mysql browser: INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('default', 0, 'advanced/modules_disable_output/Companyname_Modulename', 0); but it still through that error. then i checked into "config.xml" file of that module and what i found: There is problem of naming conversion. it is <modules> <<companyname>_<modulename

Script for to remove the cache - Magento

Here i paste code to remove the cache from the magento.. magento can provide a options to us to remove cache form the admin configuration, but sometimes it not more helpful to us... so expert suggest to remove cache folder.. make one cache-clear.php file into your root folder and paste following code: <?php require_once ("app/Mage.php"); umask(0); Mage::run(); Mage::app()->getCache()->clean(); exit("done"); ?> can call that file with :http://yourdomainname/cache-clear.php hope this helps :) Cheers, Gaurav

Could not determine temp directory, please specify a cache_die manually..after magento installed

Hi guys, After magento is installed, you may have the error "Could not determine temp directory, please specify a cache_dir manually" when clicking on some pages. Usually it happened in shared web hosting, and on individual server it happened when the permission of tmp folder set wrong. Firstly, copy "/lib/Zend/Cache/Backend/File.php" to "/app/code/local/Zend/Cache/Backend/File.php", then in line 91: 'cache_dir' =>  null, change to 'cache_dir' => "var/tmp/", You can also change the cache folder wherever you want, and that directory you should create yourself and change the permission to 755. and you done :) Cheers,

Magento Admin login problem

I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the same login page. Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password. luckily i found solutions: The solution is to modify the core Magento code. Open app/code/core/Mage/Core/Model/Session/Abstract/Varien.php . Comment out the lines 80 to 83. The line number may vary according to the Magento version. But these lines are present somewhere near line 80. You have to comment the comma (,) in line: $this->getCookie()->getPath()//, // set session cookie params session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath()//, //$this->getCookie()->getDomain(), //$this->getCookie()->isSecure(),

Magento Reindexing problem - take too long time

There are problem in reindexing in magento many times due to number of factors: The number of products The number of store views The apache/lighttpd timeout setting The php.ini maximum execution time & script input time The lock file is still place from the previous time can preventing it running again one more thing VPS or dedicated server is must have for Magento. here i paste the trick/tips for the same. First of all increase your execution time value from the .htaccess # php_value memory_limit 64M php_value memory_limit 128M php_value max_execution_time 18000 Now open your shell/terminal: go on upto "public_html/app/shell" use "ls -l" command, to list out the files. there is one indexer.php file in the list. Commads: php indexer.php --info (Will shows list of allowed indexers) php indexer.php --reindex all (Reindex data by all indexers) If you wish to reindex one by one then use following commands: php in

Enable maintenance mode in magento

There is many times we need to put site into maintenance mode whenever you need to do any changes in the website Here i can show you how you can done this. For Magento version 1.4 and above: you just need to create a file named maintenance.flag in your Magento root. Then, your website automatically goes into maintenance mode and after completing your works you can comment or delete this file. If you want to edit some lines in maintenance template file. It is present in errors/default/503.phtml For Magento version 1.3 and below, - create a file called index.html in Magento root and write your maintenance messege in it, - write the following code in the beginning of index.php     <?php     // replace with your development IP     if ($_SERVER['REMOTE_ADDR']!=='127.0.0.1') {       header("Location: /index.html");       exit;     } Hope this help.! Cheers :)

PHP cURL functions

cURL is a library which allows you to connect and communicate to many different types of servers with many different types of protocols. it supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. A typical PHP cURL, follows the following sequesnce: curl_init – Initializes the session and returns a cURL handle which can be passed to other cURL functions. curl_opt – This is the main work horse of cURL library. This function is called multiple times and specifies what we want the cURL library to do. curl_close – Closes the current cURL sessio     curl_exec – Executes a cURL session. Download file or web page using PHP cURL: <?php $ch = curl_init(); //Initialize the cURL session    //Set the URL of the page or file to download. curl_setopt($ch,CURLOPT_URL, 'http://news.google.co.in/news?pz=1&cf=all&ned=in&hl=en&topic=t&output=rss' ); // Ask cURL to return the contents in a variable instead of simply echoing them to the bro

Display currency selection in header

By default, the currency selector is displayed in the left sidebar. Here, I will show you how you can show it in header. Create a new phtml file (../template/<dirname>/currency-top.phtml) and write the following code in it: <?php if($this->getCurrencyCount()>1): ?> <div class="box language-switcher" style="margin-left:15px"> <label for="select-language">Your Currency: </label> <select name="currency" onchange="changeCurrency(this)"> <?php foreach ($this->getCurrencies() as $_code => $_name): ?> <option value="<?php echo $_code ?>"<?php if($_code==$this->getCurrentCurrencyCode()): ?> selected="selected"<?php endif; ?>> <?php echo $_name ?> - <?php echo $_code ?> </option> <?php endforeach; ?> </select> </div> <script typ

By deafult selecting "Ship to this address" in billing section of checkout

Hi Guys, In Magento, by default there is selecting "Ship to different address" in billing section. If you want to selecting "Ship to this address" by default then, you can done this by following way.. . open the billing.phtml path: app/design/frontend/themename/themename/template/checkout/onepage/billing.phtml and put this before the form tag $session = Mage::getSingleton('core/session'); if (intval($session->getPreselectedAddressOption()) !== 1) { $session->setPreselectedAddressOption('1'); $this->getQuote()->getShippingAddress()->setSameAsBilling(true); } In this way you make preselected "Ship to this address" in billing section of checkout. without modifying in core file. Cheers :) Gaurav

know, your server is compatible with Magento?

Hi guys, In order to run Magento your server needs to meet some basic software requirements but you can test your server for compatibility by following these simple steps: 1. Download magento check file from hear: - http://www.magentocommerce.com/_media/magento-check.zip 2. Extract it and copy magento-check.php file into your directory (where your .htacces,index.php files are beside) 3. In your browser navigate to this page: IE. magento/magento-check.php   Cheers, Gaurav :)