You can set a limit on the number of open ads per user group.
If the user has reached this limit, currently, it just hides the "Post Ad" button link.
I would like to be able to display a message to the user to tell them that they have reached the limit, and pretty please, would they like to upgrade?
xa_cas_category_view has this code:
I am wondering if there is a way to test in the template whether or not the user has reached their groups ad limit.
I've dumped $cateogory, $xf.visitor and $xf.options. But I don't think they have the info I need. I have bozz eyes, they're big dumps!
If the user has reached this limit, currently, it just hides the "Post Ad" button link.
I would like to be able to display a message to the user to tell them that they have reached the limit, and pretty please, would they like to upgrade?
xa_cas_category_view has this code:
<xf:pageaction if="$category.canPostAd()"> <xf:button href="{{ link('cas/categories/add', $category) }}" class="button--cta" icon="add"> {{ $category.content_term ? phrase('xa_cas_post_x_ad', {'term': $category.content_term|to_lower}) : phrase('xa_cas_post_ad') }} </xf:button></xf:pageaction>I am wondering if there is a way to test in the template whether or not the user has reached their groups ad limit.
I've dumped $cateogory, $xf.visitor and $xf.options. But I don't think they have the info I need. I have bozz eyes, they're big dumps!