Support » Plugin: WooCommerce » Remove & Edit Woocommerce Product Link to Detail Page

  • mansoorf

    (@mansoorf)



    Hi Guys
    Thanks For The BEST WordPress Commerce Plugin.
    I Have WooCommerce 2.6.11 On WordPress 4.6.1
    I Want to Remove the link (to product detail) from Products Image & Product Title.
    In Addition, I want to Put the Add-to-cart URL on the ABOVE Links…

    Can anyone help me do this ?
    Thank You
    Kind Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support RK

    (@riaanknoetze)

    You’ll need some custom code to achieve that – there’s no default option for that in the WooCommerce settings as it’s mostly controlled by creating custom templates. It’s quite technical and it might be worthwhile getting in touch with a web developer about that.

    That said, here’s a guide that should serve as a good foundation: https://docs.woocommerce.com/document/template-structure/

    mansoorf

    (@mansoorf)

    Dear Riaan, Hi
    Thanks for the Response
    I’m ok with developing process and I make some changes in woocommerce styling and customizing some forms.
    but I have some problem in fetching the Product>id add-to-cart URL and use it in the tag to change for all the products in catalog mode.
    Just Please Help me to Find the add-to-cart (code) url and the address of catalog mode files to set the url into the and <title> of the PRODUCT.

    thanks 😉

    lorro

    (@lorro)

    Some php skills will be needed. Start by removing the default open link action with:

    remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
    

    then put your own in:

    add_action( 'woocommerce_before_shop_loop_item', 'my_loop_open', 10);
    function my_loop_open() {
      $cart_link = 'http://www.my-domain-goes-here.com/shop/cart/?add-to-cart='.get_the_ID();
      echo '<a href="' . $cart_link . '" class="woocommerce-LoopProduct-link">';
    }
    

    The code goes in functions.php for your child theme.

    It will only work for simple products since it bypasses the product page where variations can be selected.

    It works for Storefront but for some themes the priority parameters or approach may need changing.

    mansoorf

    (@mansoorf)

    Thanks Dear Lorro
    is it the true code or guide me to the right code ?

    lorro

    (@lorro)

    It worked for me but your theme may be different.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove & Edit Woocommerce Product Link to Detail Page’ is closed to new replies.