let's ecommerce together and feel plone right
DESCRIPTION
My presentation of an e-commerce solution at the latest Plone conference.TRANSCRIPT
![Page 1: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/1.jpg)
Let’s ecommerce together and feel Plone right
One Love!One Heart!Let's get together and feel all right.Hear the children cryin'(One Love! );Hear the children cryin'(One Heart! ),Sayin': give thanks and praiseTo the Lord and I will feel all right;Sayin': let's get togetherAnd feel all right.Wo wo-wo wo-wo!
Let them all pass all their dirtyRemarks (One Love! );There is one questionI'd really love to ask (One Heart! ):Is there a place for the hopeless sinner,Who has hurt all mankind justTo save his own beliefs?
One Love! What about the one heart?One Heart!What about?Let's get together and feel all rightAs it was in the beginning(One Love! );So shall it be in the end(One Heart! ),All right!Give thanks and praise to the LordAnd I will feel all right;Let's get togetherAnd feel all right.One more thing!
Let's get together to fightThis Holy Armagiddyon (One Love! ),So when the Man comes there will be no,No doom (One Song! ).Have pity on those whoseChances grows t'inner;There ain't no hiding placeFrom the Father of Creation.
Sayin': One Love!What about the One Heart?(One Heart! )What about the?Let's get together and feel all right.I'm pleadin' to mankind!(One Love! );Oh, Lord!(One Heart)Wo-ooh!
Give thanks and praise to the LordAnd I will feel all right;Let's get together and feel all right.Give thanks and praise to the LordAnd I will feel all right;Let's get together and feel all right.
Alessandro Pisa - 2012/10/12 - Arnhem Plone Conference 2012
![Page 3: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/3.jpg)
What you will see
✔ The use case✔ Problems ☹✔ Solutions ☺
✔ Additional slides
Some quotes you will not be able to read and/or understand
![Page 4: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/4.jpg)
The customer
HAS✔ financial tools✔ lots of data
![Page 5: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/5.jpg)
The customer
WANTS✔ to make profit with them✔ security✔ to start first with one site, but...✔ ... two at the end
![Page 6: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/6.jpg)
The customer
NEEDS
![Page 7: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/7.jpg)
And Plone it was!
![Page 8: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/8.jpg)
http://www.icribis.com
Plone role:✔the shop
✔ subscriptions✔ docs✔ reports
✔interface✔customer dashboard✔customer management✔subscription management
![Page 9: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/9.jpg)
http://www.icribis.com
Search for company
Retrieve company informations✔ reports => (free with subscriptions)✔ documents
![Page 10: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/10.jpg)
Search + results
Reports
Documents
![Page 11: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/11.jpg)
![Page 12: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/12.jpg)
Extract from a report
![Page 13: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/13.jpg)
✔ Two kind of users✔ Complex profile✔ First login:
✔ Registration✔ Policy change✔ Email change
✔ Dashboard✔ Backend management✔ Shared user base (?)
Members: problems
![Page 14: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/14.jpg)
✔ Backend: Archetype✔ Products.Membrane (customers)
✔ Frontend: formlib✔ Registration (full, light)
✔ contextual purchase✔ demo & bonuses
✔ User dashboard✔ Policy/email changes
✔ Security Manager
Members: solutions
![Page 15: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/15.jpg)
Register:✔ on one site✔ available in the other
Huge work:✔ login✔ registration✔ catalog...
Shared members
![Page 16: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/16.jpg)
Register:✔ on one site✔ available in the other
Data split in ZODB and SQLProducts.Archetypes.Storage.StorageLayer
Huge work:✔ login✔ registration✔ catalog...
Shared members
![Page 17: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/17.jpg)
Shared user base: First ZODBThen ZODB (per site) + SQL (shared)
SQL FieldsProducts.Archetypes.Storage.StorageLayercaching!
Members: solutions
![Page 18: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/18.jpg)
Lesson learned
http://www.addletters.com/bart-simpson-generator.htm
![Page 19: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/19.jpg)
Authentication
User data
Policy
![Page 20: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/20.jpg)
Authentication
![Page 21: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/21.jpg)
Personal data
![Page 22: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/22.jpg)
Policy
![Page 23: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/23.jpg)
Account informations
Purchase management
Customer care
![Page 24: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/24.jpg)
Account information
![Page 25: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/25.jpg)
Purchase management
![Page 26: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/26.jpg)
Customer care
![Page 27: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/27.jpg)
Behind the curtains
Another hero - another mindless crime
![Page 28: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/28.jpg)
Export
Search
Results
Legend
![Page 29: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/29.jpg)
![Page 30: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/30.jpg)
Fight for your right
The things you own end up owning you
![Page 31: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/31.jpg)
from zope.schema import ValidationError
class NotMyEmailError(ValidationError): """email has to be [email protected]! """
def is_my_email(value): if value!='[email protected]': raise NotMyEmailError else: return True
Validation: formlib
![Page 32: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/32.jpg)
from Products.validation.interfaces.IValidator import IValidatorfrom Products.validation import validationfrom 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))
Validation: Archetype
![Page 33: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/33.jpg)
More on formlib tips
![Page 34: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/34.jpg)
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)
Properties
http://svn.plone.org/svn/collective/collective.examples.userdata
![Page 35: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/35.jpg)
Welcome to the machine
Look up to the sky! You'll never find rainbows if you're looking down
![Page 36: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/36.jpg)
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 in action
![Page 37: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/37.jpg)
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)
Uber-Properties
![Page 38: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/38.jpg)
✔ memberdata✔ property sheets✔ registry✔ anything...
Can be handy also for
![Page 39: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/39.jpg)
Lesson learned
http://www.addletters.com/bart-simpson-generator.htm
![Page 40: Let's ecommerce together and feel Plone right](https://reader033.vdocuments.us/reader033/viewer/2022051514/54c209ae4a795915208b4587/html5/thumbnails/40.jpg)
Thank you
Thank you
thank you silence