Posts

Showing posts from February, 2015

How to use multiple plupload instance in a single form or single page

Today one of my client need a multiple upload options in a single form using a plupload , but didnt find best solution about that, So for other friend who need to same functionality i share my code with you, Here is a sample code for how to use a plupload multiple instance in single form or single page, you just need to create a unique container and a unique button for all instance, <div id="upload-container">   <div id="upload-container-1">     <div id="aaiu-upload-imagelist-1">       <ul id="aaiu-ul-list-1" class="aaiu-upload-list">       </ul>     </div>     <div id="imagelist-1" class="" data-source="<?php echo $edit_id; ?>"> </div>     <a id="upload-button-1" class="aaiu_button" href="#">Click here to add photographs</a>     <input type="hidden" name="uploader1_attachid...

How to update product variation in cart-review page in woocommerce , wordpress

Today i was searched for how to update cart product's  variation on cart-review page and checkout page, after searching a lot didnt get any best solution so i made this script for me.. you need to call your action after all cart page or checkout page request call , so i setted 99 as third parameter in add_action ; below is example code which i made for my client site add_action('init','update_cart_product_rj_funciton',99);  function update_cart_product_rj_funciton() {         global $wpdb,$woocommerce;         if(isset($_REQUEST['cart_update_variation']) && wp_verify_nonce($_REQUEST['cart_update_variation'],'cart_item_variation_update'))     {                 if($_REQUEST['product_id']!='' && $_REQUEST['cart_id']!='')         {             $cart_pro_key = '';             ...