Geodirectory v1 PHP snippet

This topic contains 5 replies, has 3 voices, and was last updated by  Mark Cuddy 5 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #484463

    Mark Cuddy
    Free User
    Post count: 52

    Hi,

    I’d like to add customisations depending on which pricing plan has been selected for Places. These aren’t just CSS changes or hiding fields, I’m going to need to set them up in php so something like

    if Package id=1 do xxx
    if package id=2 do yyy

    Is this possible

    Thanks

    Mark

    #484471

    Guust
    Moderator
    Post count: 29970

    Yes, that should be possible with your own custom code, for which we do not provide support.

    Thanks

    #484474

    Mark Cuddy
    Free User
    Post count: 52

    Hi,

    I don’t need the code but is there a hook?

    Mark

    #484486

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Mark,

    There are a few ways to do it depending where you are doing things. The quickest/easiest way would be to check the global $post; for $post->package_id

    If you need more help please provide more context.

    Thanks,

    Stiofan

    #484568

    Mark Cuddy
    Free User
    Post count: 52

    That should do it, thanks.

    #484572

    Mark Cuddy
    Free User
    Post count: 52

    So I have added:

    if($post->package_id = ‘5’) {

    xxx

    }

    but doesn’t seem to be working. Am I missing something?

    Thanks

    Mark

Viewing 6 posts - 1 through 6 (of 6 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