Anyway to Condition Based Off of Package Naming?

This topic contains 2 replies, has 2 voices, and was last updated by  identity 4 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #540215

    identity
    Lifetime Member
    Post count: 445

    Specifically looking for the ability to serve up a badge within the GD Archive Item template based off of a keyword within the Pricing Package Name.

    I see the “package_id” field key, but that relates to the unique and individual number assigned to each package, but nothing that would key off of the name.

    Example:
    Any package with the word “Premium” in it could feature an orange “Featured” badge versus packages with the word “Enhanced” in it could feature a green “Featured” badge.

    This would allow both types of packages across multiple CPT to be set as featured listings while also allowing a visual distinction between these two package levels.

    Thanks

    #540233

    Alex Rollin
    Moderator
    Post count: 27815

    You can do Exactly the same thing using the ID. If the price package has premium, what’s the ID? Set the badge key for package ID. Badges don’t print if they aren’t active, and cache will pick them all up. They take up some room in the code, that’s all.

    #540243

    identity
    Lifetime Member
    Post count: 445

    Right, that works well enough on a simple site….

    but now span that across 12+ CPTs and you have to micro-manage that across 24 or more different package IDs and a conditional statement for two different featured tiers.

    At which point, you’d need to most likely create multiple Archive Item templates to make it manageable and not overtax the system with so many conditional checks per listing. Not to mention having to track that for any package changes.

    My thought is that if you can key off of a specific keyword that represents a package tier, that your conditional check can span all CPTs…you can manage at a macro level rather than micro. Even as specific packages may roll in or out of the offering, as long as the tiers utilize the base nomenclature, the logic remains intact.

    As it sounds like this doesn’t exist then otherwise, please add this for consideration.

    Cheers

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount