• Hello,

    i have a plugin and want to activate this function:
    // href=” echo get_ permalink(get_option(‘jigoshop_myaccount_page_id’)); “>Log in to Add to Wish List

    It doesnt appear on my page yet, but I want it to disply “Log in to Add to Wish List”, but I dont know how to. This is the whole code snippet where this part is embedded:

    function jwl_addToWishListButton( $post, $_product ){
    	global $user_ID, $jwlOptions;
    
    	if( $user_ID ){
    		$list = new jwl_wishlist( $user_ID , 'user_id', false );
    	?>
    	<form method="POST" action="" class="jwl-wishlist" >
    		<input type="hidden" name="jwl_product_id" value="<?php echo $post->ID; ?>" />
    		<input type="hidden" name="jwl_user_id" value="<?php echo $user_ID; ?>" />
    		<input type="hidden" name="jwl_list_id" value="<?php echo $list->id ; ?> " />		
    
    		<!-- Nonce -->
    		<?php wp_nonce_field( 'add-remove-wishlist-item', 'jwl_addremove_nonce', false); ?>
    
    		<?php if( !$list->item_exists( $post->ID ) ): ?>
    		<input type="submit" name="jwl_addToWishList" class="<?php echo $jwlOptions->op( 'add-to-cart-class' ); ?>" value="<?php _e( $jwlOptions->op( 'add-to-wishlist-button-text' ) , 'jigowishlist' ); ?>" />
    		<?php elseif( $jwlOptions->op( 'show-remove-button' ) ): ?>
    		<input type="submit" name="jwl_removeFromWishList" class="<?php echo $jwlOptions->op( 'add-to-cart-class' ); ?>" value="<?php _e( $jwlOptions->op( 'remove-from-wishlist-button-text' ) , 'jigowishlist' ); ?>" />
    		<?php endif; ?>
    		</form>
    	<?php
    	}
    	//  href=" echo get_ permalink(get_option('jigoshop_myaccount_page_id')); ">Log in to Add to Wish List
    
    }

    If anybody has an idea what to change or add I’d be so happy. Thank you!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    This line is all messed up. The best I can make of it should be this:
    ?><a href="<?php echo get_ permalink(get_option('jigoshop_myaccount_page_id')); ?>">Log in to Add to Wish List</a>

    This may still not be right since I don’t know if the preceding is really correct or what comes next. Best to repost your code from </form> on to the next couple lines beyond, this time between backticks.

Viewing 1 replies (of 1 total)
  • The topic ‘How to activate this function?’ is closed to new replies.