Monday, 12 October 2015

Please enter a valid URL. Protocol is required (http://, https:// or ftp://) when Magento installing?

We need to disable URL validation here.



1. Open \app\design\install\default\default\template\install\config.phtml


2. Open file in your text editor and find the textbox where the base url is entered.

         It will be around line no 50. 



3. Remove "validate-url" from its class and save the file.

<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Base URL')) ?>" class="required-entry  validate-url  input-text" />



4. After remove "validate-url" from its class. Now looks like:

<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Base URL')) ?>" class="required-entry input-text" />


5. Now you can continue the installation




Thursday, 24 September 2015

Magento: How to delete ‘Url Rewrite Management’ URLs?


You can delete some ‘Url Rewrite Management’ URLs form follow the following steps:


1. Open your magneto database.


2. Open  ‘core_url_rewrite’ table.


If you want delete all URLs, then empty the table.


                                  or


want delete some particular URLs, then search and delete URLs. Like- You want delete "Mens" category URLs, then search "mens" with like operator and delete all URLs. 


3. Now open magneto backend and Reindex Data.


Above steps will delete all manually and system created rewrites URLs. Now you can recreate only needed URLs and your category and products URLs will recreate automatically.



Wednesday, 16 September 2015

Magento: Product Review Form is not submitting.

While I submit the Product Review form in magneto but it is not submitting and not showing any error message.

Then I checked the Review form. I found some error in code. 


<?php echo $this->getBlockHtml('formkey'); ?>


was not writting.  So I added this code in "form.phml" of Review after form tag.


Now code looks like :


 <?php if ($this->getAllowWriteReviewFlag()): ?>

    <form action="<?php echo $this->getAction() ?>" method="post" id="review-form">

<?php echo $this->getBlockHtml('formkey'); ?>


        <fieldset>

Saturday, 27 June 2015

How can add custom option title in dropdown option in magento

Open file:  app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php


Find following code (Maybe line number - 59):


         $select->setName('options['.$_option->getid().']')
                              ->addOption('', $this->__('-- Please Select --'));


add this line at above of code:


                      $getOptionTitle= ucwords($_option->getTitle());


Now code looks like as:


         $getOptionTitle = ucwords($_option->getTitle());

                                ->setName('options['.$_option->getid().']')

                                      ->addOption('', $this->__('-- Please Select'.$getOptionTitle. '--'));


Now go to frontend. And check now, Title of Custom Option is displaying in drop down.