How to add coupon codes and discounts in magento

If you want to know how to add coupon codes and discounts in magento store, please follow the instruction below:

First set up your rule information in Magento. Log in to your admin and go to Promotions>Shopping Cart Price Rules:

Select Add New Rule and enter a rule name and description.Then select Yes for Enabled. Continue reading

Disabling Magento Demo Store notice

On the development phase of magento will will see something like “Any orders placed through this store will not be honored or fulfilled.” thats magento’s demo store notice. Here we are discussing on disabling Magento Demo Store notice
To disable it, log into your Magento admin panel and go to the
System > Configuration > Design option
in the left menu HTML Head. At the bottom of this section you will see the option Display Demo Store Notice. Set this to No and click Save Config. The demo notice will be removed and you will be able to start accepting orders.
Hope this helps for Disabling Magento Demo Store notice

Multiple file uploader using php html and jQuery

In this post we are discussing about Multiple file uploader using php html and jQuery. we can upload multiple files by just using php, html and jQuery.

First, let’s create the html form and add two “buttons” that will be used for adding or removing an uploading field from the form.

<span class="add_field">+</span>
<span class="remove_field">-</span>
 
<form action="upload.php" method="POST" enctype="multipart/form-data">
    <div class="input_holder">
        <input type="file" name="uploaded_files[]" id="input_clone"/>
    </div>
    <input type="submit" value="upload_files" />
</form>

The span elements will be out add/remove buttons so we’ll add a listener to them to know when someone want to add or remove a field from the form.

And add the jQuery as shown below

<script type="text/javascript">
 $(function(){
        $('.add_field').click(function(){
     
            var input = $('#input_clone');
            var clone = input.clone(true);
            clone.removeAttr ('id');
            clone.val('');
            clone.appendTo('.input_holder'); 
         
        });
 
        $('.remove_field').click(function(){
         
            if($('.input_holder input:last-child').attr('id') != 'input_clone'){
                  $('.input_holder input:last-child').remove();
            }
         
        });
})
 
</script>

And have to handle the files uploaded using php

<?php
if(isset($_FILES ['uploaded_files']))
{
     foreach($_FILES['uploaded_files']['name'] as $key=>$value)
     {
          if(is_uploaded_file($_FILES['uploaded_files']['tmp_name'][$key]) && $_FILES[['uploaded_files']['error'][$key] == 0)
          {
                $filename = $_FILES['uploaded_files']['name'][$key];
                $filename = time().rand(0,999).$filename;
                             
                if(move_uploaded_file($_FILES['uploaded_files']['tmp_name'][$key], 'uploads/'. $filename))
                {
                      echo 'The file '. $_FILES['uploaded_files']['name'][$key].' was uploaded successful';
                }
                else
                {
                      echo 'There was a problem uploading the picture.';
                } 
          }
          else
          {
            echo 'There is a problem with the uploading system.';
          }
     }
}
?>

So that’s it we are just created a Multiple file uploader using php html and jQuery

Get meta data from wp_options table

In wordpress wp_options table, option_values are(some values) saved as serialized.So directly we can’t get those values.
Now i’ll tell you easy method to get meta data from wp_options table.

I want to get option name – ” tax_meta_25 “, values.
Values like this.(i want to get values corresponding to ba_pm3 )
Continue reading