Inserting a Custom Product Field into your Product Title

April 11, 2009

This article shows how to create a Miva Merchant conditional that will check to see if there is any data in specific custom product field. If there is data in the custom product field then the product title will display the data in that custom field. If there is not input in the custom product field then the default product name will be used for the product title.

  1. Create a custom product field with the code ‘title’ and the name ‘Title’.  Instructions
  2. Open the ‘Product Display’ page
  3. Replace this code near the beginning of the template
  4. <title>&mvt:store:name;: &mvt:product:name;</title>
    with this code:

    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:title">
    <title>&mvt:product:customfield_values:customfields:title;</title>
    <mvt:else>
    <title>&mvt:product:name;</title>

    </mvt:if>

    Custom Field Title Miva Merchant

    Custom Field Title Miva Merchant

  5. Click Update
  6. Click the ‘Product Display Layout’ tab

    Custom Field Title Miva Merchant

    Custom Field Title Miva Merchant

  7. Check the box next to ‘Title’ and click ‘Update’.
  8. Edit a product and click the ‘Custom Fields’
  9. Type whatever you would like to show up for the title for that product

    Custom Field Title Miva Merchant

    Custom Field Title Miva Merchant

  10. Click ‘Update’
  11. Test that product

posted in How To by admin

Follow comments via the RSS Feed| Trackback URL

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org