Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter PremierDigital

    (@create-28)

    Thats strange, it’s still there when I add that code, anyway i’ve tried things a different way now where I dont need the page to reload.

    Im actually Jquery code to grab the favourite link titles from the page and add them to hide field values in your contact form 7 plugin. So the list of favourites is populated into the form hidden fields.

    Thanks for your help though. Not sure why it doesnt update the local storage for me. Instead of reloading page on removal i’ve made a button which opens the form and pulls in the updated favourites list into the form hidden fields.

    Regards,
    Paul

    Thread Starter PremierDigital

    (@create-28)

    I think the reload has to come straight after the data_set storage / local storage code so it actually removes it?

    Regards,
    Paul

    Thread Starter PremierDigital

    (@create-28)

    Hi, its the standard list, so by Default, when you remove an item it sets css display none and also removes the item from the users list. So if they refresh the page the item is not there.

    The problem is when i click remove item with this reload function, it hides it with css, then reloads the page but the item is still there when it’s reloaded. so its not updating the actual users list.

    I have used the code you sent like this below:

    However I think its the local storage not registering the item being removed?

    Regards,
    Paul

    
    my_promise.done( function() {
          found_posts_count_val = $('.ccc-favorite-post-count').find('.num').text();
          $('#'+ count_post).children('.found_posts').text(found_posts_count_val);
          var list_post_num = $('.'+ list_post).filter(':visible').length;
          $('#'+ count_post).children('.number').text(list_post_num);
    		setTimeout( function() {
    			window.location.reload(); // Add this code.
    		},600);
        });
      }
         /* if( Number( list_post_num ) < 1 ) {
            setTimeout( function() {
              data_set[CCC.favorite.storage_key()] = localStorage.getItem(CCC.favorite.storage_key()); // ローカルストレージから指定したキーの値を再取得
              data_set['looplength'] = null;
              ccc_my_favorite_list_ajax(); // お気に入りの投稿をリスト表示するためのAjax関数を呼び出し
     ? ? ?  },600);
          } /*
    
    	
        });
      } //endfunction

    `

    Thread Starter PremierDigital

    (@create-28)

    Hi, thats worked, but when it reloaded, it didn’t actually remove the item from the list, it was still there, would a timeout work or something?

    Regards,
    Paul

    Hi, no nothing at all. totally stuck. been trying to figure ways to use javascript yo copy into the form but can’t. im putting it out to people for custom development to see if someone can build this.

    I will let you know once I have something though

    I’m looking for the same setup as you, I havnt downloaded the plugin yet but with the share to email option (if it lets you collect all the selected posts of the wish list) then that button may be changed so when clicked it opens a pop up contact / enquiry form.

    I am going to try it this week as I’ve been searching for this exact feature for favouriting posts then capturing the info into a form that is then sent. I will let you know how I get on. I don’t want to edit the plug-in directly, so I will attempt to find a workaround solution

    Thread Starter PremierDigital

    (@create-28)

    Hi, it doesn’t matter now, I’ve solved it myself, simply by deleting this code below, lets users go into minus when placing orders.

    file is : /user-waller-credit-system/includes/gateway.php
    Delete:

    /** check to make sure the user has enough credit to make the purchase */
    if ($cart_total>$vw_balance)
    {
    wc_add_notice( __(‘Payment error:‘, ‘woothemes’) . ‘ Insufficient funds. Please purchase more credits or use a different payment method.’, ‘error’ );
    return;
    }

    Thread Starter PremierDigital

    (@create-28)

    Also an added bonus would be simple email notifications of user go’s into minus, urging them to top up account.

Viewing 8 replies - 1 through 8 (of 8 total)