Skip to main content

Posts

Showing posts from November, 2014

Get Google Calendar Event List in WordPress

<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function  get_calender_events() { $params = array(); /*Get current date*/ $current_date  = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key =  "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url,

Slider

Slider jquery <div class="home-top">      <link rel="stylesheet" type="text/css" media="all" href="http://www.foppiez.nl/skin/frontend/default/foppiez/unibanner/css/custom.css" /> <script type="text/javascript" src="http://192.168.1.8:8090/gemz/js/marketplace/fancybox/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="http://www.foppiez.nl/skin/frontend/default/foppiez/unibanner/js/ajaxtabs.js"></script> <style type="text/css">     .bannerline{width:640px;}     .slider{width: 645px; height: 325px;; }     .slider .slide-show{width: 645px; height: 325px;; }     .slider .slide-show .slider-images{width: 645px; height: 325px;; }     .slider .tabcontent{width: 640px; height: 320px;;}     .slider .tabcontent img{width: 640px; height: 320px;} </style> <div class="slider">     <div class="slid

How to add custom links to my account navigation menu in magento

How to add custom links to my account navigation menu in magento Step1. add xml file in modules/etc/Mymodule_Customerpage.xml <?xml version="1.0" encoding="UTF-8"?> <config>      <modules>             <Mymodule_Customerpage>                    <active>true</active>                    <codePool>community</codePool>             </Mymodule_Customerpage>      </modules> </config> Step 2: Define your module config file for all actions  like below : app\code\community\Mymodule\Customerpage\etc\config.xml <config>  <modules>  <Mymodule_Customerpage>  <version>1.0.0</version>  </Mymodule_Customerpage>  </modules>     <frontend>         <layout>             <updates>                 <mymodule_customerpage module="Mymodule_Customerpage">                     <file>mymodule_customerpage.xml</file>

Add Another Customer Registration form in Magento

Add Another Customer Registration form in Magento 1.\app\code\community\Esitee\Club\controllers\IndexController.php <?php class Esitee_Club_IndexController extends Mage_Core_Controller_Front_Action {     public function indexAction(){         $this->loadLayout()->renderLayout();     }         public function submitAction() {         // Check the email is exists or not         $post = $this->getRequest()->getPost();         $user = Mage::getModel("customer/customer")                 ->setWebsiteId(Mage::app()->getWebsite()->getId())                 ->loadByEmail($post["email"]);         if($user->getId() > 0) {             Mage::getSingleton('core/session')->addError("The User Exists");             $this->_redirect("*/*/");             return;         }         // Save the User         $user->setData($post);         $user->save();         // Save address as the default

Magento add and update customer account by programmatically

$email = $customersdata['EmailAddress']; if(!empty($email)): $customerModel = Mage::getModel("customer/customer"); $customerModel->setWebsiteId($websiteId); $customerModel->loadByEmail($email); $customerModel = $customerModel->getData(); if(empty($customerModel)){ //echo '<pre>'; print_r($customerModel->getData()); exit; $customer = Mage::getModel("customer/customer"); $customer->setWebsiteId($websiteId)             ->setStore($store)             ->setGroupId($customersdata['PriceList'])             ->setFirstname($fname)             ->setLastname($lname)             ->setSapcustomerid($customersdata['Code'])             ->setCreditlimit($customersdata['CreditLimit'])             ->setBalance($customersdata['Balance'])             ->setRefcode($customersdata['RefCode'])             ->setEmail($customersdata['EmailAddress'])  

Create Menu by array using recursion and save array in text file

Create Menu by array using recursion and save array in text file <?php $menuItems = array (     1 => array     (         'ItemText' => 'Home',         'ItemLink' => 'index.php',         'ParentID' => null,     ),     2 => array     (         'ItemText' => 'Home Sub 1',         'ItemLink' => 'somepage.php',         'ParentID' => 1,     ),     3 => array     (         'ItemText' => 'Home Sub 2',         'ItemLink' => 'somepage2.php',         'ParentID' => 1,     ),     4 => array     (         'ItemText' => 'Contact',         'ItemLink' => 'contact.php',         'ParentID' => null,     ),     5 => array     (         'ItemText' => 'Home Sub Sub 1',         'ItemLink' => 'contact.php',         'Parent