Download the PHP package remp/crm-salesfunnel-module without Composer

On this page you can find all versions of the php package remp/crm-salesfunnel-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package crm-salesfunnel-module

CRM SalesFunnel Module

Translation status @ Weblate

Installing module

We recommend using Composer for installation and update management.

Enabling module

Add installed extension to your app/config/config.neon file.

Configuration

By default we register for every sales funnel short route (e.g. for sales funnel with URL key sample, route is http://crm.press/sample). You can turn off registration of slug by adding following setting to configuration file.

Sales funnel will be still accessible through long route (e.g. http://crm.press/sales-funnel/sales-funnel-frontend/show?funnel=sample).

Scheduled commands

Please add following commands to your scheduler:

Using sales funnels

Sales Funnel module provides a way to present subscription type offering to user in a way that's completely independent from the rest of application.

You can find list of available sales funnels and create new funnels in CRM admin (/sales-funnel/sales-funnels-admin/).

To create new sales funnel, you need to enter several fields (required are bold):

Once the funnel is created, there are more options that can be configured within the detail of created funnel:

The HTML content of funnel can be anything from very simple HTML form to micro JS application calling backend APIs and routing user through multi-step experience. Funnels support Twig templating and provide variables to be used within the template:

You can use/ignore any of these variables. They're provided to give your template information about user for you to decide what user should see.

Twig also provides a translation filter trans which can be used to translate strings within the template or encapsulate duplicated texts or messages across the funnels:

The final output of sales funnel should be POST request to /sales-funnel/sales-funnel-frontend/submit- either via HTML form or via AJAX request. The POST params should contain:

If the form is valid, backend will create new unfinished payment for the user and the server response will contain redirection to payment gateway.

Sample funnel

Module provides seeder with single demo funnel which contain very barebone bootstrap-based design and simple javascript handler to ask and validate user's email/password.

When the module is enabled, you can seed this funnel by running php bin/command.php application:seed and it will get available at /sample URL on your domain. You can (and should) also find your funnel in CRM admin (/sales-funnel/sales-funnels-admin/)as you still need to enable subscription types and gateways for this newly seeded funnel to work correctly.

If you want to only view the sample implementation of funnel, you can find it here.

Events and handlers

PaymentItemContainerReadyEvent

This event is emitted from SalesFunnelFrontedPresenter::renderSubmit after PaymentItemContainer was initialized and filled with base payment items (eg SubscriptionTypePaymentItem) but before payment is created.

All handlers which register listener for this event have access to whole PaymentItemContainer. It can be used to add payment items before payment is created and before customer is redirected to payment provider.

ExampleModule implementation

For example - your sales funnel contains specific donation input field with name specific_donation and you want to add it to the payment.

Create handler Crm\ExampleModule\Events\PaymentItemContainerReadyEventHandler:

And initialize listener in ExampleModule\ExampleModule.php

Newly created payment by SalesFunnel will now contain specific donation if sales funnel received this field.

Sales funnel twig variables and snippets

Registration

When using sales funnels you can also pass custom variables or use snippets feature provided by ApplicationModule Crm\ApplicationModule\Repositories\SnippetsRepository.

For this feature to work you need to register custom data provider which implements SalesFunnelVariablesDataProviderInterface in sales_funnel.dataprovider.twig_variables data provider path.

registration:

data provider example:

Usage within sales funnels

Snippet's name is changed to camel case with prefix snippet. So sales-funnel-common-header becomes:

Variables are accessible as provided. So your_custom_twig_variable will be:

Iframe deprecation in sales funnels

Deprecation

Because of modernization and multiple problems with using iframes as wrapper for sales funnels (eg. scrolling & focus issues on iOS devices), we stopped using iframe to render sales funnels.

Methods / routes that are now marked deprecated:

⚠️ They will be removed (or refactored) in CRM version 4.0.

Solution

This will be default solution If you are using Subscriptions:Subscriptions:new as default route, we recommend to update your config Default route (see Application category at https://crm.press/admin/config-admin/) to SalesFunnel:SalesFunnel:newPopup. This method loads and renders default sales funnel from config Default sales funnel (see Sales Funnels category) directly without using iframes.

You can register routes for your sales funnels directly in your custom module. For example:

For commonly used parts of sales funnel such as header, footer etc., you can use snippets feature provided by ApplicationModule.

Components

AmountDistributionWidget

Admin sales funnel detail distribution stats component.

Source code

How to use

DaysFromLastSubscriptionDistributionWidget

Admin sales funnel detail distribution stats component.

Source code

How to use

FinishRegistrationWidget

Frontend successful payment/registration widget.

Source code

How to use

NewSubscriptionWidget

Frontend new subscription widget with iframe containing sales funnel.

Source code

How to use

PaymentDistributionWidget

Admin sales funnel detail stats widget.

Source code

How to use

SalesFunnelUserListingWidget

Admin user listing widget.

Source code

How to use

SubscriptionTypesInSalesFunnelsWidget

Admin sales funnel detail subscription types listing.

Source code

How to use

WindowPreview

Admin sales funnel detail preview.

Source code

How to use


All versions of crm-salesfunnel-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remp/crm-salesfunnel-module contains the following files

Loading the files please wait ....