DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Customer Relationship Management for TYPO3

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Alex Kellner
Changed:2009-10-15T17:43:50.380000000
Classification:miniCRM
Keywords:CRM
Author:Alex Kellner
Email:alexander.kellner@einpraegsam
Info 4:
Language:en

img-1 img-2 Customer Relationship Management for TYPO3 - miniCRM

Customer Relationship Management for TYPO3

Extension Key: miniCRM

img-3

Language: en

Keywords: CRM

Copyright 2000-2008, Alex Kellner, <alexander.kellner@einpraegsam>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

Customer Relationship Management for TYPO3 1

`Introduction 3 <#1.1.Introduction|outline>`_

What does it do? 3

What features are currently running? 3

What should be implemented? 3

What does this plugin need to run? 3

Screenshots 4

`Users manual 7 <#1.2.Users%20manual|outline>`_

Install tt_address 7

Install miniCRM 7

`Configuration and Administration 10 <#1.3.Configuration%20and%20Administration|outline>`_

Frontend Plugin 10

Backend Module 12

Typoscript Settings 21

`Database corner 23 <#1.4.Database%20corner|outline>`_

Database relations 23

Database tables and fields which could be used from you 24

`Known problems 26 <#1.5.Known%20problems|outline>`_

`To-Do list 27 <#1.6.To-Do%20list|outline>`_

`ChangeLog 28 <#1.7.ChangeLog|outline>`_

Version 0.1.x alpha 28

Open invoiceview from the backend 28

Printbutton to invoice view added 28

Version 0.0.x alpha 28

`Additional links 30 <#1.8.Additional%20links|outline>`_

Introduction

What does it do?

Customer Relationship Management as a TYPO3 extension? Absolutely nonsense! But I want and need such a plugin :)

This is a small CRM tool in TYPO3. Storing accounts/clients (tt_address), contacts (fe_users), projects and products in the TYPO3 backend and bring all datas together with IRRE.

Define your own custom list views for the backend module in the TSconfig of the user or there groups.

I need this extension for my self to store my clients with there domain and email addresses (sending newsletter, etc...) and print invoices (no more Word and Excel)

What features are currently running?

  • Database relations finished

    Clients and Projects could be stored

  • Backend Module

    Account list

Project list

  • Sales statistic
  • Custom Lists are available
  • CSV Export
  • XLS Export

Frontend Plugin:

Printing invoices

What should be implemented?

  • Backend Module:

    Writing todos to you and other users

  • Frontend Plugin:

    • Showing projects
    • Listing Accounts
    • Writing mails (with powermail) and store them with relation to a project

What does this plugin need to run?

  • PHP5
  • TYPO3 4.1 or higher
  • tt_address

Screenshots

Storing Accounts and more

img-4 All important tables are integrated via IRRE, to hide information if they are not needed and get the information open if they are needed

Backend Module

img-5

img-6

Predefined List: Project list with there date, account, invoice no, sum and status

img-7

Custom Lists could be added for each Backend usergroup (e.g. “Umsatzstatistik” for usergroup minicrm)

Frontend Plugin

img-8

img-9

Frontend Plugin will be implemented soon (printing invoices, writing mails, and so on...)

Users manual

Install tt_address

Implement and install tt_address from TER (see manual from tt_address)

Install miniCRM

Implement and install miniCRM
  • Import in extension manager
  • Make the settings in the extension manager (store the pid of the sysfolder – next step)
Generate a new sysfolder for db store
Add new sysfolder

img-10

Add some TSconfig in the sysfolder settings to disable not needed fields of tt_address and fe_users
# Disable not needed fields in tt_address
TCEFORM.tt_address {
        hidden.disabled = 1
        company.disabled = 1
        gender.disabled = 1
        first_name.disabled = 1
        middle_name.disabled = 1
        birthday.disabled = 1
        mobile.disabled = 1
        description.disabled = 1
        addressgroup.disabled = 1
        tx_commerce_default_values.disabled = 1
        tx_commerce_fe_user_id.disabled = 1
        tx_commerce_address_type_id.disabled = 1
        tx_commerce_is_main_address.disabled = 1
        tx_rggooglemap_lng.disabled = 1
        tx_rggooglemap_display.disabled = 1
        tx_rggooglemap_lat.disabled = 1
        tx_rggooglemap_cat.disabled = 1
        tx_rggooglemap_tab.disabled = 1
        tx_rggooglemap_cat2.disabled = 1
        tx_rggooglemap_ce.disabled = 1

        #Rewrite table names
        last_name.label.default = Name (for invoice)
        last_name.label.de = Name (für Rechnung)
        title.label.default = Name Addition
        title.label.de = Namenszusatz
}

# Disable not needed fields in fe_users
TCEFORM.fe_users {
        hidden.disabled = 1
        fax.disabled = 1
        title.disabled = 1
        name.disabled = 1
        company.disabled = 1
        date_of_birth.disabled = 1
        zone.disabled = 1
        language.disabled = 1
        address.disabled = 1
        zip.disabled = 1
        city.disabled = 1
        country.disabled = 1
        static_info_country.disabled = 1
        by_invitation.disabled = 1
        image.disabled = 1
        TSconfig.disabled = 1
        lockToDomain.disabled = 1
        starttime.disabled = 1
        endtime.disabled = 1
        felogin_redirectPid.disabled = 1
        module_sys_dmail_html.disabled = 1
}
Add some database entries (needed if you want to add new accounts after that)
  • Add a new fe_users group in the sysfolder (called miniCRM)
  • Add some paypment possibilities (e.g. bank transfer, paypal, etc..)
  • Add some segments (e.g. agency, client, company)
  • Add some status points (e.g. briefing, rebriefing, finished)
  • Add some Accounttypes (e.g. client, partner, private)
Add a new account

Now you can add new accounts.

  • Each account can have one note, one address (tt_address), many contacts (fe_users) and many projects.
  • Each project can have many mails and many products

Configuration and Administration

Frontend Plugin

img-11

Explanation

You can decide which mode should be shown in the plugin

Account View

Will be implemented soon

Project View

Will be implemented soon

Invoice Generation

This will implement the invoice view – you can print any invoice.

img-12

Additional information to the Invoice Generation

You should add a new page with a complete new template – maybe an empty template:

page = PAGE
page.10 < styles.content.get
# don't forget to add css_styled_content and minicrm static template

Backend Module

img-13

img-14
Account list

img-15

img-16

Explanation

This is a list of your accounts with there name, with there quality for you, there domain, email address and one project title and the number of all projects

Some notes
  • Click on the account name opens the edit mode of TYPO3
  • Currently the first project of every account will be shown, but I think I will change this to the last project of the account
  • Click on the “add new Account” button let you open a new account (don't forget to set the pid of your storing folder in the extension manager before!)
  • CSV or XLS Export is possible(csv files can be opened with excel, and you can say excel, that evere column is separated by a comma, to split the columns)
Project list

img-17

img-18

Explanation

This is a list of your projects with there name and the account, the invoice number, the sum of the project and if it's already payed and the status

Some notes
  • Click on the project uid opens the edit mode of TYPO3
  • Click on the “add new Account” button let you open a new account (don't forget to set the pid of your storing folder in the extension manager before!)
  • CSV or XLS Export is possible(csv files can be opened with excel, and you can say excel, that evere column is separated by a comma, to split the columns)
  • Click on the print button opens the frontend (if you have added the URL to the printpage in the extension manager) of the invoiceview
Sales statistic

img-19

img-20

Explanation

This is a small invoice list with invoice date and -number and with project- and account title

Some notes
  • Click on the date opens the edit mode of TYPO3
  • Click on the “add new Account” button let you open a new account (don't forget to set the pid of your storing folder in the extension manager before!)
  • CSV or XLS Export is possible(csv files can be opened with excel, and you can say excel, that evere column is separated by a comma, to split the columns)
Custom lists

img-21

img-7

Explanation

Custom lists is a flexible possibility to give different users different list views.For the german readers: This is not a “Umsatzstatistik” - this is just an example view with a random name

Adding custom lists

You can use the TSconfig of a user or of a usergroup to add new views

img-22

Each view must be opened with miniCRM.customView.Yourname and can have this items:

Name

a

Name

b

Description

c

Example content

d

Obligation

title

a

title

b

Title for this custom list. Will be outputted in the dropdown list.

c

Account

d

obligation

tabletitles

a

tabletitles

b

Table Head (optional)

c

Account, Email, Project

d

optional

select

a

select

b

SQL select (don't forget to call the tablename)

c

tx_minicrm_account.title

d

obligation

where

a

where

b

SQL where (to filter the output)

c

tx_minicrm_status.uid = 1

d

optional

groupby

a

groupby

b

SQL groupby (group by something)

c

tx_minicrm_account.uid

d

optional

orderby

a

orderby

b

SQL orderby (sort by a field)

c

tx_minicrm_mails.crdate DESC

d

optional

limit

a

limit

b

Limit the output

c

20

d

optional

Example code
miniCRM {
        customView {
                any1 {
                        title = Salesstatistic
                        tabletitles = Account, Notiz, Projekt, E-Mail, Tel, Bezahlung, Mail
                        select = tx_minicrm_account.title a_title, tx_minicrm_notes.title n_title, tx_minicrm_project.title p_title, tt_address.email, fe_users.telephone, tx_minicrm_payment.title pay_title, tx_minicrm_mails.title mailtitle
                        where =
                        groupby = tx_minicrm_account.uid
                        orderby =
                        limit =
                }
                any2 {
                        title = Mailstatistic
                        select = tx_minicrm_account.title
                        groupby = tx_minicrm_account.uid
                        where = tx_minicrm_account.uid = 11
                }
        }
}
Some notes
  • Always use tablename in the selection:select = tablename.fieldname
  • If there are same fieldnames in different tables which you want to display, so rewrite them:select = tx_minicrm_account.title accounttitle, tx_minicrm_notes.title notetitle
  • If you want to display each account only one time, but the account is shown more than one time (because of more projects e.g.), you can use groupby:groupby = tx_minicrm_account.uid
  • CSV Export is possible (csv files can be opened with excel, and you can say excel, that evere column is separated by a comma, to split the columns)
  • If you want that the first row is clickable to edit the account, you have to add this to the selectfields:“tx_minicrm_account.uid _auid”This automaticle enables a wrap that the first field leads you to edit the account
Further examples

img-23

img-24 “Offene Zahlungen” => Not payed projects

img-25 “Offener Betrag (gesamt)” => Not payed projects (overall sum)

img-26 “Umsatz (YYYY)” => sales volume (YYYY)

# This is the tsconfig of my BE user:
miniCRM {
        customView {
                view1 {
                        title = Offene Zahlungen
                        select = FROM_UNIXTIME(tx_minicrm_project.invoicedate, "%d.%m.%Y"), tx_minicrm_project.invoiceno, tx_minicrm_project.title, tx_minicrm_account.title at, if (sum(tx_minicrm_products.amount * tx_minicrm_products.price) > 0, sum(tx_minicrm_products.amount * tx_minicrm_products.price), 0), tx_minicrm_status.title st, tx_minicrm_account.uid _auid
                        groupby = tx_minicrm_project.uid
                        where = tx_minicrm_project.payed = 0
                        orderby = tx_minicrm_project.invoicedate DESC
                }

                view2 {
                        title = Offener Betrag (gesamt)
                        select = sum(tx_minicrm_products.amount * tx_minicrm_products.price)
                        where = tx_minicrm_project.payed = 0
                }
                umsatz2007 {
                        title = Umsatz (2007)
                        select = sum(tx_minicrm_products.amount * tx_minicrm_products.price)
                        where = tx_minicrm_project.invoicedate > 1167609600 AND tx_minicrm_project.invoicedate < 1199145600
                }
                umsatz2008 {
                        title = Umsatz (2008)
                        select = sum(tx_minicrm_products.amount * tx_minicrm_products.price)
                        where = tx_minicrm_project.invoicedate > 1199145600 AND tx_minicrm_project.invoicedate < 1230768000
                }
                umsatz2009 {
                        title = Umsatz (2009)
                        select = sum(tx_minicrm_products.amount * tx_minicrm_products.price)
                        where = tx_minicrm_project.invoicedate > 1230768000 AND tx_minicrm_project.invoicedate < 1262304000
                }
        }
}

Typoscript Settings

Constants
###
# This are the default TS-constants for miniCRM
##

plugin.minicrm {

        # cat=plugin.minicrm//0010; type=file[html,htm,tmpl,txt]; label= Template File list: HTML-template file for list view (see EXT:minicrm/files/templates/tmpl_list.html for an example)
        template.list = EXT:minicrm/files/templates/tmpl_list.html

        # cat=plugin.minicrm//0020; type=file[html,htm,tmpl,txt]; label= Template File invoice: HTML-template file for invoice generation (see EXT:minicrm/files/templates/tmpl_invoice.html for an example)
        template.invoice = EXT:minicrm/files/templates/tmpl_invoice.html

        # cat=plugin.minicrm//0100; type=boolean; label= Invoice without login: If you want to show your invoice generator in the frontend without BE or FE Login, use this checkbox (e.g. 1)
        invoice.withoutLogin = 0

}
Setup
# miniCRM PLUGIN #
includeLibs.tx_minicrm_pi1 = EXT:minicrm/pi1/class.tx_minicrm_pi1.php
includeLibs.minicrm_misc = EXT:minicrm/lib/user_minicrm_misc.php
page.includeCSS.file31411 = EXT:minicrm/files/css/minicrm_invoice.css
page.includeCSS.file31411.media = screen
page.includeCSS.file31412 = EXT:minicrm/files/css/minicrm_invoice.css
page.includeCSS.file31412.media = print
page.includeCSS.file31413 = EXT:minicrm/files/css/minicrm_invoice_noprint.css
page.includeCSS.file31413.media = print

plugin.tx_minicrm_pi1 = USER
[globalVar = GP:cHash = ]
plugin.tx_minicrm_pi1 = USER_INT
[end]

plugin.tx_minicrm_pi1 {
        includeLibs < includeLibs.tx_minicrm_pi1
        userFunc = tx_minicrm_pi1->main

        # Constants
        template.list = {$plugin.minicrm.template.list}
        template.invoice = {$plugin.minicrm.template.invoice}
        invoice.withoutLogin = {$plugin.minicrm.invoice.withoutLogin}

        # Print invoices
        invoice {
                # stdWrap for fields
                field {
                        address_name = TEXT
                        address_name.field = address_name

                        address_title = TEXT
                        address_title.field = address_title

                        address_email = TEXT
                        address_email.field = address_email

                        address_phone = TEXT
                        address_phone.field = address_phone

                        address_fax = TEXT
                        address_fax.field = address_fax

                        address_mobile = TEXT
                        address_mobile.field = address_mobile

                        address_www = TEXT
                        address_www.field = address_www

                        address_address = TEXT
                        address_address.field = address_address

                        address_city = TEXT
                        address_city.field = address_city

                        address_zip = TEXT
                        address_zip.field = address_zip

                        address_region = TEXT
                        address_region.field = address_region

                        address_country = TEXT
                        address_country.field = address_country

                        project_title = TEXT
                        project_title.field = project_title

                        project_invoiceno = TEXT
                        project_invoiceno.field = project_invoiceno

                        project_invoicedate = TEXT
                        project_invoicedate.field = project_invoicedate
                        project_invoicedate.strftime = %d. %B %Y

                        project_startdate = TEXT
                        project_startdate.field = project_startdate
                        project_startdate.strftime = %d. %B %Y

                        product_amount = TEXT
                        product_amount.field = product_amount

                        product_description = TEXT
                        product_description.field = product_description

                        product_productnumber = TEXT
                        product_productnumber.field = product_productnumber

                        product_price = USER
                        product_price {
                                userFunc = user_minicrm_misc->minicrm_number_format
                                userFunc {
                                        number = TEXT
                                        number.field = product_price

                                        decimal = 2
                                        dec_point = ,
                                        thousands_sep = .
                                }
                        }

                        product_pricesum = USER
                        product_pricesum {
                                userFunc = user_minicrm_misc->minicrm_number_format
                                userFunc {
                                        number = TEXT
                                        number.field = product_pricesum

                                        decimal = 2
                                        dec_point = ,
                                        thousands_sep = .
                                }
                        }

                        overall = USER
                        overall {
                                userFunc = user_minicrm_misc->minicrm_number_format
                                userFunc {
                                        number = TEXT
                                        number.field = overall

                                        decimal = 2
                                        dec_point = ,
                                        thousands_sep = .
                                }
                        }
                }
        }

}

tt_content.minicrm_pi1 = COA
tt_content.minicrm_pi1 {
        10 < lib.stdheader
        20 < plugin.tx_minicrm_pi1
}
tt_content.list.20.minicrm_pi1 < plugin.tx_minicrm_pi1

Extension Manager Settings

If you install the extension the first time, you will see some settings in the extension manager

img-27

Name

a

Name

b

Description

c

Example content

d

Default value

storePID

a

storePID

b

Store PID: Enter the page id in which your minicrm values are stored (This is used for the backend module)

c

89

d

1

invoiceURL

a

invoiceURL

b

URL to Invoice: Enter the complete URL to your invoice generator, if you want to use print from Backend

d

Database corner

Database relations

img-28 Relations for version 0.0.3

Database tables and fields which could be used from you

Table

a

Table

b

Field

c

Description

tx_minicrm_account

a

tx_minicrm_account

b

uid

c

Filter possibility

tx_minicrm_account

a

tx_minicrm_account

b

crdate

c

Filter possibility

tx_minicrm_account

a

tx_minicrm_account

b

hidden

c

Possibility to hide whole account

tx_minicrm_account

a

tx_minicrm_account

b

title

c

Main Title for Account

tx_minicrm_project

a

tx_minicrm_project

b

uid

c

Filter possibility

tx_minicrm_project

a

tx_minicrm_project

b

crdate

c

Filter possibility

tx_minicrm_project

a

tx_minicrm_project

b

hidden

c

Hide project

tx_minicrm_project

a

tx_minicrm_project

b

title

c

Project title

tx_minicrm_project

a

tx_minicrm_project

b

invoiceno

c

Invoice number

tx_minicrm_project

a

tx_minicrm_project

b

invoicedate

c

Invoice date

tx_minicrm_project

a

tx_minicrm_project

b

payed

c

Project alreay payed

tx_minicrm_project

a

tx_minicrm_project

b

upload

c

Uploaded files

tx_minicrm_project

a

tx_minicrm_project

b

description

c

Project description

tx_minicrm_products

a

tx_minicrm_products

b

uid

c

Filter possibility

tx_minicrm_products

a

tx_minicrm_products

b

crdate

c

Filter possibility

tx_minicrm_products

a

tx_minicrm_products

b

sorting

c

Filter possibility

tx_minicrm_products

a

tx_minicrm_products

b

hidden

c

Filter possibility

tx_minicrm_products

a

tx_minicrm_products

b

title

c

Product title

tx_minicrm_products

a

tx_minicrm_products

b

productnumber

c

Product number

tx_minicrm_products

a

tx_minicrm_products

b

price

c

Product Price

tx_minicrm_products

a

tx_minicrm_products

b

amount

c

Number of element (e.g. hours)

tx_minicrm_products

a

tx_minicrm_products

b

description

c

Product description

tx_minicrm_products

a

tx_minicrm_products

b

description_intern

c

Intern product description

tx_minicrm_notes

a

tx_minicrm_notes

b

uid

c

Filter possibility

tx_minicrm_notes

a

tx_minicrm_notes

b

crdate

c

Filter possibility

tx_minicrm_notes

a

tx_minicrm_notes

b

hidden

c

Filter possibility

tx_minicrm_notes

a

tx_minicrm_notes

b

title

c

Notes title

tx_minicrm_notes

a

tx_minicrm_notes

b

description

c

Notes description

tx_minicrm_notes

a

tx_minicrm_notes

b

payment_behavior

c

Payment behaviour of your client

tx_minicrm_notes

a

tx_minicrm_notes

b

quality

c

Clients quality

tx_minicrm_notes

a

tx_minicrm_notes

b

fussy

c

Is this a fussy client

tx_minicrm_payment

a

tx_minicrm_payment

b

title

c

Payment method

tx_minicrm_segment

a

tx_minicrm_segment

b

title

c

Segment of your title

tx_minicrm_status

a

tx_minicrm_status

b

title

c

Project status

tx_minicrm_mails

a

tx_minicrm_mails

b

hidden

c

Filter possibility

tx_minicrm_mails

a

tx_minicrm_mails

b

title

c

Mail title

tx_minicrm_mails

a

tx_minicrm_mails

b

kind

c

What kind of way was used (email, phone)

tx_minicrm_mails

a

tx_minicrm_mails

b

date

c

Date and time of mail

tx_minicrm_mails

a

tx_minicrm_mails

b

text

c

bodytext

tx_minicrm_mails

a

tx_minicrm_mails

b

upload

c

Attached files

tx_minicrm_mails

a

tx_minicrm_mails

b

way

c

Ingoing or Outgoing

tt_address

a

tt_address

b

last_name

c

Name of account (company name)

tt_address

a

tt_address

b

address

c

Account address

tt_address

a

tt_address

b

zip

c

Account zip code

tt_address

a

tt_address

b

city

c

Account city

tt_address

a

tt_address

b

region

c

Region where the account is located

tt_address

a

tt_address

b

country

c

Account country

tt_address

a

tt_address

b

email

c

Account main email (info@...)

tt_address

a

tt_address

b

www

c

Account homepage

tt_address

a

tt_address

b

phone

c

Account phone

tt_address

a

tt_address

b

fax

c

Account fax

tt_address

a

tt_address

b

image

c

Account images (logo)

fe_users

a

fe_users

b

username

c

You have to fill it out, because of mandatory setttings

fe_users

a

fe_users

b

password

c

You have to fill it out, because of mandatory setttings

fe_users

a

fe_users

b

usergroup

c

You have to fill it out, because of mandatory setttings

fe_users

a

fe_users

b

name

c

Contact name

fe_users

a

fe_users

b

disable

c

Filter possibility

fe_users

a

fe_users

b

phone

c

Contact phone number

fe_users

a

fe_users

b

fax

c

Contact fax number

fe_users

a

fe_users

b

email

c

Contact email

Known problems

Please post known problems and bugs directly to forge at:

http://forge.typo3.org/projects/extension-minicrm/issues

To-Do list

  • Check if we need some more fields
  • Support for tax in the invoice
  • PDF generation of invoices
  • Add some functions to the backend module
  • Add some functions to the frontend plugin
  • And a lot of other strange stuff :)

Do you need a new feature? Maybe I can help you, so just write me – contact possibilty at www.einpraegsam.net

ChangeLog

Version 0.1.x alpha

Update on 15.10.2009 version 0.1.8
  • Open invoiceview from the backend
  • Printbutton to invoice view added
Update on 09.10.2009 version 0.1.7

Feature #4929: Backend: Show latest invoicenumber

Update on 25.08.2009 version 0.1.6

Bugfix #3809: Backend: Generate new entry link won't work on some installations

Update on 27.05.2009 version 0.1.5
  • Fix in dynamic typoscript function
  • Small change in the listview in BE
Update on 29.04.2009 version 0.1.4

Further BE bugfixes

Update on 27.04.2009 version 0.1.3

Small bugfixes

Update on 24.04.2009 version 0.1.2

Print invoices in frontend now

Update on 22.04.2009 version 0.1.1
  • Some important changes in the database settings
  • Bugfix in Backend Module
  • Prepared first frontend plugin
Update on 20.04.2009 version 0.1.0
  • Backend Module: Sales View added
  • Backend Module: Project View added
  • Backend Module: Link to edit accounts
  • Backend Module: Hook added to implement furter views

Version 0.0.x alpha

Update on 19.04.2009 version 0.0.4

Backend Module: Account list available

Update on 19.04.2009 version 0.0.3
  • Backend Module: Custom lists available
  • Manual changes
Update on 18.04.2009 version 0.0.2
  • Many fixes in Database relations
  • Upload fields added for projects and mails
  • Some sortings added
Initial release on 17.04.2009 version 0.0.1
  • Database model with IRRE implemented
  • Prepared backend module
  • Prepared frontend plugin