• Resolved johnfeaver

    (@johnfeaver)


    I have created three custom fields for my songs in Music Store: Provenance, Season, and Instrumentation. How can I add filters for those on the Product Page?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @johnfeaver

    Assuming you have the season custom field (the season is the custom field’s name, not its label) and want to display it on the product songs pages.

    Visit the “Music Store > Products Templates” menu option, tick the “Using custom templates” checkbox, and finally, enter the following piece of code into the “Template used by songs pages”:

    <tpl ifset="season">
    <div><b>Season: </b> {season}</div>
    </tpl ifset="season">

    Best regards.

    Thread Starter johnfeaver

    (@johnfeaver)

    Hmmm, this made some difference, in that the song detail page now displays the NAME of the custom field if it is set, but NOT the value of that field. Also, my real goal is to be able to filter on various values of those fields on the product list page.

    Plugin Author codepeople

    (@codepeople)

    Hello @johnfeaver

    The custom fields are only for visualization. The plugin does not use them for filtering.

    Could you please provide the link to the product that includes the custom fields and indicate your modifications in the song template?

    Best regards.

    Thread Starter johnfeaver

    (@johnfeaver)

    https://feavers.net/?ms_song=aberystwyth&_msr=1701812387

            </div>
            </tpl ifset="song.has_albums">
            <tpl ifset="season">

    Season: {season}

    Provenance: {provenance}

    Instrumentation: {instrumentation}

    (above was copied from MS, then pasted into Notepad and copied from there, pasted here. What is the correct way to do this?)

    Thread Starter johnfeaver

    (@johnfeaver)

    Plugin Author codepeople

    (@codepeople)

    Hello @johnfeaver

    The fields’ names are case-sensitive. If the names (not the labels) of the custom fields are season, provenance, and instrumentation, the correct would be to use them in lowercase.

    
    <tpl ifset="season">
    <div><b>Season: </b> {season}</div>
    </tpl ifset="season">
    <tpl ifset="provenance">
    <div><b>Provenance: </b> {provenance}</div>
    </tpl ifset="provenance">
    <tpl ifset="instrumentation">
    <div><b>Instrumentation: </b> {instrumentation}</div>
    </tpl ifset="instrumentation">
    

    Concerning the PDF file visualization in the iPhone, it is not controlled by the plugin. Please read the Safari mobile documentation. Safari mobile displays partial PDF files from the web.

    Best regards.

    Thread Starter johnfeaver

    (@johnfeaver)

    What’s the difference between the name and the label of a custom field? By “label” do you mean the value? In any case, the case sensitivity was the key. Thanks!

    Plugin Author codepeople

    (@codepeople)

    Hello @johnfeaver

    When you create a custom field, it will be displayed in the interface of posts’ settings with a readable label, but it has an internal name.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how to filter by custom field in Music Store’ is closed to new replies.