Get the product_id thanks.php

Discussion in 'Troubleshooting' started by sbc123, Mar 27, 2012.

  1. sbc123

    sbc123 aMember Pro Customer

    Joined:
    Mar 19, 2010
    Messages:
    18
    I have some analytics code that I would like to add to the thanks.php code but only want to assign it to two products.

    The product_id does not come as $_GET['product_id'] and I have tried a few methods to locate it but to no avail. Can anyone help regarding this?

    If I can find the product_id then i can add the code for those products.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    First, this is better to modify thanks.html template.
    In template you can try this:

    {if $product.product_id ==1}
    {/if}

    or
    {if $payment.product_id==1}
    {/if}
    rdorfman likes this.
  3. sbc123

    sbc123 aMember Pro Customer

    Joined:
    Mar 19, 2010
    Messages:
    18
    Thanks Alexander for a very quick response.

    That worked perfectly and I was able to add the code I need. Had never really used amember before so once I worked out what smarty was it was nice and easy.

Share This Page