Saturday 20 January 2018

some projects with website url details





Other Projects :

1.Redhillfresh.com.au/
2. http://staineaters.com.au/
3. http://aussieiconsonline.com.au/
4. http://workslocal.com.au/
5. albasir.in
6. axtturbo.com.au
7. b-at-home.com.au
8. graffitieaters.com.au
9. memorykeepsake.com.au
10.i-imagine.com.au
11.wallpapers.com.au
12.http://goldkeyinsurance.co.in/
13.http://www.mammalena.info/
14. http://hillcrestfarmmarket.com/
15. http://beckyfox.com
16. http://www.swimava.com/
17. https://revyrealty.com/
18. http://www.kelownamartialarts.com/
19. http://www.thepondsbellevue.ca/
20. http://siciliana.it/sicilywine/
21. http://www.talkingimage.co.uk/
22. http://www.cuttingedgeconcepts.ca/
23. http://www.kellyobryans.com/
24. http://www.skiwest.ca/
25. http://www.thecreekskelowna.ca/
26.http://www.missiongroup.ca/
27. http://bettselectric.com/
28. http://www.sports-ville.in/
29. http://outlawsonline.com/
30 . http://christianprisonpenpals.org/

Friday 11 December 2015

count down timer javascript

<span id="countdown" class="timer"></span>
<?php
     
       $days_to_event = get_post_meta( get_the_ID(), 'days_to_event', true );  // days fetched from custom fields
        
       $final = $days_to_event*24*60*60;       
 
?>
<script>
var upgradeTime = <?php echo $final; ?>;
var seconds = upgradeTime;
function timer() {
    var days        = Math.floor(seconds/24/60/60);
    var hoursLeft   = Math.floor((seconds) - (days*86400));
    var hours       = Math.floor(hoursLeft/3600);
    var minutesLeft = Math.floor((hoursLeft) - (hours*3600));
    var minutes     = Math.floor(minutesLeft/60);
    var remainingSeconds = seconds % 60;
    if (remainingSeconds < 10) {
        remainingSeconds = "0" + remainingSeconds;
    }
    document.getElementById('countdown').innerHTML = days + "Days:" + hours + "Hours:" + minutes + "Minutes:" + remainingSeconds;
    if (seconds == 0) {
        clearInterval(countdownTimer);
        document.getElementById('countdown').innerHTML = "Completed";
    } else {
        seconds--;
    }
}
var countdownTimer = setInterval('timer()', 1000);
</script>

Thursday 10 December 2015

woocommerce add to cart button for product variations

//new code added here

function find_valid_variations() {
    global $product;

    $variations = $product->get_available_variations();
    $attributes = $product->get_attributes();
    $new_variants = array();

    // Loop through all variations
    foreach( $variations as $variation ) {

        // Peruse the attributes.

        // 1. If both are explicitly set, this is a valid variation
        // 2. If one is not set, that means any, and we must 'create' the rest.

        $valid = true; // so far
        foreach( $attributes as $slug => $args ) {
            if( array_key_exists("attribute_$slug", $variation['attributes']) && !empty($variation['attributes']["attribute_$slug"]) ) {
                // Exists

            } else {
                // Not exists, create
                $valid = false; // it contains 'anys'
                // loop through all options for the 'ANY' attribute, and add each
                foreach( explode( '|', $attributes[$slug]['value']) as $attribute ) {
                    $attribute = trim( $attribute );
                    $new_variant = $variation;
                    $new_variant['attributes']["attribute_$slug"] = $attribute;
                    $new_variants[] = $new_variant;
                }

            }
        }

        // This contains ALL set attributes, and is itself a 'valid' variation.
        if( $valid )
            $new_variants[] = $variation;

    }

    return $new_variants;
}






function woocommerce_variable_add_to_cart(){
    global $product, $post;

    $variations = find_valid_variations();

    // Check if the special 'price_grid' meta is set, if it is, load the default template:
    if ( get_post_meta($post->ID, 'price_grid', true) ) {
        // Enqueue variation scripts
        wp_enqueue_script( 'wc-add-to-cart-variation' );

        // Load the template
        wc_get_template( 'single-product/add-to-cart/variable.php', array(
                'available_variations'  => $product->get_available_variations(),
                'attributes'            => $product->get_variation_attributes(),
                'selected_attributes'   => $product->get_variation_default_attributes()
            ) );
        return;
    }

    // Cool, lets do our own template!
    ?>
    <table class="variations variations-grid" cellspacing="0">
        <tbody>
            <?php
            foreach ($variations as $key => $value) {
                if( !$value['variation_is_visible'] ) continue;
            ?>
            <tr>
                <td>
                    <?php foreach($value['attributes'] as $key => $val ) {
                        $val = str_replace(array('-','_'), ' ', $val);
                        printf( '<span class="attr attr-%s">%s</span>', $key, ucwords($val) );
                    } ?>
                </td>
                <td>
                    <?php echo $value['price_html'];?>
                </td>
                <td>
                    <?php if( $value['is_in_stock'] ) { ?>
                    <form class="cart" action="<?php echo esc_url( $product->add_to_cart_url() ); ?>" method="post" enctype='multipart/form-data'>
                        <?php woocommerce_quantity_input(); ?>
                        <?php
                        if(!empty($value['attributes'])){
                            foreach ($value['attributes'] as $attr_key => $attr_value) {
                            ?>
                            <input type="hidden" name="<?php echo $attr_key?>" value="<?php echo $attr_value?>">
                            <?php
                            }
                        }
                        ?>
                        <button type="submit" class="single_add_to_cart_button btn btn-primary"><span class="glyphicon glyphicon-tag"></span> Add to cart</button>
                        <input type="hidden" name="variation_id" value="<?php echo $value['variation_id']?>" />
                        <input type="hidden" name="product_id" value="<?php echo esc_attr( $post->ID ); ?>" />
                        <input type="hidden" name="add-to-cart" value="<?php echo esc_attr( $post->ID ); ?>" />
                    </form>
                    <?php } else { ?>
                        <p class="stock out-of-stock"><?php _e( 'This product is currently out of stock and unavailable.', 'woocommerce' ); ?></p>
                    <?php } ?>
                </td>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php
}

add custom field in products page

http://www.themelocation.com/how-to-display-custom-field-value-on-product-page-in-woocommerce/

show all posts in one page code template

<?php
/**
 * Template Name: All Blog Page
 */

get_header(); ?>
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margbtm">
        <?php
            query_posts( 'cat=1' );
            while ( have_posts() ) : the_post();?>
           
            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
                    <img class="video" <?php the_post_thumbnail('medium');?>
                <h4 class="title">
                          <a href="<?php the_permalink(); ?>"><?php the_title();?></a>
                </h4>
                    <h4 class="title"><?php the_content();?></h4>
            </div>
          <?php endwhile; ?>
        <?php wp_reset_query();?>
</div>
</div>
</div>
<?php get_footer(); ?>

Tuesday 17 November 2015

PDF button for a non-public web page

just put this script one button will be generated for password protected pages use this one.
<a href="//FreeHTMLtoPDF.com/?convert&iconsize=32&localhtml=1&formdata=1"><img src="//FreeHTMLtoPDF.com/images/apiicon_32.png" /></a><script type="text/javascript" src="//FreeHTMLtoPDF.com/scripts/api.js" />


link - http://freehtmltopdf.com/