Tuesday 30 September 2014

PHP output JSON Web Service charset UTF-8 get multi languange data like hindi,franch



set database filed collation in table.

if you add another langauge data like hindi,gujrati  first chanage strucute
change Collation as utt8_general_ci.



Saturday 27 September 2014

Ajaxsubmits the from jquey validation in php

 <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"/>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">

<!-- Jquery Validation -->
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.js"></script>


<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>


Monday 22 September 2014

Create Simple Static slideshow or slider using Jquery

Create Simple Static slideshow or slider using Jquery 

 

myphpinformation: Get Product attribute’s select option Id or Lable ...

myphpinformation: Get Product attribute’s select option Id or Lable ...: Get Product attribute’s select option Id or Lable or Value in Magento Suppose, you have an product attribute called “ manufacture ” in ...

Get Product attribute’s select option Id or Lable or Value in Magento

Get Product attribute’s select option Id or Lable or Value in Magento

Thursday 18 September 2014

add and Remove Js In magento

hello All,

remove js in magento change in  your loca.xml file

if not exit then create local,xml file in your theme layout folder.

How to remove block from magento

Hello All,

Thursday 11 September 2014

Magento Product Addtocart go to Checkout Page by skipping Cart Page

hello Magento developer,

this example of Magento Product Addtocart go to Checkout Page by skipping Cart Page .

if you want skip cart process in magento. follow this simple code.

just goto your app/code/local/Mage/checkout/controllers/CartController.php;

write this below code. check this your site.

below code use skip cart process. just click on add to cart i will goto checkout process.

require_once 'Mage/Checkout/controllers/CartController.php';
class My_Module_Checkout_CartControllerextendsMage_Checkout_CartController
{
 public function addAction(){
$returnUrl =Mage::getUrl('checkout/onepage'); $this->getRequest()->setParam('return_url', $returnUrl); parent::addAction();
}
}
 this code help to direct redirect to checkout page

Create new custom category attribute in Magento

if you want to create custom textbox attribute use this code

create new custom category attributes in magneto.

in magneto admin you want to create custom attributes using code. just follow below instruction.

here example of brand. i am create text box  for brand. i am create brand attributes  in product.

it can use for how to create text box attributes using code. this code use for create text box.

require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute  = array(
    'group'         => 'General',
    'input'         => 'text',
    'type'          => 'varchar',
    'label'         => 'Brand value',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
);
$installer->addAttribute('catalog_category', 'brand_value', $attribute);
$installer->endSetup();

paste this code in header.phml file and check category menu.



if you want to create custom selectbox for Yes/no attribute use this code

it can use for how to create selectattributes using code. this code use for create select.

require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute  = array(
    'group'                     => 'General',
        'input'                     => 'select',
        'type'                      => 'int',
        'label'                     => 'Is Mega Menu',
        'source'                    => 'eav/entity_attribute_source_boolean',
        'global'                    => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'                   => 1,
        'required'                  => 0,
        'visible_on_front'          => 0,
        'is_html_allowed_on_front'  => 0,
        'is_configurable'           => 0,
        'searchable'                => 0,
        'filterable'                => 0,
        'comparable'                => 0,
        'unique'                    => false,
        'user_defined'              => false,
        'default'           => '0',
        'is_user_defined'           => false,
        'used_in_product_listing'   => true
);
$installer->addAttribute('catalog_category', 'mega_menu', $attribute);
$installer->endSetup();

paste this code in header.phml file and check category menu.

just check this.