CoreShop 2.0.0 - FINAL


#1

Dear Pimcore Community,

it is DONE, finally. Over 1,5 years of development, CoreShop is now final. After exactly 2971 commits since 1.2.2, we made it. CoreShop is now final and ready.

CoreShop 2.0.0 was a complete rewrite. We focused on extendability, developer experience and decoupled Components and Bundles.

We also did a lot for better tests and making CoreShop more stable. CoreShop introduced Behat (behaviour driven development framework) to test as much as possible automated. We now also use static code analysis tools such as PHPStan and are already Level 2 compatible, with more optimizations to come.

Thanks a lot especially to @solverat for his outstanding contributions and help in making this possible. We had a lot of heated discussion during this time. We also had a lot of :beers: and fun working together on this.

For the people here, who don’t know what CoreShop is, here a quick summary:

CoreShop is a set of decoupled Components and Bundle that together provide the best ecommerce Solution for the Pimcore Ecosystem. It comes with following features:

  • Rich Backend natively integrated into Pimcore
  • Currency Management
  • Exchange Rates between Currencies
  • Country Management
  • Taxation
  • Payment Management - Configure different Payment Providers in the Backend
  • Complex Pricing Structure
    • Catalog Price Rules
    • Product Specific Price Rules
  • Cart Rules with or without Voucher Codes
  • Layered Navigation
  • Carrier Management
  • Complex Shipping Rules for Shipping Price Calculation
  • Order Management in Backend
  • Order Workflow
  • Multiple Order Invoices
  • Multiple Order Shipments
  • Quotes Management
  • Reporting
  • eCommerce Tracking
  • Checkout Management
  • Multi Store Support
  • Multi Theme

All of that on top of Pimcore. Every Part is extendable and changeable.

With this Release, we also promise a very strict backward compatibility until 3.0.0. Everything we do, will be backward compatible. Except for Models and Model Interfaces and things we cannot control directly: Pimcore, Symfony and Security Fixes.

Bundles/Components

As said earlier, CoreShop is completly decoupled and build on several Components and Bundles with the aim of reusability.

Index Bundle

Index Bundle allows you to create layered-navigations with Pimcore Objects. It is possible to create a index of objects and filter those. All of this is configured within the backend of Pimcore, that means that also Customers can create new Filters very easily.

The Bundle that makes that possible for you is: https://github.com/dpfaffenbauer/pimcore-object-index.

Resource Bundle

The Resource Bundle is the heart for every CRUD Operation in CoreShop. It defines the CoreShop Entities (Doctrine or Pimcore DAO) and handles create, update, delete and read for you. It also makes certain models extendable for your Bundle.

Pimcore Bundle

The Pimcore Bundle brings you a lot of Helpers to the Pimcore Ecosystem. It adds things like:

  • Twig Helpers. For Instance:
    • if asset is asset_image to test if a asset is actually a image
    • coreshop_path(object) creates a path by using the configured link-generator from the object
    • image_thumbail creates a image thumbnail from an asset image
    • image_thumbnail_html creates a image thubmnail html form an asset image
  • Expression Engine Placeholder - Everybody who knows about the Symfony Expression Engine, also knows how powerful it is. Thats why we integrated that into the Pimcore Placeholder Engine, you can do things like (within Email Documents for example):
    • %Expression(expression, {'expression' : 'parameter(\'kernel.environment\')'});
    • ‘%Expression(expression, {‘expression’ : ‘service(‘coreshop.money_formatter’).format(100, ‘EUR’, ‘en’)’});’
  • Migration Helpers: Pimcore 5 introduced Migrations which are awesome, CoreShop introduces some helpers to that:
    • SharedTranslations: Add new Shared Translation in a migration with a breece:
      CoreShop\Component\Pimcore\Migration\SharedTranslation::add('key', 'en', 'value');
  • Class Updater: Helps you in updating Pimcore classes from Code, like:
    use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
    
    $classUpdater = new ClassUpdate('Product');
    
    //Your JSON Definition from Pimcore
    $payment = [
        'fieldtype' => 'coreShopSerializedData',
        'phpdocType' => 'array',
        'allowedTypes' =>
            [
            ],
        'maxItems' => 1,
        'name' => 'paymentSettings',
        'title' => 'Payment Settings',
        'tooltip' => '',
        'mandatory' => false,
        'noteditable' => true,
        'index' => false,
        'locked' => null,
        'style' => '',
        'permissions' => null,
        'datatype' => 'data',
        'columnType' => null,
        'queryColumnType' => null,
        'relationType' => false,
        'invisible' => false,
        'visibleGridView' => false,
        'visibleSearch' => false,
    ];
    
    //Check if field exists
    if (!$classUpdater->hasField('paymentSettings')) {
        //If not insert field after a specific field and save the definition
        $classUpdater->insertFieldAfter('paymentProvider', $payment);
        $classUpdater->save();
    }
    
  • Helper Classes:
    • Version Helper: Disable/Enable Versioning as Closure: CoreShop\Component\Pimcore\DataObject\VersionHelper::useVersioning(\Closure $function, $enabled = true)
    • Inheritance Helper: Disable/Enable Inheritation as Closure: CoreShop\Component\Pimcore\DataObject\InheritanceHelper::useInheritedValues(\Closure $function, $inheritValues = true)
    • UnpublishedHelper Helper: Disable/Enable hiding of unpublished Objects as Closure: CoreShop\Component\Pimcore\DataObject\UnpublishedHelper::hideUnpublished(\Closure $function, $hide = false)

SEO Bundle

The SEO Bundle helps you solving a very common issue regarding SEO. Everybody, propably had once in his Pimcore Lifetime, had the issue of adding things like Open Graph Tags, or some other kind of meta-tags. The SEO Bundle helps you solving that using Extractors. You just pass in any kind of PHP object (either a Pimcore DataObject, or even a Pimcore Document, or maybe also a string), and the Extractors extract the needed Information for you, more about that here: https://www.coreshop.org/docs/2.0.0/Bundles/SEO_Bundle.html

Thanks again to everyone involved in CoreShop, it was a nice ride and will be even better in the Future :slight_smile:

Cheers
Dominik


#2

Great work! I look forward to trying it out.