game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online game.onenall.com,play free game online

catalog category view magento page layout change

catalog category view magento page layout change or u can say How to change category page layout in magento

please edit the category view at template/catalog/category/view.phtml.

you can also customize the design layout for a particular category

Catelog -> manage Categories -> Choose your category

Then on the tab section select Custom Design.

Change the Page Layout as what ever you want

mrphpguru

getStoreCategories magento is not working

getStoreCategories magento is not working Or you can say category is not displaying in the left hand side of the template.

Here’s what I did:

1. Catalog -> Manage Categories.

2. Click the ’Add Root Category‘ button in the upper-left area.

3. Fill in a name. For this walk-through, I used ’my new root cat‘.

4. Scroll down and set ’Is Active‘ to ’Yes‘.

5. Click the ’Display Settings‘ tab and set ’Is Anchor‘ to ’Yes‘.

6. Click the orange ’Save Category‘ button.

It should now say ”Category saved” in green at the top and your new category should be listed on the left.

Now we add a sub-cat:

1. Click the ’Add Subcategory‘ button in the upper-left.

2. Make sure you’re on the ’General Information‘ tab.

3. Fill in a name. For this walk-through, I used ’my new sub-cat‘.

4. Scroll down and set ’Is Active‘ to ’Yes‘.

5. Click the orange ’Save Category‘ button.

It should now say ”Category saved” in green at the top and your new sub-category should now be listed on the left under ’my new root cat‘.

Both of these have zero products, so let’s add at least one so that it shows up in your template/theme.

1. Catalog -> Manage Products.

2. Click the ’Add Product‘ button in the upper-right.

3. Go with the defaults for this walk-through and click the ’Continue‘ button.

4. Fill in a Name (’new test product‘), SKU (’new_test_product‘), Weight (0), set the Status to ’Enabled‘, and set the Tax Class to ’None‘.

5. Click on ’Prices‘ along the left-hand side and enter ’1‘ for the price (or whatever you want).

6. Click on ’Description‘ along the left-hand side and enter a bogus Description and Short Description.

7. Click on ’Categories‘ along the left-hand side and put a check mark next to each category that you want this product to appear in. For this walk-through, just select ’my new sub-cat‘.

8. Click on the orange ’Save‘ button in the upper-right.

It should now say ”Product was successfully saved.” in green at the top and your sample product should be in ’my new sub-cat‘.

Now we set your store to use this new root cat. This is the key:

1. System -> Manage Stores.

2. In Magento, you have Websites, and these contain Stores, and each Store has a View. It’s in the Store where you set the default root category. Click on the name of your store under the ’Store Name‘ column.

3. For ’Root Category‘, select ’my new root cat‘.

4. Click the orange ’Save Store‘ button in the upper-right.

5. Reload your store. Your one sub-cat should be listed, along with your one demo product item.

for more details and Info: http://www.magentocommerce.com/boards/viewthread/19207/

How to install a Magento theme





Please follow following step to install Magento theme

1) Download any free theme from  Magento theme site

2) unzip the downloaded file

3) you will see two folder apps and skin

(app/design/frontend/default/)

similarly for skins

(skin/frontend/default/)

4) keep the same strucure and copy the new folder suppose named freepop in both location from respective folder.

5) login to your admin section

6) click on the system>>configuration you will see following screen

7) now click on the design u will see following screen

See all the field above all is haveing the same name as folder freepop except the last field.

You can see tutorial in youtube..

how to force download known file using php





Today i got a function please see the function below how to download known file using php function

So see the function below how to force download file.

<?
function force_download($file)
{
$dir      = “img/”;
if ((isset($file))&&(file_exists($dir.$file))) {
header(“Content-type: application/force-download”);
header(‘Content-Disposition: inline; filename=”‘ . $dir.$file . ‘”‘);
header(“Content-Transfer-Encoding: Binary”);
header(“Content-length: “.filesize($dir.$file));
header(‘Content-Type: application/octet-stream’);
header(‘Content-Disposition: attachment; filename=”‘ . $file . ‘”‘);
readfile(“$dir$file”);
} else {
echo “No file selected”;
} //end if
}//end function
force_download($_REQUEST['file']) ;
?>
Source: http://www.weberdev.com/get_example-4182.html

how to break a sentance after some words using php





wordrap php

Today we will see how to break a sentance after some characters using php.

Sometime we need to break a long line into small peaces of sentence to meet the designing   requirement. PHP has very good function wordwrap() to meet the req.

Basic sentance of the wordwrap() php function

string wordwrap ( string $str [, int $width = 75 [, string $break = "\n" [, bool $cut = false ]]] )

So u can see by default, wordwrap() uses a column width of 75 characters. This means that no line will be more than 75 characters long.

Wrapping very long words

For example suppose we have a sentance:

$sentance = ‘JohnCleese: Have you signed up to my monthly email yet? Youre missing outif you havent http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.co.uk/‘;

echo "<pre>" . wordwrap( $sentance, 10 ) . "</pre>";

output will be: 
JohnCleese:
Have you
signed up
to my
monthly
email yet?
Youre
missing
outif you
havent!

http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.co.uk/

So you can see the problem at last sentence.

To make this work perfectly use the sentence like this

<?
$sentance = 'JohnCleese: Have you signed up to my monthly email yet? Youre missing outif you havent! http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.co.uk/';
echo "<pre>" . wordwrap( $sentance, 10, "\n", true ) . "</pre>";
?>

Output will be like:

JohnCleese
: Have you
signed up
to my
monthly
email yet?
Youre
missing
outif you
havent!

http://aaa

aaaaaaaaaa
aaaaaaaaaa
aaaaaaaa.c
o.uk/

So clear now.
Thanks
mrphpguru
http://www.mrphpguru.com


Comparing Dates in PHP



Hi today i will discuss how to compare  two date using php. Actually i want the expire date must be less than today using php.

do simple step to compare 2 dates using php

First get today’s date in PHP $todays_date = date(“Y-m-d”);

Suppose expire date is $exp = “2002-01-16″; Continue reading this entry…



read html and extract data from a tag using php

read the html and extract data from a tag php or you can say Extract data from HTML tags using php

so here i am providing you a html script using that you can read the data from the remote site and perse the DOM and using the information of the site as required for your project.

First of all you need to use a Dom parser Simple HTML or similar please download: so please download DOM parser in PHP

The read the file into an dom object and parse it using the appropriate selectors:

for example you can use it like

$html = new simple_html_dom("http://www.oneanall.com");

foreach($html->find(.searchResult+regular) as $div) {
  //parse div contents here to extract name and address etc.
}
$html->clear();
unset($html);


how to add extra filed in user profile page





Adding Extra Fields to the WordPress User Profile or how to add extra filed in user profile page
WordPress offers some great options and function.There are some fileds in the user’s profile page where user can add info like bio but if admin want to provide more option or extra field to user than something write in code. today i am displaying or adding Extra Fields to the WordPress User Profile or how to add extra filed in user profile page Continue reading this entry…

how to call plugins in post

See here i am giving you an example to develop a wordpress plugins and calling it in post.Means creating a wordpress plugins and allowing option to use it in wordpress post.

  1. ShortCode API
    1. What is ShortCode API?

                         Shortcode API, a simple set of functions for creating macro codes for use in post content.

                          Example: [demo id=“1”]

                                    Is able to retrieve a demo record of ID 1 and embed the results into the post content Continue reading this entry…

Developing Plugins For WordPress

Developing Plugins For WordPress

  1. DEVELOPING PLUGINS FOR WORDPRESS
  2. Agenda
    1. Introduction
    2. Developing Plugin
    3. WP API: Filters/Hooks
    4. Plugin Path
    5. Plugin Details
    6. Inserting CSS/Javascript
    7. Modifying Content
    8. Translating Plugin Text To Other Languages
    9. Shortcode API
    10. Activating The Plugin
    11. WP-Polls, WP-PostRatings, WP-PostViews, WP-Print, WP-Email, WP-Useronline, etc
  3. Continue reading this entry…