Remove the page linking that occurs in the shopping cart

Hello, i would like to remove the linking that occurs in the shopping cart that takes the user to the product's page if they click the physical name of the product.

I believe i found the in the theme-functions.php; but it didnt help much when i changed it (or i didnt change it correctly). Is it also possible to remove the link that is attached to the image of the product in the shopping cart?

If it is possible to connect the lightbox feature to the image icon in the shopping cart? This way it opens a bigger version of the image instead of the link to the product's page.

Thank you WPMUDev team! Talk soon

  • Vinod Dalvi
    • WP Unicorn

    Hi @ACF Global,

    Welcome to the WPMU Dev community and thank you for your question.

    You can achieve this by using the following filters

    function mp_custom_product_url_display_in_cart(){
    	return '';
    }
    add_filter( 'mp_product_url_display_in_cart', 'mp_custom_product_url_display_in_cart');
    
    function _mp_custom_cart_table($content){
    	// Write code to remove URLs from the shopping cart table content and add lightbox
    	return $content;
    }
    add_filter( '_mp_cart_table', '_mp_custom_cart_table');
    
    function mp_custom_product_image($image){
    	// Write code to remove URLs from the shopping cart table content and add lightbox
    	return $image;
    }
    add_filter( 'mp_product_image', 'mp_custom_product_image');

    Or by overwriting and changing the functions _mp_cart_table and mp_product_image from MarketPress plugin file marketpress/marketpress-includes/template-functions.php by adding it in the functions.php file of your child theme or add it in your site using the following plugin.

    http://wordpress.org/plugins/code-snippets/

    You can use any of the following light box plugins to achieve the Lightbox effect.

    http://wordpress.org/plugins/simple-lightbox/
    http://wordpress.org/plugins/responsive-lightbox/
    https://wordpress.org/plugins/wp-lightbox-2/

    Cheers,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.