enjoyscms/catalog

There is no license information available for the latest version (6.0.0) of this package.

Module Catalog for EnjoysCMS

Installs: 890

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 2

Type:enjoyscms-module

6.0.0 2024-01-14 11:35 UTC

README

  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