growtask / simflex-catalog
Catalog plugin for Simflex
dev-master
2024-06-11 07:24 UTC
Requires
- php: >=8.0.0
- ext-gd: *
- ext-json: *
- ext-pdo: *
This package is auto-updated.
Last update: 2024-12-11 08:31:52 UTC
README
Installation
composer require growtask/simflex-catalog
- Add all components to
routes.php
- Init
PriceManager
inInit.php
:
Container::set('price', new PriceManager());
- Init sessions:
if (SF_LOCATION == SF_LOCATION_SITE) { \App\Extensions\Catalog\CategoryAssist::loadCounts(); $user = Container::getUser(); \App\Extensions\Catalog\SessionAssist::$cart = \App\Extensions\Catalog\Model\Cart::getOrInsert( $user ? $user->user_id : 0 ); \App\Extensions\Catalog\SessionAssist::$fav = \App\Extensions\Catalog\Model\Fav::getOrInsert( $user ? $user->user_id : 0 ); \App\Extensions\Catalog\SessionAssist::$compare = \App\Extensions\Catalog\Model\Compare::getOrInsert( $user ? $user->user_id : 0 ); }