Back to marketplace
120

eCommerce

Buy now

Sell access to the platform, spaces, groups, events, hidden messages, or physical products.

Stripe

In development mode, the subscription start date is the one of the customer "Current simulation time" (instead of the date of creation of the subscription). This can be changed by editing the customer: https://dashboard.stripe.com/test/customers -> Select the customer -> "Advance time".

Advancing time allows simulating time advancing very quickly to test events such as arriving to the expiration date.

Paypal

Sandbox accounts:

Create a new purchasable product type from a module

  1. Implement \humhub\modules\ecommerce\models\interfaces\PurchasableInterface to the ActiveRecord class you want to sell.

  2. Add an event in the module config.php file:

        [
            'class' => \yii\base\Model::class,
            'event' => 'ecommerce.productTypes.getAvailableTypes',
            'callback' => [Events::class, 'onEcommerceProductTypesGetAvailableTypes'],
        ],
  1. Implement the onEcommerceProductTypesGetAvailableTypes method in the Events class (replace ProductToSellClass by your class implementing PurchasableInterface):
    public static function onEcommerceProductTypesGetAvailableTypes(\humhub\components\Event $event): void
    {
        $event->result[] = ManagedEvent::getEcommerceProductType();
    }
  1. Add a new product type in the eCommerce administration, select your product type, and enter the IDs of the products you want to sell.

Models diagram

Developer Models Diagram

Module Information

Price:
360 €
Latest version release:
2.4.0 - December 16, 2024
Publisher:
Author(s):
Website:
Compatibility:
HumHub 1.15 - 1.17