Update ProductPaymentForm for yearly subscription
This commit is contained in:
		
					parent
					
						
							
								f0b604c6dc
							
						
					
				
			
			
				commit
				
					
						3bf2654b50
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -109,9 +109,14 @@ class ProductPaymentForm(GenericPaymentForm): | |||
|             ) | ||||
|         ) | ||||
|         if self.product.product_is_subscription: | ||||
|             payment_type = "month" | ||||
|             if self.product.product_subscription_interval == "month": | ||||
|                 payment_type = _('Monthly subscription') | ||||
|             elif self.product.product_subscription_interval == "year": | ||||
|                 payment_type = _('Yearly subscription') | ||||
|             self.fields['amount'].label = "{amt} ({payment_type})".format( | ||||
|                 amt=_('Amount in CHF'), | ||||
|                 payment_type=_('Monthly subscription') | ||||
|                 payment_type=payment_type | ||||
|             ) | ||||
|         else: | ||||
|             self.fields['amount'].label = "{amt} ({payment_type})".format( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue