1

Topic: another IF statement driving me mad

Hi can anybody help.

I have 2 payment ID's

/index.php?m=account_upgrade&p=payment&id=1
and
/index.php?m=account_upgrade&p=payment&id=2

In the account_upgrade_payment.tpl file I have tried adding in an IF statement so I can have different things shown in the different links.

I have tried.
<!-- IF account_upgrade AND payment_id == "1" -->
<!-- IF account_upgrade_payment_id == "1" -->
<!-- IF session.account_upgrade AND payment_id == "1" -->
<!-- IF session.account_upgrade_payment_id == "1" -->
<!-- IF settings.account_upgrade AND payment_id == "1" -->
<!-- IF settings.account_upgrade_payment_id == "1" -->

Nothing is working, if I set it to id == "0" -- it just displays it both payments.

Driving me mad!!!!!!

vldPersonals 2.7 - Commercial license.

2

Re: another IF statement driving me mad

what version u have ?

3

Re: another IF statement driving me mad

I think it is better you ask vlad about this.
I found this maybe it can help you.

Last edited by gugu (2011-12-11 16:15:06)

Give the world the best you have, and the best will come to you.
Tutorials and Mods for VldPersonals  Add CometChat to your vldPersonals site

4

Re: another IF statement driving me mad

ok so.
the id is the package ID of the subscri[ption plan not the PAYMENT type ID
Like:
1 month membershp = ID 1
2 month membership = ID 3

You can try to use : package_id variable inside template.
Something like:

<!-- IF package_id == "1" -->
This is package ID 1 for 1 month.
<!-- ENDIF -->

Edit:
I`m not sure what exactly you want to show, and where, if you could give few more details.

Last edited by misulicus (2011-12-11 16:38:36)

5

Re: another IF statement driving me mad

Hi Guys,

I am using 2.7, I just wanted the payment page to show an automatic price conversion rate for whatever payment plan they chose.

I'll give your code a try misulicus and let you know.

Cheers.

vldPersonals 2.7 - Commercial license.

6

Re: another IF statement driving me mad

misulicus wrote:

ok so.
the id is the package ID of the subscri[ption plan not the PAYMENT type ID
Like:
1 month membershp = ID 1
2 month membership = ID 3

You can try to use : package_id variable inside template.
Something like:

<!-- IF package_id == "1" -->
This is package ID 1 for 1 month.
<!-- ENDIF -->

Edit:
I`m not sure what exactly you want to show, and where, if you could give few more details.

Worked like a charm,

I would love to know where to get a list of system names from (If thats what you would call them)

Thanks again.

vldPersonals 2.7 - Commercial license.

7

Re: another IF statement driving me mad

well usually what i do is look in the lib.FILE
for example inside lib.account_upgrade wich is responsible for the account/upgrade page.
and lets say i want to see how the base page that shows the packages work, so i go to the function for that page: show_packages in this case inside of wich i notice :

$fields[$i]...

wich means that the $fields array gets different values:

$fields[$i]['package_name'] = $obj->name; --> stores the name of package
$fields[$i]['package_term'] = $obj->term; --> stores the duration of the package
etc.

and then a bit lower to the end of the function there is the assignment thing that assigns a $variable value to a {template_tag} in this case:

$TEMPLATE->assign("package_fields", $fields);

wich means that package_fields holds all the $fields array wich holds multiple values.
so then on the account_upgrade.tpl page i look for BEGIN package_fields wich tells me that inside that BEGIN loop i can use the different $fields values since its an array.
and you can see that already it shows some data like:
{package_name} or {package_description} wich you will notice they are assigned in the lib. file.

In conclusion i think its an easy way to see wich "variables" you can use on specific template pages of the website.
If i`m wrong with something feel free to correct

8

Re: another IF statement driving me mad

thank's

Comet Chat - The best Facebook chat clone integrated to Vldpersonals
Asian Dating and Asian Girls
Dating woman Romania

9

Re: another IF statement driving me mad

I need to do the following:

I have a 01 pack, I wanted could only be paid by paypal
I have a 02 pack, I wanted could only be paid by Onebip

Could anyone help me?

Comet Chat - The best Facebook chat clone integrated to Vldpersonals
Asian Dating and Asian Girls
Dating woman Romania