Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jwoertz

    (@jwoertz)

    Anybody? I need my customers to be able to see the custom fields and stock levels.

    is0ph

    (@is0ph)

    You can edit the tcp-single-product.php file to display custom fields content.
    Copy it from the themes-templates folder found in the thecartpress plug-in folder to your site’s theme folder, then edit that version.

    Use code similar to the following to display a custom field content, replacing keyOfCustomField with the actual key of your field :

    if (get_post_meta( get_the_ID() , ‘keyOfCustomField’, true )){
    echo get_post_meta( get_the_ID() , ‘keyOfCustomField’, true );
    }

    As for the stock, check the page http://thecartpress.com/docs/developer-docs/api-template-tags/function-tcp-get-the-stock/ and use that function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show Quantity Available and Custom Fields to Customer in Product’ is closed to new replies.