Get Product Image based on its Position – Magento

Blog Archives

Get Product Image based on its Position – Magento

You might have seen website where the product images changes when you move mouse on it. In this tutorial i’ll show you how to do it with Magento. You need to create a small module to achieve this. We will

Posted in Blog, Magento Tagged with: , ,

How to call webservice in php?

I have called web services in php by using curl function. In below I have given  one example.  I have sent XML Request by using curl function.Because My web services return data on XML Format. $xml_data = ”; //pass parameter

Posted in Blog, PHP Tagged with: , ,

Magento – Install and Upgrade Database script

I struggled a lot to find a method to install a simple database script in Magento for creating a table or upgrading field or column. In the end I thought why not write one for reference. This post is mainly

Posted in Blog, Magento Tagged with: , , , , ,

Display Most popular Posts In WordPress

Add code in your theme where ever you want the popular 5 posts to be displayed. <ul> <?php $pc = new WP_Query(‘orderby=comment_count&posts_per_page=5’); while ($pc->have_posts()) : $pc->the_post(); ?> <li><a href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a> <p>Posted by <strong><?php the_author()

Posted in Blog, Wordpress Tagged with: , , ,

Display special priced products on your Magento homepage

Step 1: Open your homepage CMS page and click on the content tab. Paste the following: {{block type=”catalog/product” name=”” alias=”product” template=”catalog/product/special.phtml”}}   Step 2: First of all this is the code were that we’re going to be using to do

Posted in Blog, Magento Tagged with: , , ,

Display magento products by category ID

<?php $categoryIds = array(18);//category id $collection = Mage::getModel(‘catalog/product’) ->getCollection() ->joinField(‘category_id’, ‘catalog/category_product’, ‘category_id’, ‘product_id = entity_id’, null, ‘left’) ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘category_id’, array(‘in’ => $categoryIds)) $_collectionSize = $collection->count() ?> Get detail of products <ul> <?php $i=0; foreach ($collection as $_product):  ?> <?php $i++;?>

Posted in Blog, Magento Tagged with: , , ,

how to display article intro image in joomla module?

Article display by yourtheme/html/com_content/article/tmpl/default.php file. you can use module mod_articles_latest so edit mod_articles_latest/tmpl/default.php file. <?php /** * @package Joomla.Site * @subpackage mod_articles_latest * * @copyright Copyright (C) 2005 – 2014 Open Source Matters, Inc. All rights reserved. * @license GNU

Posted in Blog, Joomla, PHP Tagged with: , , ,

Registration Mobile number validation In Magento

Some time in account registration we need validate mobile no, for that use this code <input type=”text” name=”telephone” id=”telephone” value=”<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>” title=”<?php echo $this->__(‘Telephone’) ?>” class=”input-text validate-mobileno” /> Replace script  <script type=”text/javascript”> //<![CDATA[  var dataForm = new VarienForm(‘form-validate’,

Posted in Blog, Magento Tagged with: , , ,

Export the database table as CSV format using PHP

This code need some files those files are, 1.db.php 2.export.php 3.index.php as in the db.php file, make this. database name –> wallstreet table name–> export_table column names –> id,name,place and as you, here i just declare what i have given

Posted in Blog, PHP Tagged with: , , ,

Drag and drop using jquery

Create .html file <link rel=”stylesheet” type=”text/css” href=”css/style.css”> <script type=”text/javascript” src=””></script> <script type=”text/javascript” src=””></script> <script type=”text/javascript”> $(document).ready(function(){ // Example 1.1: A single sortable list $(‘#example-1-1 .sortable-list’).sortable(); // Example 1.2: Sortable and connectable lists $(‘#example-1-2 .sortable-list’).sortable({ connectWith: ‘#example-1-2 .sortable-list’ }); // Example

Posted in Blog, Jquery/Ajax Tagged with: , , , ,