Let's ecommerce together and feel Plone right


Published on

My presentation of an e-commerce solution at the latest Plone conference.

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Let's ecommerce together and feel Plone right

  1. Let’s ecommerce together and feel Plone rightOne Love! One Love! What about the one heart? Sayin: One Love!One Heart! One Heart! What about the One Heart?Lets get together and feel all right. What about? (One Heart! )Hear the children cryin Lets get together and feel all right What about the?(One Love! ); As it was in the beginning Lets get together and feel all right.Hear the children cryin (One Love! ); Im pleadin to mankind!(One Heart! ), So shall it be in the end (One Love! );Sayin: give thanks and praise (One Heart! ), Oh, Lord!To the Lord and I will feel all right; All right! (One Heart)Sayin: lets get together Give thanks and praise to the Lord Wo-ooh!And feel all right. And I will feel all right;Wo wo-wo wo-wo! Lets get together Give thanks and praise to the Lord And feel all right. And I will feel all right;Let them all pass all their dirty One more thing! Lets get together and feel all right.Remarks (One Love! ); Give thanks and praise to the LordThere is one question Lets get together to fight And I will feel all right;Id really love to ask (One Heart! ): This Holy Armagiddyon (One Love! ), Lets get together and feel all right.Is there a place for the hopeless So when the Man comes there will besinner, no,Who has hurt all mankind just No doom (One Song! ).To save his own beliefs? Have pity on those whose Chances grows tinner; There aint no hiding place From the Father of Creation. Alessandro Pisa - 2012/10/12 - Arnhem Plone Conference 2012
  2. Alessandro Pisa Software Integrator alessandro.pisa@redturtle.it http://blog.redturtle.it @ale_pisa
  3. What you will see ✔ The use case ✔ Problems ☹ ✔ Solutions ☺ ✔ Additional slides Some quotes you will not be able to read and/or understand
  4. The customer HAS ✔ financial tools ✔ lots of data
  5. The customer WANTS ✔ to make profit with them ✔ security ✔ to start first with one site, but... ✔ ... two at the end
  6. The customer NEEDS
  7. And Plone it was!
  8. http://www.icribis.comPlone role: ✔the shop ✔ subscriptions ✔ docs ✔ reports ✔interface ✔customer dashboard ✔customer management ✔subscription management
  9. http://www.icribis.comSearch for companyRetrieve company informations ✔ reports => (free with subscriptions) ✔ documents
  10. Search + results Reports Documents
  11. Extract from a report
  12. Members: problems ✔ Two kind of users ✔ Complex profile ✔ First login: ✔ Registration ✔ Policy change ✔ Email change ✔ Dashboard ✔ Backend management ✔ Shared user base (?)
  13. Members: solutions✔ Backend: Archetype ✔ Products.Membrane (customers)✔ Frontend: formlib ✔ Registration (full, light) ✔ contextual purchase ✔ demo & bonuses ✔ User dashboard ✔ Policy/email changes ✔ Security Manager
  14. Shared membersRegister: ✔ on one site ✔ available in the otherHuge work: ✔ login ✔ registration ✔ catalog...
  15. Shared membersRegister: ✔ on one site ✔ available in the otherData split in ZODB and SQL Products.Archetypes.Storage.StorageLayerHuge work: ✔ login ✔ registration ✔ catalog...
  16. Members: solutionsShared user base: First ZODB Then ZODB (per site) + SQL (shared)SQL Fields Products.Archetypes.Storage.StorageLayer caching!
  17. Lesson learned http://www.addletters.com/bart-simpson-generator.htm
  18. Authentication User data Policy
  19. Authentication
  20. Personal data
  21. Policy
  22. Account informationsPurchase management Customer care
  23. Account information
  24. Purchase management
  25. Customer care
  26. Behind the curtains Another hero - another mindless crime
  27. ExportSearch Results Legend
  28. Fight for your right The things you own end up owning you
  29. Validation: formlib from zope.schema import ValidationError class NotMyEmailError(ValidationError): """email has to be alessandro.pisa@redturtle.it! """ def is_my_email(value): if value!=alessandro.pisa@redturtle.it: raise NotMyEmailError else: return True
  30. Validation: Archetype from Products.validation.interfaces.IValidator import IValidator from Products.validation import validation from my.custom.product import is_my_email class FormlibValidatorWrapper(object): implements(IValidator) def __init__(self, validator): self.validator = validator self.name = validator.func_name def __call__(self, value, *args, **kwargs): try: self.validator(value) except ValidationError, error: return error.doc() validation.register(FormlibValidatorWrapper(is_my_email))
  31. More on formlib tips
  32. Properties from plone.app.users.browser.personalpreferences import UserDataPanelAdapter class EnhancedUserDataPanelAdapter(UserDataPanelAdapter): def get_firstname(self): return self.context.getProperty(firstname, ) def set_firstname(self, value): return self.context.setMemberProperties({firstname: value}) firstname = property(get_firstname, set_firstname) def get_lastname(self): return self.context.getProperty(lastname, ) def set_lastname(self, value): return self.context.setMemberProperties({lastname: value}) lastname = property(get_lastname, set_lastname)http://svn.plone.org/svn/collective/collective.examples.userdata
  33. Welcome to the machine Look up to the sky! Youll never find rainbows if youre looking down
  34. Uber-Properties in action class ManageUserReportsAdapter(object): report1_sub_month = ReportProperty(report1, sub_month) report1_sub_year = ReportProperty(report1, sub_year) report1_sub_bonus = ReportProperty(report1, sub_bonus) report1_sub_total = ReportProperty(report1, sub_total) report1_res_month = ReportProperty(report1, res_month) report1_res_year = ReportProperty(report1, res_year) report1_res_bonus = ReportProperty(report1, res_bonus) report1_res_total = ReportProperty(report1, res_total)
  35. Uber-Properties class ReportProperty(property): @staticmethod def report_getter(report_type, duration): def getter(self): return self.reports.get(report_type, {}).get(duration, 0) return getter @staticmethod def report_setter(report_type, duration): def setter(self, value): self.reports[report_type][duration] = value return setter def __init__(self, type, duration): doc = "Property for %s %s" % (type, duration) super(ReportProperty, self).__init__(self.report_getter(type, duration), self.report_setter(type, duration), doc=doc)
  36. Can be handy also for✔ memberdata✔ property sheets✔ registry✔ anything...
  37. Lesson learned http://www.addletters.com/bart-simpson-generator.htm
  38. Thank you Thank you thank you silence