View Single Post
  #8  
Old 12-12-2005, 02:18 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Quote:
Originally Posted by ultimatephysique
Quote:
Originally Posted by B00MER
Code:
if($paymentid=="1") { smarty->assign("paymentby","cc") } elseif ($paymentid=="2") { smarty->assign("paymentby","moneyorder") }
Programming Logic Question: What does the "paymentby" and "cc" do, i assume the later is the payment method, but where does the "paymentby" come from?

$smart->assign("paymentby","cc");

Does nothing more than set a variable called "paymentby" to smarty's templates with a value of "cc".

So I can now use {$paymentby} in my .tpl file to show its value or to do conditions, etc.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote