SlideShare a Scribd company logo
1 of 40
Download to read offline
Let’s ecommerce together
                               and feel Plone right
One Love!                                One Love! What about the one heart?     Sayin': One Love!
One Heart!                               One Heart!                              What about the One Heart?
Let's get together and feel all right.   What about?                             (One Heart! )
Hear the children cryin'                 Let's get together and feel all right   What about the?
(One Love! );                            As it was in the beginning              Let's get together and feel all right.
Hear the children cryin'                 (One Love! );                           I'm 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': let's 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!                          Let's 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!                         Let's get together and feel all right.
Remarks (One Love! );                                                            Give thanks and praise to the Lord
There is one question                    Let's get together to fight             And I will feel all right;
I'd really love to ask (One Heart! ):    This Holy Armagiddyon (One Love! ),     Let's get together and feel all right.
Is there a place for the hopeless        So when the Man comes there will be
sinner,                                  no,
Who has hurt all mankind just            No doom (One Song! ).
To save his own beliefs?                 Have pity on those whose
                                         Chances grows t'inner;
                                         There ain't no hiding place
                                         From the Father of Creation.




              Alessandro Pisa - 2012/10/12 - Arnhem Plone Conference 2012
Alessandro Pisa

  Software Integrator




  alessandro.pisa@redturtle.it
  http://blog.redturtle.it
  @ale_pisa
What you will see
    ✔ The use case
    ✔ Problems ☹
    ✔ Solutions ☺

    ✔ Additional slides




     Some quotes you will not be able to read and/or understand
The customer

                 HAS
           ✔ financial tools
           ✔ lots of data
The customer

                 WANTS
       ✔   to make profit with them
       ✔   security
       ✔   to start first with one site, but...
       ✔   ... two at the end
The customer

               NEEDS
And Plone it was!
http://www.icribis.com

Plone role:
    ✔the shop
        ✔ subscriptions
        ✔ docs
        ✔ reports
    ✔interface
    ✔customer dashboard
    ✔customer management
    ✔subscription management
http://www.icribis.com

Search for company

Retrieve company informations
    ✔ reports => (free with subscriptions)
    ✔ documents
Search + results




   Reports




  Documents
Extract from a report
Members: problems

    ✔ Two kind of users
    ✔ Complex profile
    ✔ First login:
         ✔ Registration
         ✔ Policy change
         ✔ Email change
    ✔ Dashboard
    ✔ Backend management
    ✔ Shared user base (?)
Members: solutions
✔ Backend: Archetype
  ✔ Products.Membrane (customers)

✔ Frontend: formlib
  ✔ Registration (full, light)
         ✔ contextual purchase
         ✔ demo & bonuses
  ✔ User dashboard
  ✔ Policy/email changes
  ✔ Security Manager
Shared members
Register:
     ✔ on one site
     ✔ available in the other

Huge work:
     ✔ login
     ✔ registration
     ✔ catalog...
Shared members
Register:
     ✔ on one site
     ✔ available in the other

Data split in ZODB and SQL
     Products.Archetypes.Storage.StorageLayer

Huge work:
     ✔ login
     ✔ registration
     ✔ catalog...
Members: solutions

Shared user base:
     First ZODB
     Then ZODB (per site) + SQL (shared)


SQL Fields
  Products.Archetypes.Storage.StorageLayer
  caching!
Lesson learned




                 http://www.addletters.com/bart-simpson-generator.htm
Authentication




  User data




    Policy
Authentication
Personal data
Policy
Account informations




Purchase management




   Customer care
Account information
Purchase management
Customer care
Behind the curtains




          Another hero - another mindless crime
Export




Search



                  Results




                  Legend
Fight for your right




           The things you own end up owning you
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
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))
More on formlib tips
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
Welcome to the machine




                        Look up to the sky!
        You'll never find rainbows if you're looking down
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')
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)
Can be handy also for


✔ memberdata
✔ property sheets
✔ registry
✔ anything...
Lesson learned




                 http://www.addletters.com/bart-simpson-generator.htm
Thank you




           Thank you
        thank you silence

More Related Content

Viewers also liked

Viewers also liked (9)

Commoditization of Brands - Anisha Motwani
Commoditization of Brands -  Anisha MotwaniCommoditization of Brands -  Anisha Motwani
Commoditization of Brands - Anisha Motwani
 
Rektorat - tavanski prostor (3D)
Rektorat - tavanski prostor (3D)Rektorat - tavanski prostor (3D)
Rektorat - tavanski prostor (3D)
 
Hetip works, February 2014
Hetip works, February 2014Hetip works, February 2014
Hetip works, February 2014
 
Press clipping launch event
Press clipping   launch eventPress clipping   launch event
Press clipping launch event
 
Challenger brands
Challenger brandsChallenger brands
Challenger brands
 
Building service brand
Building service brandBuilding service brand
Building service brand
 
Manajemen pondok pesantrem
Manajemen pondok pesantremManajemen pondok pesantrem
Manajemen pondok pesantrem
 
Financial planning for the Youth
Financial planning for the YouthFinancial planning for the Youth
Financial planning for the Youth
 
When Bharat meets India
When Bharat meets IndiaWhen Bharat meets India
When Bharat meets India
 

Similar to Let's ecommerce together and feel Plone right

Designing Object Oriented Experiences
Designing Object Oriented ExperiencesDesigning Object Oriented Experiences
Designing Object Oriented ExperiencesSophia Voychehovski
 
Let's Make the PAIN Visible!
Let's Make the PAIN Visible!Let's Make the PAIN Visible!
Let's Make the PAIN Visible!Arty Starr
 
The Value of Asking Why
The Value of Asking WhyThe Value of Asking Why
The Value of Asking WhyDaniel Szuc
 
George Orwell Essays - Module 4 English (Advan
George Orwell Essays - Module 4 English (AdvanGeorge Orwell Essays - Module 4 English (Advan
George Orwell Essays - Module 4 English (AdvanJulie Gonzalez
 
Data-Driven Software Mastery @Open Mastery Austin
Data-Driven Software Mastery @Open Mastery AustinData-Driven Software Mastery @Open Mastery Austin
Data-Driven Software Mastery @Open Mastery AustinArty Starr
 
How To Write A Good Introduction Essay Example
How To Write A Good Introduction Essay ExampleHow To Write A Good Introduction Essay Example
How To Write A Good Introduction Essay ExampleBeth Payne
 
Tienda Development Workshop - JAB11
Tienda Development Workshop - JAB11Tienda Development Workshop - JAB11
Tienda Development Workshop - JAB11Daniele Rosario
 
Experiments in Reasoning
Experiments in ReasoningExperiments in Reasoning
Experiments in ReasoningAslam Khan
 
Essay On Art And Science Exhibition. Online assignment writing service.
Essay On Art And Science Exhibition. Online assignment writing service.Essay On Art And Science Exhibition. Online assignment writing service.
Essay On Art And Science Exhibition. Online assignment writing service.Tammy Chmielorz
 
An Overview of the AI on the AWS Platform
An Overview of the AI on the AWS PlatformAn Overview of the AI on the AWS Platform
An Overview of the AI on the AWS PlatformAmazon Web Services
 
Treat Data like a Gift
Treat Data like a GiftTreat Data like a Gift
Treat Data like a GiftMichel Guillet
 
Buy 200 Sheets Vintage Lined Stationery Paper Let
Buy 200 Sheets Vintage Lined Stationery Paper LetBuy 200 Sheets Vintage Lined Stationery Paper Let
Buy 200 Sheets Vintage Lined Stationery Paper LetJessica Henderson
 
Web search lecture september 2011
Web search lecture september 2011Web search lecture september 2011
Web search lecture september 2011Stefania DRUGA
 

Similar to Let's ecommerce together and feel Plone right (20)

Fakeperformance
FakeperformanceFakeperformance
Fakeperformance
 
Designing Object Oriented Experiences
Designing Object Oriented ExperiencesDesigning Object Oriented Experiences
Designing Object Oriented Experiences
 
Let's Make the PAIN Visible!
Let's Make the PAIN Visible!Let's Make the PAIN Visible!
Let's Make the PAIN Visible!
 
What lies beneath
What lies beneathWhat lies beneath
What lies beneath
 
WordPress Security Blitz
WordPress Security BlitzWordPress Security Blitz
WordPress Security Blitz
 
The Value of Asking Why
The Value of Asking WhyThe Value of Asking Why
The Value of Asking Why
 
Are You Doing This? (revised)
Are You Doing This? (revised)Are You Doing This? (revised)
Are You Doing This? (revised)
 
George Orwell Essays - Module 4 English (Advan
George Orwell Essays - Module 4 English (AdvanGeorge Orwell Essays - Module 4 English (Advan
George Orwell Essays - Module 4 English (Advan
 
Data-Driven Software Mastery @Open Mastery Austin
Data-Driven Software Mastery @Open Mastery AustinData-Driven Software Mastery @Open Mastery Austin
Data-Driven Software Mastery @Open Mastery Austin
 
How To Write A Good Introduction Essay Example
How To Write A Good Introduction Essay ExampleHow To Write A Good Introduction Essay Example
How To Write A Good Introduction Essay Example
 
PPT Slides Go.pptx
PPT Slides Go.pptxPPT Slides Go.pptx
PPT Slides Go.pptx
 
5. where and how 2013-04-01
5. where and how   2013-04-015. where and how   2013-04-01
5. where and how 2013-04-01
 
Tienda Development Workshop - JAB11
Tienda Development Workshop - JAB11Tienda Development Workshop - JAB11
Tienda Development Workshop - JAB11
 
Experiments in Reasoning
Experiments in ReasoningExperiments in Reasoning
Experiments in Reasoning
 
Essay On Art And Science Exhibition. Online assignment writing service.
Essay On Art And Science Exhibition. Online assignment writing service.Essay On Art And Science Exhibition. Online assignment writing service.
Essay On Art And Science Exhibition. Online assignment writing service.
 
The sweet spot
The sweet spotThe sweet spot
The sweet spot
 
An Overview of the AI on the AWS Platform
An Overview of the AI on the AWS PlatformAn Overview of the AI on the AWS Platform
An Overview of the AI on the AWS Platform
 
Treat Data like a Gift
Treat Data like a GiftTreat Data like a Gift
Treat Data like a Gift
 
Buy 200 Sheets Vintage Lined Stationery Paper Let
Buy 200 Sheets Vintage Lined Stationery Paper LetBuy 200 Sheets Vintage Lined Stationery Paper Let
Buy 200 Sheets Vintage Lined Stationery Paper Let
 
Web search lecture september 2011
Web search lecture september 2011Web search lecture september 2011
Web search lecture september 2011
 

Let's ecommerce together and feel Plone right

  • 1. Let’s ecommerce together and feel Plone right One Love! One Love! What about the one heart? Sayin': One Love! One Heart! One Heart! What about the One Heart? Let's get together and feel all right. What about? (One Heart! ) Hear the children cryin' Let's get together and feel all right What about the? (One Love! ); As it was in the beginning Let's get together and feel all right. Hear the children cryin' (One Love! ); I'm 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': let's 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! Let's 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! Let's get together and feel all right. Remarks (One Love! ); Give thanks and praise to the Lord There is one question Let's get together to fight And I will feel all right; I'd really love to ask (One Heart! ): This Holy Armagiddyon (One Love! ), Let's get together and feel all right. Is there a place for the hopeless So when the Man comes there will be sinner, no, Who has hurt all mankind just No doom (One Song! ). To save his own beliefs? Have pity on those whose Chances grows t'inner; There ain't 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
  • 8. http://www.icribis.com Plone role: ✔the shop ✔ subscriptions ✔ docs ✔ reports ✔interface ✔customer dashboard ✔customer management ✔subscription management
  • 9. http://www.icribis.com Search for company Retrieve company informations ✔ reports => (free with subscriptions) ✔ documents
  • 10. Search + results Reports Documents
  • 11.
  • 12. Extract from a report
  • 13. Members: problems ✔ Two kind of users ✔ Complex profile ✔ First login: ✔ Registration ✔ Policy change ✔ Email change ✔ Dashboard ✔ Backend management ✔ Shared user base (?)
  • 14. Members: solutions ✔ Backend: Archetype ✔ Products.Membrane (customers) ✔ Frontend: formlib ✔ Registration (full, light) ✔ contextual purchase ✔ demo & bonuses ✔ User dashboard ✔ Policy/email changes ✔ Security Manager
  • 15. Shared members Register: ✔ on one site ✔ available in the other Huge work: ✔ login ✔ registration ✔ catalog...
  • 16. Shared members Register: ✔ on one site ✔ available in the other Data split in ZODB and SQL Products.Archetypes.Storage.StorageLayer Huge work: ✔ login ✔ registration ✔ catalog...
  • 17. Members: solutions Shared user base: First ZODB Then ZODB (per site) + SQL (shared) SQL Fields Products.Archetypes.Storage.StorageLayer caching!
  • 18. Lesson learned http://www.addletters.com/bart-simpson-generator.htm
  • 19. Authentication User data Policy
  • 27. Behind the curtains Another hero - another mindless crime
  • 28. Export Search Results Legend
  • 29.
  • 30. Fight for your right The things you own end up owning you
  • 31. 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
  • 32. 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))
  • 34. 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
  • 35. Welcome to the machine Look up to the sky! You'll never find rainbows if you're looking down
  • 36. 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')
  • 37. 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)
  • 38. Can be handy also for ✔ memberdata ✔ property sheets ✔ registry ✔ anything...
  • 39. Lesson learned http://www.addletters.com/bart-simpson-generator.htm
  • 40. Thank you Thank you thank you silence