Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Aniela on "How to activate this function?"

$
0
0

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 all articles
Browse latest Browse all 8245

Trending Articles