Let's ecommerce together and feel Plone right

40
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 praise To the Lord and I will feel all right; Sayin': let's get together And feel all right. Wo wo-wo wo-wo! Let them all pass all their dirty Remarks (One Love! ); There is one question I'd really love to ask (One Heart! ): Is there a place for the hopeless sinner, Who has hurt all mankind just To save his own beliefs? One Love! What about the one heart? One Heart! What about? Let's get together and feel all right As it was in the beginning (One Love! ); So shall it be in the end (One Heart! ), All right! Give thanks and praise to the Lord And I will feel all right; Let's get together And feel all right. One more thing! Let's get together to fight This Holy Armagiddyon (One Love! ), So when the Man comes there will be no, No doom (One Song! ). Have pity on those whose Chances grows t'inner; There ain't no hiding place From 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 Lord And I will feel all right; Let's get together and feel all right. Give thanks and praise to the Lord And I will feel all right; Let's get together and feel all right. Alessandro Pisa - 2012/10/12 - Arnhem Plone Conference 2012

description

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

Transcript of Let's ecommerce together and feel Plone right

Page 1: Let's ecommerce together and feel Plone right

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 2: Let's ecommerce together and feel Plone right

Software Integrator

[email protected]://blog.redturtle.it@ale_pisa

Alessandro Pisa

Page 3: Let's ecommerce together and feel Plone right

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

The customer

HAS✔ financial tools✔ lots of data

Page 5: Let's ecommerce together and feel Plone right

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

The customer

NEEDS

Page 7: Let's ecommerce together and feel Plone right

And Plone it was!

Page 8: Let's ecommerce together and feel Plone right

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

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

Search + results

Reports

Documents

Page 11: Let's ecommerce together and feel Plone right
Page 12: Let's ecommerce together and feel Plone right

Extract from a report

Page 13: Let's ecommerce together and feel Plone right

✔ 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

✔ 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

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

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

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

Lesson learned

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

Page 19: Let's ecommerce together and feel Plone right

Authentication

User data

Policy

Page 20: Let's ecommerce together and feel Plone right

Authentication

Page 21: Let's ecommerce together and feel Plone right

Personal data

Page 22: Let's ecommerce together and feel Plone right

Policy

Page 23: Let's ecommerce together and feel Plone right

Account informations

Purchase management

Customer care

Page 24: Let's ecommerce together and feel Plone right

Account information

Page 25: Let's ecommerce together and feel Plone right

Purchase management

Page 26: Let's ecommerce together and feel Plone right

Customer care

Page 27: Let's ecommerce together and feel Plone right

Behind the curtains

Another hero - another mindless crime

Page 28: Let's ecommerce together and feel Plone right

Export

Search

Results

Legend

Page 29: Let's ecommerce together and feel Plone right
Page 30: Let's ecommerce together and feel Plone right

Fight for your right

The things you own end up owning you

Page 31: Let's ecommerce together and feel Plone right

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

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

More on formlib tips

Page 34: Let's ecommerce together and feel Plone right

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

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

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

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

✔ memberdata✔ property sheets✔ registry✔ anything...

Can be handy also for

Page 39: Let's ecommerce together and feel Plone right

Lesson learned

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

Page 40: Let's ecommerce together and feel Plone right

Thank you

Thank you

thank you silence