Announcement

Collapse
No announcement yet.

Custom Category Field Display on ReadyTheme Product Listings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matt Zimmermann
    replied
    If the custom field you are trying to pull is product_list_category and you have it selected in your product list settings, you should be able to use this code:
    Code:
    <mvt:foreach iterator="product" array="readytheme:products">
        <a class="u-block x-product-list__link" href="&mvt:product:link;" title="Shop &mvt:product:customfield_values:customfields:product_list_category;">
            <img class="x-product-list__image" src="&mvte:product:imagetypes:main;" alt="Shop &mvt:product:customfield_values:customfields:product_list_category;">
        </a>
        <a style="text-align:center;" class="u-block x-product-list__link" href="&mvt:product:link;" title="Shop &mvt:product:customfield_values:customfields:product_list_category;"><b>&mvt:product:customfield_values:customfields:product_list_category;</b></a>
    </mvt:foreach>

    Leave a comment:


  • Custom Category Field Display on ReadyTheme Product Listings

    I have Readytheme product listings that I want to use a custom field to display the Category Name. I cannot figure out how to just grab the value of the custom field. I am basically just displaying 1 product blocks for sub categories at the top of the category page and to tighten it up I want to shorten the Category name so it looks cleaner for this display purpose. Any help would be appreciated.
    Code:
        <mvt:foreach iterator="product" array="readytheme:products">
            <a class="u-block x-product-list__link" href="&mvt:canonical_uri:uri;" title="Shop &mvt:product_list_category:name;">
                    <img class="x-product-list__image" src="&mvte:product:imagetypes:main;" alt="Shop &mvt:product_list_category:name;">
    
                </a>
    <a style="text-align:center;" class="u-block x-product-list__link" href="&mvt:canonical_uri:uri;" title="Shop &mvt:product_list_category:name;"><b>&mvt:product_list_category:name;</b></a>
    
        </mvt:foreach>
Working...
X