I'm building a sales portfolio for an artist using

I'm building a sales portfolio for an artist using MarketPress. Is there any way to keep items active on a category page but mark them as sold, e.g., remove the Add to Cart button if the price is $0.0 or something like that? Here is an example of the page I am building.
http://helenhiebertstudio.com/products/100-x-100-paper-weavings/

I know I could use shortcodes and tables to display / not display the cart buttons but I don't think my client can self manage that so I'm hoping to create it with category pages.

Thanks for your continued support as I adapt MarketPress to my client's needs.

  • Ash

    That's cool.

    Please go to /plugins/marketpress/marketpress-includes/template-functions.php line no 1890 to 1914 and replace with the following:

    $meta = get_post_custom($post_id);
                $p = maybe_unserialize($meta['mp_price'][0]);
                if($p[0] != 0)
                {
                    if ($context == 'list') {
                        if ($variation_select) {
                            $button .= '<a class=&quot;mp_link_buynow&quot; href=&quot;' . get_permalink($post_id) . '&quot;>' . __('Choose Option &raquo;', 'mp') . '</a>';
                        } else if ($mp->get_setting('list_button_type') == 'addcart') {
                            $button .= '<input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;mp-update-cart&quot; />';
                            $button .= '<input class=&quot;mp_button_addcart&quot; type=&quot;submit&quot; name=&quot;addcart&quot; value=&quot;' . __('Add To Cart &raquo;', 'mp') . '&quot; />';
                        } else if ($mp->get_setting('list_button_type') == 'buynow') {
                            $button .= '<input class=&quot;mp_button_buynow&quot; type=&quot;submit&quot; name=&quot;buynow&quot; value=&quot;' . __('Buy Now &raquo;', 'mp') . '&quot; />';
                        }
                    } else {
    
                        $button .= $variation_select;
    
                        //add quantity field if not downloadable
                        if ($mp->get_setting('show_quantity') && empty($meta[&quot;mp_file&quot;])) {
                            $button .= '<span class=&quot;mp_quantity&quot;><label>' . __('Quantity:', 'mp') . ' <input class=&quot;mp_quantity_field&quot; type=&quot;text&quot; size=&quot;1&quot; name=&quot;quantity&quot; value=&quot;1&quot; /></label></span>&nbsp;';
                        }
    
                        if ($mp->get_setting('product_button_type') == 'addcart') {
                            $button .= '<input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;mp-update-cart&quot; />';
                            $button .= '<input class=&quot;mp_button_addcart&quot; type=&quot;submit&quot; name=&quot;addcart&quot; value=&quot;' . __('Add To Cart &raquo;', 'mp') . '&quot; />';
                        } else if ($mp->get_setting('product_button_type') == 'buynow') {
                            $button .= '<input class=&quot;mp_button_buynow&quot; type=&quot;submit&quot; name=&quot;buynow&quot; value=&quot;' . __('Buy Now &raquo;', 'mp') . '&quot; />';
                        }
                    }
                }

    Please let me know if it is helpful and feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.