December 30, 2013

Yii Framework Migration Tips

Yii Framework Migrations - based on tool(1.1.14) 

Straight Serial

1) Modify config.php under protected/config. Also change in main.php same directory.

2) Come to Command Prompt. (Type "cmd" in run menu)

3) Go to the project directory . e.g. :D\wamp\www\phpproject\protected

Type "php.exe yiic migrate create san"

where, "san" is the migrate php file

It will ask you to confirm to create migration or not.

Press Y to confirm.

New migration created successfully. The file would save in protected/migrate directory. 

Executing the migration.
 Go to the project directory . e.g. :D\wamp\www\phpproject\protected

Type "php.exe yiic migrate".

Migration file will restore your db in localhost server. 


October 23, 2013

Magento Product price in Custom Option on Product View Page

Go to app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php
Go to line around 60.

Just replace the foreach loop with following code.

//Code for foreach loop
foreach ($_option->getValues() as $_value) {
                $priceStr = $this->_formatPrice(array(
                    'is_percent'    => ($_value->getPriceType() == 'percent'),
                    'pricing_value' => $_value->getPrice(($_value->getPriceType() == 'percent'))
                ), false);
                
                $pro_price = $this->helper('core')->currencyByStore($this->getProduct()->getPrice(),$store,false);                
                
                $select->addOption(
                    $_value->getOptionTypeId(),
                    $_value->getTitle() . ' ( '.$pro_price.' ) ' . $priceStr . '',
                    array('price' => $this->helper('core')->currencyByStore($_value->getPrice(true), $store, false))
                );
            }

October 22, 2013

How to Check the Magento version different ways | Check Magento version

Here is the tip:

Create file getVersion.php in the root folder.


Now copy and paste following code in getVersion.php:


<?php
      include_once(‘App/Mage.php’);
      Mage::app();
      echo 'You are using magento version named:'.Mage::getVersion();
?>

Run file http://www.domain.com/getVersion.php

Check Magento version for Magento 2 website

Other numbers of ways to check Magento version of the website.
1. Using the HTTP GET Request by adding /magento_version into the domain name


http://<magento2-store>/magento_version
Copy


If your domain name is www.domain.com/magento_version it will give you Magento version and edition running on the website.

2. By third party scanners or informative websites which are as follows:

Open magescan.com and provide domain name (www.domain.com) URL
open MageReport.com (free tool allows to check status of the Magento website and provides useful results.) 
Open builtwith.com and provide the domain name (www.domain.com)


3. Command line

The following command returns the Magento version.
Command:

bin/magento --version


Enjoy.. :)

October 16, 2013

Captcha Extensions for magento


Captcha Extensions for Magento Forms


http://mydons.com/add-captcha-in-magento-customer-registration-form/


http://www.magentocommerce.com/magento-connect/Fontis/extension/1169/fontis-recaptcha

http://www.fontis.com.au/magento/extension/recaptcha

http://www.magentocommerce.com/magento-connect/outsourceonline-captcha-6034.html

https://store.i95dev.com/i95dev-captcha.html