| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
| 
 | 
||||||||||
| X-Cart Home | 
Smarty variable for payment methods? | |||
![]()  | 
	
	
		
			 | 	
	
||
| 
		 | 
	Thread Tools | Search this Thread | 
| 
		 
			 
			#1  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 I want to add a block of text (address, etc.) that only appears when the payment method selected is a Personal Check or a Money Order. 
		
	
		
		
		
		
			
		
		
		
		
	
		
		
		
	I know *where* to put it in the checkout.tpl, but I need help sussing out the relevant Smarty variables and syntax: {if ? eq ? or ?}{/if} Please and thank you ...  | 
|||||||
| 
		 
			 
			#2  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 I think you may want to look at payment_offline.tpl 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	Looking for a reliable X-cart host ? You wont go wrong with either of these.  | 
|||||||||
| 
		 
			 
			#3  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 you know, i did ... and it consists of exactly this: 
		
	
		
		
		
		
			
		
		
		
		
	
		
		
		
	{* $Id: payment_offline.tpl,v 1.2.6.1 2003/11/21 07:09:23 mclap Exp $ *} ... no actual code. i restored the file just to be sure, and it didn't change. is there supposed to be something there?  | 
|||||||
| 
		 
			 
			#4  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 If the paymentid is in the URI, you can do {$smarty.get.paymentid eq "1"} ... {/if} or else you'll need to $smarty->assign() the payment method if its not available. 
		
	
		
		
		
		
			
		
		
		
		
	
		
		
		
	 | 
|||||||||
| 
		 
			 
			#5  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 Boomer, could you spell that out for me a bit more?  I'm obviously not as fluent in smarty as you're assuming.  :} 
		
	
		
		
		
		
			
		
		
		
		
	
		
		
		
	I'm figuring there's a variable already assigned that contains the chosen payment method. I know I can print the type of payment method with {$payment_data.payment_method}. I'm looking for something like: {if $payment_data.payment_method eq "personal check"}[text here]{/if} ... except, you know, code that actually works. <wry> Remedial help appreciated.  | 
|||||||
![]()  | 
		
	
		
			 | 	
	
| Thread Tools | Search this Thread | 
		
  | 
	
		
  | 
| 
 | 
|||
| 
 
X-Cart forums © 2001-2020
 
 | 
|||