• Resolved rashmirai

    (@rashmirai)


    hi i am trying to add a button “quick view” to each product thumbnail in my shop page which redirects to the product page. like if someone clicks to the quick view button it would redirect to the current product page. can anyone help me with this??
    below is the button which i want to add a link to the product page–

    <button class="title overtext"> Quick View </button>

    thanks

    https://wordpress.org/plugins/woocommerce/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter rashmirai

    (@rashmirai)

    also i am trying to add an icon on the product thumbnail which would add the product to the cart and using the below code:

    <a href="?add-to-cart=<?php echo $products->ID; ?>"> <div class="cart-bag"></div></a>

    but instead of adding items to cart it redirects to the home page.

    please help!

    Thread Starter rashmirai

    (@rashmirai)

    please help 🙁

    Thread Starter rashmirai

    (@rashmirai)

    got it!

    for product details page i added the link:
    <?php echo '<a href="'.get_permalink($product_id).'"> <?php echo $product_obj-><button class="title overtext">view details</button></a>'; ?>

    for add to cart icon on my product thumbnail added:

    <?php global $product;
    
    echo apply_filters( 'woocommerce_loop_add_to_cart_link',
    	sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="%s"><strong><div class="cart-bag">..</div></a>',</strong>
    		esc_url( $product->add_to_cart_url() ),
    		esc_attr( isset( $quantity ) ? $quantity : 1 ),
    		esc_attr( $product->id ),
    		esc_attr( $product->get_sku() ),
    		esc_attr( isset( $class ) ? $class : 'button' ),
    		esc_html( $product->add_to_cart_text() )
    	),
    $product );?>
    Thread Starter rashmirai

    (@rashmirai)

    solved 🙂

    Is it possible to add an option in admin panel to set some link to my Zoomify Gallery for each product that will be shown only for registered users ???
    The Zoomify gallery will be hosted within the same e-commerce domain. Therefore, it will be not an external link, just a “custom” link to a private website area. In fact, my request would investigate the way to create a registered-user reserved link to link my HD Zoomify gallery

    Thanks a lot

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom link to single product page in woocommerce’ is closed to new replies.