enjoyscms/catalog

Module Catalog for EnjoysCMS



Documentation

  1. Added to doctrine config in /di/doctrine.php
use Gedmo\Tree\TreeListener;

$evm = new EventManager();
$treeListener = new TreeListener();
$evm->addEventSubscriber($treeListener);
  1. Define in DI \Psr\EventDispatcher\EventDispatcherInterface

  2. Diff migration, migrate and clear cache-metadata

composer diff
composer migrate
  1. Migration function
./vendor/bin/doctrine-migrations  migrations:generate
//for Mysql insert to migration

$this->addSql(<<<SQL
CREATE FUNCTION CONVERT_PRICE(
    `price` INT,
	`main_currency` VARCHAR(3),
	`convert_currency` VARCHAR(3)
) RETURNS double
    DETERMINISTIC
BEGIN
	IF (main_currency = convert_currency)
	THEN
		SET @result = price;
	ELSE
		SET @rate = (SELECT rate FROM catalog_currency_rate WHERE
			main = main_currency
			AND `convert` = convert_currency
		);
		SET @result = price * @rate;
	END IF;
RETURN @result;

END;
SQL);
composer migrate
  1. Setting elfinder

Options

  • disableEditProductCode bool
  • allowedPerPage int
  • productImageStorage string
  • storageUploads array
  • productFileStorage string
  • thumbnailService array
  • adminTemplateDir string
  • editor array
    • productDescription
    • categoryDescription
    • categoryShortDescription
  • allowedPerPage int[]
  • sort string
  • minSearchChars int
  • showSubcategoryProducts bool
  • delimiterOptions string
  • allocatedMemoryDynamically bool
  • currency array
    • default string
    • ratio array
  • admin array
    • searchFields array