Skip to content

PHPCodez

Search
  • PHP
  • Magento
  • Javascript
  • HTML
  • My SQL
  • Functions
  • WordPress
  • Plugins
  • Joomla
  • Linux
  • jQuery
  • Profile
  • comments

Monthly Archives: March 2011

Magento

Product description on product listing page – Magento

March 14, 2011 Pramod T P 4 Comments
<?php
 echo $_product->getShortDescription();  // for printing short description
 echo $_product->getDescription(); // for printing  description
 //For displaying description, Go to the admin pannel
 //Catalod->Attributes-> Manage Attributes and edit the description attribute.
 //Set "Used in product listing" to "Yes".
?>
MagentoPHP
Magento

Include a block in sidebar – Magento

March 14, 2011 Pramod T P 175 Comments
<reference name="left">
            <block type="catalog/navigation" name="catalog.leftnav" template="catalog/navigation/left_nav.phtml" />
</reference>
Please create file with the given name "left_nav.phtml " and put it in the corresponding location
eg : /app/design/frontend/your_package/yourtheme/template/catalog/navigation/left_nav.phtml
MagentoPHPSidebar
Magento

List Products under a given category

March 10, 2011 Pramod T P 6 Comments

{{block type=”catalog/product_list” category_id=”12″ template=”catalog/product/list.phtml”}}

It will list all the products under the category id  “12” .

CategoryMagentoPHPProduct
Magento

Site URL in CMS static block / Pages – Magento

March 10, 2011 Pramod T P Leave a comment

{{store url=’mypage.html’}} will return the full sitr ur l . ie http://sitename.com/mypage.html/

and

{{store direct_url=’mypage.html’}} will return the full sitr ur l . ie http://sitename.com/mypage.html

MagentoPHP
Javascript

The number of elements in a Javascript array

March 9, 2011 Pramod T P 1 Comment

eg :

var str = new Array(“First element”, “Second”, “Last”);

alert(str.length) //will return the number of elements in an array

HTMLJavascript
Javascript

compare two strings – javascript

March 9, 2011 Pramod T P 27 Comments

You can compare two strings using “==” operator

eg :

var str1=”Test1″;

var str2=”Test2″;

if(str1=str2)

alert(“Message”);

Javascript
Javascript

declare an array – javascript

March 9, 2011 Pramod T P Leave a comment

You can declare an array using the constructor  “Array”

var arlene1 = new Array();
var arlene2 = new Array(“First element”, “Second”, “Last”)

Javascript
Javascript

How to change class name of an HTML element – javascript

March 9, 2011 Pramod T P Leave a comment

You can change the class name using the below given code.

document.getElementById(“idElement”).setAttribute(“class”,”className”);

HTMLJavascript
Magento

Include a phtml page in CMS block – Magento

March 9, 2011 Pramod T P 3 Comments

The below given code will display the the content added in “newPage.phtml”

{{block type=”core/template” name=”list-categories” template=”catalog/category/newPage.phtml”}}

MagentoPHP
Magento

Include a CMS Block in phtml file – Block

March 9, 2011 Pramod T P 1 Comment
<?php
 //The following code will load the block with the given  "identifier"
 // on the phtml page
 echo $this->getLayout()->createBlock('cms/block')->
 setBlockId('identifier')->toHtml()
?>
MagentoPHP

Posts navigation

← Previous 1 2 3 Next →

Beginners' Guide

Recent Posts

  • Upstream sent too big header while reading response
  • Navigate to a Folder from Any Location by Typing a Letter – Linux
  • Magento 2 Admin Content Deployment
  • React vs next JS
  • Disable CAPTCHA Magento 2 Admin Login
  • Difference Between composer.json and composer.lock Files
  • Magento 2 Regenerate URL Rewrites Manually For Categories
  • Magento 2 Regenerate URL Rewrites Manually for Products
  • composer self downgrade

Recent Comments

  • beats solo 4 on allow_url_include
  • Hairstyles on php end of line
  • penipu on cgi.force_redirect
  • lumi777 link alternatif on cgi.force_redirect
  • Beauty Fashion on mysqldump create table if not exists

Categories

  • .htaccess (32)
  • Ajax (4)
  • Apache (43)
  • AWS (11)
  • Cookie (4)
  • Database Model (9)
  • Design Pattern (9)
  • Filter (27)
  • General (187)
  • HTML (5)
  • IP.Board (1)
  • Javascript (99)
  • Jetty (3)
  • Joomla (17)
  • jQuery (63)
  • JSON (3)
  • JSP (1)
  • Linux (125)
  • Magento (371)
  • My SQL (74)
  • nginx (4)
  • OOPs (12)
  • Payment Gateway (1)
  • PHP (1,005)
  • Plugins (11)
  • Prototype (1)
  • session (5)
  • Socialengine (1)
  • SQL (69)
  • SVN (17)
  • Uncategorized (11)
  • Vbulletin (11)
  • Wordpress (89)
Proudly powered by WordPress