Category issue with custom feed

AbbasAbbas Member Posts: 65

Hi,

We have a custom facebook feed that is banding all of a products categories into one big long category.

This makes it impossible to target a products specific category with an ad and we need to somehow figure out a way to alter this code to allow us to set or direct to a certain products category not necessarily the 1st one.

This is the part of the code that deals with the category loop

         {% endfor %}

        {% endif %} 

        <g:product_type>

         <![CDATA[

         {% if product.categories %}

          {% for category in product.categories| limit(1) %}

          {{ category.title }} {% if category.subs|length > 0 %}

           {% for subcategory in category.subs | limit(2) %} > {{ subcategory.title }}       

           {% if subcategory.subs|length > 0 %}

            {% for subsubcategory in subcategory.subs %}

            > {{ subsubcategory.title }}

            {% endfor %}

In the feed it just creates a big long list of categories - One > Two etc

Thankyou in advance for any advice

Sign In or Register to comment.