• I’m creating a catalog for a museum collection, and UPCP seems like an excellent platform for it. However none of the items in my catalog have prices – they are not for sale. I bought Premium, so can leave prices off a custom product page. Two questions:

    1) Can I remove Price from the catalog sort, and just have Name Ascending & Descending?

    2) Is there an easy way to remove price (and some other fields) from the Product Form?

    I could probably do 2) with custom CSS, not sure about 1). I haven’t found any documentation for hooks or filters for customization. Obviously I’m trying to avoid hacking your code if I don’t have to.

    Ideas? Others may find UPCP useful for cataloging items not for sale, so maybe I should request a “no prices” option for catalogs that aren’t for selling stuff.

    Great plug-in. Thanks for any help.

    PS – I just answered 1) – there’s an option in Product Sorting.

    PS2 – I wish there were separate classes for the div.form-fields inside form#add-tag. Would make 2) easy.

    • This topic was modified 8 years, 10 months ago by carrjones. Reason: Answered part of my own question
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi carr,

    1) Glad you found the answer!

    2) By product form, do you mean where you create a new product in the admin? If so, then it would be possible with CSS. Something like:

    .form-field:nth-of-type(4) {
    display: none;
    }
    

    I’m not sure where you’d want to put this CSS, though. If you put it in one of the plugin files, it will get overwritten when you update. If you’re using a child theme, you could try putting it there. Or perhaps there’s a plugin that allows you to write additional CSS that will only be used in the admin.

    Thread Starter carrjones

    (@carrjones)

    Brilliant! First time I’ve found a use for nth-of-type().
    I had to add #Products so it would only affect that tab, and also had to inject it into the admin head using:

    add_action(‘admin_head’, ‘admin_css_overrides’);
    function admin_css_overrides() {
    echo ‘<link rel=”stylesheet” type=”text/css”
    href=”‘.get_stylesheet_directory_uri().’/myupcp.css”/>’;
    }`

    I do think it would be useful to add separate classes to the fields in some future version. If for example you add a new field to the New Product form, this will break.

    I also think UPCP is a great platform for non-sales catalogs, so having an easy “no prices” option might increase the user base.

    Thanks for the help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Products without prices’ is closed to new replies.