View Single Post
Old 10-12-2004, 01:52 AM
magder magder is offline

Advanced Member
Join Date: Apr 2004
Posts: 51


I've been having some trouble with an {if} statement on a mod for paid membership. I thought this would be fairly simple.

I want to change the cart checkout button to join when it is a membership product.

I found this in the membership sign up script:

if (empty($add_to_cart)) {
$amount = ($product_options == "Membership Sign Up") ? 1 : $amount;
$options = "Memberships: " . $product_options;

So I tried this which doesn't seem to be working:

{if $products[product].product_options eq "Membership Sign Up"}<td>
{include file="buttons/update.tpl" type="input"}

<td align=right>
{include file="buttons/checkout.tpl" style="button"}
{include file="buttons/update.tpl" type="input"}

{include file="buttons/clear_cart.tpl"}
<td align=right>{include file="buttons/continue_shopping.tpl" style="button"}
<a href="cart.php?mode=checkout">{include file="buttons/checkout.tpl" style="button"}{/if}

I also tried using {if $user_membership ne ""} but that didn't work either. Is there something about the cart that handles these variables differently?
x-cart 3.8
Reply With Quote