Wednesday, October 10, 2012

Magento 2: A technical overview

Tuesday, June 5, 2012

Internet Download Manager 6.05 Registration Serial Number|Tech Byte 4 U

Internet Download Manager 6.05 Registration Serial Number|Tech Byte 4 U
Internet Download Manager(also known as Idman) is an excellent internet download accelerator that will care of all your downloads from the moment you install it on your PC.
If you want to increase download speed, this tool can help you to increase download speeds by up to 5 times, resume and schedule downloads.
High speed internet connections are common these days, Even if you have the fastest router in the neighborhood, take a look at Internet Download Manager , because it really has a lot to offer.............

Wednesday, May 9, 2012

Magento Onestep Checkout – Remove Payment Method Step

Magento Onestep Checkout – Remove Payment Method Step

In this blog post, we will see how to remove the payment method step from onepage checkout.
This source code of this blog has been tested in magento 1.6 but should work on magento 1.4+, no core magento files have been changed including javascript files............

Thursday, April 26, 2012

Saturday, February 11, 2012

Magento...............

Get adminhtml Front Name

$adminFrontName = (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName');


Get Product image path:
$productId = 1;
$product = Mage::getModel('catalog/product')->load($productId);
$path = Mage::helper('catalog/image')->init($product, 'image')->resize(75, 75);

 Format a number as price:
$this->formatPrice(10);
 Call a .phtml explicitly:
echo $this->getLayout()->createBlock('sales/order_recent')->setTemplate('sales/order/recent.phtml')->toHtml();
 Get Currency Code:
Mage::app()->getStore()->getCurrentCurrencyCode();
 Get Currency Symbol:
Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();


To load the product Tier price details in the product list view

$_productCollection=$this->getLoadedProductCollection();
$_productCollection->addTierPriceData();


Friday, September 2, 2011

Calculate Postal Code Distance Using Google API


This is simple function to calculate the distance between two different Canadian postal codes.

$query = "http://maps.google.co.uk/maps/geo?q=".urlencode($code)."&output=json&key=".$mapsApiKey;

 For this i used http://maps.google.co.uk- (use domian nearest your region)
<?php

/**
 * @author jayje
 * @copyright 2011
 */




$add1=getLatLong('L8R 3L4');
$add2=getLatLong(10001);
$lat1=$add1['Latitude'];
$lon1=$add1['Longitude'];

$lat2=$add2['Latitude'];
$lon2=$add2['Longitude'];

echo "<br>kilometers=";
echo distance($lat1, $lon1, $lat2, $lon2, 'k');

 function getLatLong($code){
 $mapsApiKey = 'ABQIAAAA8JnBykA-EPiMmKdOR--UcRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQ8npfo6U4N7PRuya0RBiyaKD8mRA';
 $query = "http://maps.google.co.uk/maps/geo?q=".urlencode($code)."&output=json&key=".$mapsApiKey;

 $data = file_get_contents($query);
 // if data returned
 if($data){
  // convert into readable format
  $data = json_decode($data);
  $long = $data->Placemark[0]->Point->coordinates[0];
  $lat = $data->Placemark[0]->Point->coordinates[1];
  return array('Latitude'=>$lat,'Longitude'=>$long);
 }else{
  return false;
 }
}
function distance($lat1, $lon1, $lat2, $lon2, $unit) {

  $theta = $lon1 - $lon2;
  $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) +  cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));
  $dist = acos($dist);
  $dist = rad2deg($dist);
  $miles = $dist * 60 * 1.1515;
  $unit = strtoupper($unit);

  if ($unit == "K") {
    return ($miles * 1.609344);
  } else if ($unit == "N") {
      return ($miles * 0.8684);
    } else {
        return $miles;
      }
}

?>

Smarty split a String

$item ='FFFEREE-TGFFGGF-RERR'

This is the can used to split smarty variable.

{assign var="bar_at" value=$item|strpos:"-"}
 <li>{$item}</li>
 <li>{$item|substr:0:$bar_at}</li>
<li>{$item|substr:$bar_at+1}</li>

Tuesday, July 26, 2011

Pass PHP variables to Javascript in Drupal 6

 To access  PHP values and variables from JavaScript or convert php variables to JavaScript variables using Drupal 6, you can send them to your JavaScript code using Drupal's drupal_add_js function as follows:
drupal_to_js - Converts a PHP variable into its Javascript equivalent.
 example -
$msg= 'hello dear';    //passing php variables to javascript

 drupal_add_js("var apath = " . drupal_to_js($apath) . ";", 'inline');

Drupal_add_js(
    '$(document).ready(function(){
                        alert(msg);               
                   })',
    'inline'
);

Monday, July 4, 2011

CSS Variables

@variables {
CorporateLogoBGColor: #fe8d12;
}

div.logoContainer {
background-color: var(CorporateLogoBGColor);
}

Tuesday, May 3, 2011

Gbridge

What is Gbridge
Gbridge is a free software that lets you remotely control PCs, sync folders, share files, and chat securely and easily. An extension of Google's gtalk service, Gbridge automatically forms a collaborative, encrypted VPN (Virtual Private Network) that connects your computers and your friends' computers directly and securely with patented technology. Gbridge has many unique features.
more .....Gbridge 

Monday, April 25, 2011

Projector phones

Microsoft launches Surface 2.0


At the Consumer Electronics Show Wednesday in Las Vegas, Microsoft CEO Steve Ballmer and VP Mike Anjiulo show off the company's new Surface 2.0 platform. The multitouch, tabletop will be available in late 2011 in 23 countries and will retail for $7,600.
http://www.smartplanet.com/technology/video/microsoft-launches-surface-20/495834/

Thursday, April 21, 2011

TeamLab :free open-source platform for business collaboration and project management

online url - http://www.teamlab.com/
Download url - http://sourceforge.net/projects/teamlab/


TeamLab is a web-based platform for business collaboration and project management. It has been developed by Ascensio System SIA, a fast-growing company that offers IT-solutions for personal and corporate use.

TeamLab was founded on the idea of making social networking and project management efficient. It combines a wide range of features that assist a company team to work as one organism at solving common tasks and achieving results.