Welcome Guest, Not a member yet? Register   Sign In
Hide item price if user is not logged in
#3

Thank  i have used the syntax below and it working  perfect
PHP Code:
                    <!-- testin code here -->
                                    <?
php 
                                        
if($obj->isloggedin
                                            {if(
$obj->product["discount_status"] == "1")
                                                {
                                                echo 
'<strong>Price&nbsp;:</strong>&nbsp;<span class = "price-number" style = "text-decoration:line-through;color : red;">R '.$obj->product["product_price"].'</span><br />

                                                    <strong>Discount&nbsp;Price&nbsp;:</strong>&nbsp;<span class = "price-number" style = "">R'
.$obj->product["discount_price"].' </span>';
                                                }else
                                                {
                                                echo
'<strong>Price&nbsp;:</strong>&nbsp;<span class = "price-number">R '.$obj->product["product_price"].'</span>';
                                                };
                                            }
                                        else 
                                        {
                                        echo 
'whatever /chilichonse / redirect to login page/ login to see price'
                                         
;                
                                        }
                                    
?>
                    <!-- testing my code here --> 
Reply


Messages In This Thread
RE: Hide item price if user is not logged in - by chanceymwa - 07-16-2018, 08:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB