Go to file Use this template
Brandon Shipley c8e44f3705
CI / testsuite (mysql, 8.2, ) (push) Has been cancelled Details
CI / testsuite (mysql, 8.4, ) (push) Has been cancelled Details
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Has been cancelled Details
CI / Coding Standard & Static Analysis (push) Has been cancelled Details
read me update
2025-11-04 02:10:37 -08:00
.gitea/workflows missed php 8.1 in ci.yaml 2025-09-05 23:34:57 -07:00
.github/workflows gitea and github ci workflows 2025-03-27 01:48:12 -07:00
config subscribtion category variants / system category variants 2025-11-04 01:50:05 -08:00
src subscribtion category variants / system category variants 2025-11-04 01:50:05 -08:00
templates read me update 2025-11-04 02:10:37 -08:00
tests subscribtion category variants / system category variants 2025-11-04 01:50:05 -08:00
webroot upload test passing + file not getting deleted every time - well it is but we now use a copy lol 2025-08-10 02:50:22 -07:00
.gitignore gitignore, product photos fixture, copy/delete in base controller test setUp/tearDown 2025-08-19 01:13:13 -07:00
LICENSE license update use MIT 2025-04-07 23:57:41 -07:00
README.md read me update 2025-11-04 02:10:37 -08:00
composer.json added suggested cart package 2025-10-11 22:50:44 -07:00
phpunit.xml.dist not used to plugin testing - trying to get working but fixtures not working yet 2025-03-26 00:07:05 -07:00

README.md

CakeProducts plugin for CakePHP

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install is:

composer require hi-powered-dev/cake-products

Be sure to run the DB migrations:

bin/cake migrations migrate -p CakeProducts

And the DB seed(s):

bin/cake migrations seed -p CakeProducts

You can either load the plugin with routes enabled to use default controller actions, or just use/extend the database structure and use your own controllers

Database Structure

Products belong to ProductCategories, ProductCategories is hierarchical and belongs to ProductCatalogs.

ProductCategoryAttributes belongs to ProductCategories and attributes are inherited from their parents up the category tree.

ProductCategoryAttributes can have many ProductCategoryAttributeOptions (constrained attributes)

ProductCategoryVariants are templates/common starting points for variants - when adding a new product in that category it is easy to toggle on that category variant so the product uses the variant

ProductCategoryVariantOptions are the various options for each category variant

ProductVariants are the assigning of category variants to a product. A product can have as many variants as it's category has category variants. A variant must exist at the category level in order to be assigned to a product.

Products can have many ProductSkus. A ProductSku is a specific combination of variant options - using a T-Shirt with a size and a color variant for example, the ProductSku would be a Red XL T-Shirt. Not all variant combinations need be used.

ProductSkuVariantValues is where the variant values of each SKU are stored.

Suggested Plugins

Use the CakeCarts plugin to quickly enable shopping cart functionality with your products CakeCarts

composer require hi-powered-dev/cake-carts