ItemManager

Downloads: 4429
Category: Plugin
Compatible with: GetSimple 3.2.1 - 3.3

Last Updated: August 15, 2018
Tags: catalog shop blog article lists data management database emulator flat-file framework
Author: Bigin
Author Website: https://ehret-studio.com
Support: Support Forum

(4.4) 18 Votes

Plugin Description:

ItemManager 2

ItemManager (IM) is a simple flat-file framework for GetSimple-CMS that allows you to develop completely customisable PHP applications bundled with GetSimple-CMS.

ItemManager offers you a XML data management in just as straightforward a manner as if you were working with a real database. ItemManager’s powerful API is very easy and enjoyable.

Design any type of product lists (items), search and filter through the items lists by using flexible API functions. You can create a random set of categories and fields, each category is assigned any number of fields and each item is assigned to one category, that represent the underlying data structure of ItemManager, which allows a countless design combinations.

If you are going to create a new GetSimple plugin, no matter whether kind of processing logic and complexity: a blog, shopping cart, user management or just a simple script, be sure that ItemManager will help you realise your goals. Stop wasting your effort re-inventing the wheel, ItemManager takes care of the basic data management, getter, setter methods and any XML data storage processes for your plugin properties, while you may continue to focus on more important things.

What can be achieved with ItemManager?

The use of ItemManager allows a very variable field of application, ItemManager can be used to create tools and plugins:

  • Product -lists, -catalogs
  • eCommerce plugins
  • Image galleries
  • Blogs
  • User management tools
  • Varios data storage
  • Basic data structures for applications and plugins
  • Settings and data storages for other plugins
  • Depiction of complex Informations in Tables
  • Masks, search functions
  • Substitutions for small databases
  • etc

Usage:

First of, create an instance of the ItemManager core (It should be called at least once in your code):

$imanager = imanager();

Here's an example, should you want to save your data in order to be able to use it again later on, just do this:

$item = new Item(1);
$item->name = 'My item name';
$item->setFieldValue('data', 'Hello world');
$item->save();

In order to bring the data into display again do:

$item = imanager()->getItem(1, 'name=My item name');
echo $item->fields->data->value; // Outputs: Hello world

The most quickest way to get a specific item is by using the item ID and category ID, there is an example:

$item = $imanager->getItem(1, 2)

where the first parameter is the category ID and the second an item ID.

To get a specific item via the field name you could do:

$item = $imanager->getItem('slug=category-slug', 'fieldname=item_field_name');

More infos about ItemManager's items: Working with Items

Access a category:

$category = $imanager->getCategory(1);

If you want to find one category on a specific attributes like: id, name, slug, position, created, updated, do following:

// via the category slug
$category = $imanager->getCategory('slug=my-category-slug');
// category name 
$category = $imanager->getCategory('name=My Category Name');
// position
$category = $imanager->getCategory('position=2');
// ...

More infos about ItemManager's categories: Working with Categories

For more information how to use ItemManager API see also: https://ehret-studio.com/articles/itemmanager/

Tutorials, tips & experiments

ItemManager extensions and plugins:

Changelog:

2.4.3

BUGFIX: Datepicker CSS included

2.4.2

MODIFICATION: Minimal style adjustments and GS 3.4-Alpha adaptations
BUGFIX: in combination with IM Extra Fields usage

2.4.1

BUGFIX: Issue when rekursive selectig SimpleItem objects.

NEW: An ItemMapper method for selecting single SimpleItem objects: ItemMapper::getSimpleItem((string|int) selector, (array) items (optional))

2.3.8 / 2.3.9

NEW: Item Allocator class - makes easy and quickly work with a huge number of items 1000 and more. Also, it simplifies the use of item object, as only the light-weigth objects will be loaded into the memory, therefore overhead will be also significant reduced. Usage example

NOTE: You can deactivate this function at any time via the $this->useAllocater = false in /plugins/imanager/lib/inc/config.php file.

NEW: FieldFilepicker - File picker field has been implemented, which makes it possible, using the functions of i18n_customfields plugin, the use of GetSimple native images and files from uploads directory - at this point many thanks to tomot for his help!

NOTE: This field is enabled only if "i18n_customfields" plugin is in the GS /plugins/ directory (no installation is necessary).

MODIFICATION: CSS - Minimal style changes of pagination and field width.

MODIFICATION: FieldImageupload - Is deprecated and was replaced with a newer FieldFileupload field. For compatibility reasons, the FieldImageupload is still supported, though no longer available when selecting the fields in back-end.

BUGFIX: FieldDatepicker - When selecting the date, when the date format was not specified.

BUGFIX: FieldDatepicker - When you are use several date picker fields (thanks to tomot).

BUGFIX: Check reserved field names when you save category fields.

BUGFIX: Message Reporter - Multiple messages rendering.

BUGFIX: Setup - The date format issue (thanks to morvy for reporting this bug).

BUGFIX: Template Engine - fixed some minor bugs.

BUGFIX: FontAwesome - Restrict include to back-end (thanks to morvy).

and more ...

Install Instructions:

Installation Instructions:

Installing ItemManager 2.* from the ZIP file: You can download the current version of the ItemManager on GitHub. Unzip the downloaded file and copy its contents to your plugins folder. The required data directories and configurations should be created automatically when you first access the plugin. Make sure that PHP-process has enough security permissions to access these files.

Upgrading ItemManager 2.* from the ZIP file:
ItemManager upgrades are easy because everything important to your site is contained under the /data/imanager/ and /data/uploads/imanager/ directory. You should delete everything else in /plugins/ directory that belongs to the ItemManager and leave the both directories above as it is.

Upgrading ItemManager 2.* to 2.4.2:
Download the latest version of ItemManager GitHub
Extract the ZIP file somewhere temporary.
Delete the following file from your /plugins/ directory:

Delete: /plugins/imanager folder
Delete: /plugins/imanager.php file
Upload the new version imanager folder to /plugins/ directory
Upload the new version imanager.php to /plugins/ directory

NOTE: Backup any files you replace or delete!

Archived Versions:

These are old versions of this file. Please use with caution as they are probably out of date and no longer supported. ShowHide