Ignore:
Timestamp:
1 Jan 2015, 22:37:29 (10 years ago)
Author:
Henrik Bettermann
Message:

Render 'terms and conditions' on product page.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/products
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py

    r12361 r12362  
    149149    grok.name('index')
    150150    grok.require('waeup.Public')
     151    grok.template('productpage')
    151152    #grok.template('basepage')
    152     form_fields = grok.AutoFields(IProduct)
     153    form_fields = grok.AutoFields(IProduct).omit('terms_and_conditions')
    153154    pnav = 1
    154155
     
    156157    def label(self):
    157158        return self.context.title
     159
     160    @property
     161    def terms_and_conditions(self):
     162        lang = self.request.cookies.get('ikoba.language')
     163        html = self.context.tc_dict.get(lang,'')
     164        if html =='':
     165            portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
     166            html = self.context.tc_dict.get(portal_language,'')
     167        return html
    158168
    159169
Note: See TracChangeset for help on using the changeset viewer.