August 25, 2015

Magento Please enter a valid URL. Protocol is required (http://, https:// or ftp://)



Please follow the below step for SOLUTION:

1. Open \app\design\install\default\default\template\install\config.phtml

2. Find the textbox where the base url is entered. It will be around line no 85 with name ‘config[unsecure_base_url]‘

3. Remove ‘validate-url’ from its class and save the file.



4. Now you can continue follow the installation.

Enjoy!

How to display Indian Rs. symbol in Magento?




Please follow the below step:

1. Add below code in root.xml

path of file: lib/Zend/Locale/Data/root.xml

Open root.xml file and find below code in that file

<currency type=”INR”>

replace next line with this below code

<symbol>Rs. </symbol>

Enjoy!

August 16, 2015

javascript validation for radio button in php.

<input type='radio' class='w1' name='w1' value='1'>1<br>
<input type='radio' class='w1' name='w1' value='2'>2<br>
<input type='radio' class='w1' name='w1' value='3'>3<br>

<script>
if ( $(':radio[class=w1]').attr('checked') != 'checked' ) {
    alert('Radio not checked');
}
</script>

Enjoy!

php how to get all files name from folder?


<?php
$insArr=array();
if ($handle = opendir('here is folder path name')) {
while (false !== ($file = readdir($handle)))
{
echo $file;
echo '<br>';
}
closedir($handle);}
?>

Its display name of all file/images from specific folder/directory,

Just change the folder/directory name what ever you want, and if you want any help then comment here!

Enjoy!

August 4, 2015

How to reorder billing fields in WooCommerce Checkout template?


Yes its possible using the some change in functions.php file,

Please do the following some change in woocommerce_form_field() function,


There is one below function:

<?php foreach ($checkout->checkout_fields['billing'] as $key => $field) : ?>
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
<?php endforeach; ?>

Please replace with this:

<?php
$mybillingfields=array(
    "billing_first_name",
    "billing_last_name",
    "billing_company",
    "billing_address_1",
    "billing_address_2",
    "billing_city",
    "billing_state",
    "billing_postcode",
    "billing_country",
    "billing_email",
    "billing_phone",
);
foreach ($mybillingfields as $key) : ?>
<?php woocommerce_form_field( $key, $checkout->checkout_fields['billing'][$key], $checkout->get_value( $key ) ); ?>
<?php endforeach; ?>

You can change position of each fields what ever you want.

Enjoy!

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...