Skip to content

Commit

Permalink
Brands refactor (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Jan 23, 2025
1 parent 7e15cf4 commit e7bf04c
Show file tree
Hide file tree
Showing 28 changed files with 344 additions and 687 deletions.
76 changes: 0 additions & 76 deletions UPGRADING.md

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
"require": {
"php": "^8.1|^8.2",
"justbetter/statamic-glide-directive": "^2.1",
"rapidez/blade-directives": "^1.0",
"rapidez/blade-directives": "^0.6",
"rapidez/core": "^2.13|^3.0",
"rapidez/sitemap": "^1.1",
"spatie/once": "*",
"statamic-rad-pack/runway": "^7.6",
"statamic/cms": "^5.29",
"statamic/eloquent-driver": "^4.9",
"tdwesten/statamic-builder": "^1.0",
"tdwesten/statamic-builder": "dev-main",
"tormjens/eventy": "^0.8"
},
"autoload": {
Expand Down
6 changes: 0 additions & 6 deletions config/rapidez/statamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

// Which collection and blueprint should be used for importing products?
'import' => [
'categories' => [
'collection' => 'categories',
'blueprint' => 'category',
],
'brands' => [
'collection' => 'brands',
'blueprint' => 'brand',
Expand Down Expand Up @@ -58,14 +54,12 @@

\Rapidez\Statamic\Models\Category::class => [
'name' => 'Categories',
'read_only' => true,
'title_field' => 'name',
'cp_icon' => 'array',
],

\Rapidez\Statamic\Models\Brand::class => [
'name' => 'Brands',
'read_only' => true,
'title_field' => 'value_store',
'cp_icon' => 'tags',
'order_by' => 'sort_order',
Expand Down
15 changes: 14 additions & 1 deletion config/rapidez/statamic/builder.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
<?php

use Rapidez\Statamic\Collections\Brands;
use Rapidez\Statamic\Collections\Categories;
use Rapidez\Statamic\Collections\Products;

return [
'collections' => [
Products::class,
Categories::class,
]
Brands::class,
],

// It can occur that you're using a Hybrid Runway resource,
// but you want to have routing for that Hybrid Runway resource.
// You can enable the routing by specifying the routes here, they will automaticly
// be added to your Hybrid Runway resource.
// For example:
// 'routes' => [
// Brands::class => [
// 'default' => '{slug}'
// ],
// ]
];
39 changes: 0 additions & 39 deletions resources/blueprints/collections/brands/brand.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions resources/blueprints/collections/categories/category.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions resources/blueprints/collections/pages/page.yaml

This file was deleted.

61 changes: 38 additions & 23 deletions resources/blueprints/runway/brand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,42 @@ tabs:
-
fields:
-
handle: option_id
field:
type: integer
localizable: false
visibility: read_only
-
handle: sort_order
field:
type: integer
localizable: false
visibility: read_only
-
handle: value_admin
field:
type: text
localizable: false
visibility: read_only
-
handle: value_store
field:
type: text
localizable: false
visibility: read_only
import: page_builder
meta:
display: Meta
sections:
-
fields:
-
import: meta_data

magento:
display: Magento
sections:
-
fields:
-
handle: option_id
field:
type: integer
localizable: false
visibility: read_only
-
handle: sort_order
field:
type: integer
localizable: false
visibility: read_only
-
handle: value_admin
field:
type: text
localizable: false
visibility: read_only
-
handle: value_store
field:
type: text
localizable: false
visibility: read_only
title: Brand
7 changes: 7 additions & 0 deletions resources/blueprints/runway/category.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
tabs:
main:
sections:
-
fields:
-
import: page_builder
magento:
display: Magento
sections:
-
fields:
-
Expand Down
9 changes: 7 additions & 2 deletions resources/blueprints/runway/product.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
tabs:
main:
sections:
-
fields:
-
import: page_builder
magento:
display: Magento
sections:
-
fields:
-
Expand All @@ -21,5 +28,3 @@ tabs:
type: text
localizable: false
visibility: read_only
-
import: page_builder
13 changes: 0 additions & 13 deletions resources/content/collections/brands.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions resources/content/collections/categories.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions resources/content/collections/pages.yaml

This file was deleted.

Loading

0 comments on commit e7bf04c

Please sign in to comment.