Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Add to Wishlist Button for users not logged in #6480
    ozoneboy
    Participant

    Yes you’re right Michael but for me the wishlist is an important feature for my customers so I didn’t want to hide it. So for non-logged users I have the button linked to the account/wishlist page but it returns a message “You must be logged in to use your favourites list. Please use the tab at the top right of the page to login or register a new account.” It’s more user friendly to explain the situation than just send them to a register page.

    By the way, is adding the price to the wishlist still on your list of things to do?? I’ll buy you some beer if you do : )

    in reply to: Add to Wishlist Button for users not logged in #6477
    ozoneboy
    Participant

    I’ve done this by positioning the wishlist manually and changing the code to:

    <?php if( is_user_logged_in() ) {
       	echo wpsc_the_wishlist();
    } else {
    	echo '<button type="button" class="button"><a href="http://yoursite.com/products/your-account/?wishlist=true">Add to Wishlist</a>';	} ?>

    Just make the url point to your wishlist page which should prompt them to login, or you could make it a fancy popup message etc.

    in reply to: Issue with add-to-cart function #6475
    ozoneboy
    Participant

    Hi Michael, I’ve narrowed the problem down to being a conflict with Tribulant Software’s Newsletter plugin. I have their mailing list form widget in the sidebar below the cart widget. If you have any ideas as to how I should troubleshoot it let me know, otherwise I might just look at a different newsletter/subscriber option.

    in reply to: Disable "send to friend" doesn't work #6466
    ozoneboy
    Participant

    Thanks Michael, this is working perfectly now.

    in reply to: Wrong images on wish list url page #6450
    ozoneboy
    Participant

    I’ve just encountered this problem with 1.5.2 as well. Michael can you please advise if there’s a fix coming and a rough eta???

    in reply to: Can you add to cart from wishlist? #6460
    ozoneboy
    Participant

    Hi jessemarple,
    When you say “guest wishlist view” do you mean you’re not logged in? My wishlist links only appear if you’re logged into your account and I haven’t had any problems with refresh. I’ve included the full “table” code below in case that helps (note that I’ve renamed my wishlist as “Favourites” and replaced the remove text with a “X” graphic/button)

    <h2>Your Favourite Products</h2>
    
    <form action="<?php echo $wishlist_url; ?>" method="POST">
    	<table class="logdisplay">
    		<tr class="toprow">
    			<td style="width:52px;">&nbsp;</td>
    			<td>Product</td>
    			<td>Quantity</td>
    			<td>Add to Cart</td>
    			<td>Remove</td>
    <?php
    if( !$guest ) { ?>
    			<td>&nbsp;</td>
    <?php
    } ?>
    		</tr>
    <?php
    		foreach( $favourites_data as $favourite ) {
    			$favourite_name_sql = "SELECT <code>name</code> FROM <code>wp_wpsc_product_list</code> WHERE <code>id</code> = '".$favourite->product_id."'";
    			$favourite->name = $wpdb->get_var( $wpdb->prepare( $favourite_name_sql ) ); ?>
    		<tr class="product_row alt">
    			<td class="firstcol">
    <?php if( $guest && $favourite->quantity == '0' ) { ?>
    				<img src='<?php echo vl_wpscat_item_image($favourite->product_id,48,48); ?>' alt='<?php echo $favourite->name; ?>' title='<?php echo $favourite->name; ?>' />
    <?php } else { ?>
    				<a href="<?php echo wpsc_product_url( $favourite->product_id ); ?>">
    					<img src='<?php echo vl_wpscat_item_image($favourite->product_id,48,48); ?>' alt='<?php echo $favourite->name; ?>' title='<?php echo $favourite->name; ?>' />
    				</a>
    <?php } ?>
    			</td>
    			<td>
    <?php if( $guest && $favourite->quantity == '0' ) { ?>
    				<?php echo $favourite->name; ?>
    <?php } else { ?>
    				<a href="<?php echo wpsc_product_url( $favourite->product_id ); ?>"><?php echo $favourite->name; ?></a>
    <?php } ?>
    			</td>
    <?php if( $guest ) { ?>
    			<td>
    				<?php if( $favourite->quantity == '0' ) { echo '-'; } else { echo $favourite->quantity; } ?>
    			</td>
    <?php } else { ?>
    			<td nowrap>
    				<form action="<?php echo $wishlist_url; ?>" method="POST">
    					<input type="text" name="quantity" value="<?php echo $favourite->quantity; ?>" size="3" />
    					<input type="hidden" name="wpsc_action" value="update" />
    					<input type="hidden" name="wpsc_id" value="<?php echo $favourite->id; ?>" />
    					<td><?php echo wpsc_add_to_cart_button($favourite->product_id); ?>	</td>
    				</form>
    			</td>
    
    			<td>
    			</td>
    
    			<td>
    				<form action="<?php echo $wishlist_url; ?>" method="POST">
    					<input type="submit" value="x" class="button sendbutton" />
    					<input type="hidden" name="wpsc_action" value="delete" />
    					<input type="hidden" name="wpsc_id" value="<?php echo $favourite->id; ?>" />
    				</form>
    			</td>
    <?php
    			} ?>
    		</tr>
    <?php
    		} ?>
    	</table>
    in reply to: Can you add to cart from wishlist? #6457
    ozoneboy
    Participant

    FYI: I managed to create an add-to-cart function by inserting the add-to-cart shortcode with product-id to the end of this form action:

    <form action="<?php echo $wishlist_url; ?>" method="POST">
    		<input type="text" name="quantity" value="<?php echo $favourite->quantity; ?>" size="3" />
    		<input type="hidden" name="wpsc_action" value="update" />
    		<input type="hidden" name="wpsc_id" value="<?php echo $favourite->id; ?>" />
    		<td><?php echo wpsc_add_to_cart_button($favourite->product_id); ?></td>
    		</form>
Viewing 7 posts - 1 through 7 (of 7 total)