Skip to content

Commit

Permalink
Initial commit (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Apr 9, 2024
1 parent 6831417 commit f46aca5
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 375 deletions.
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
# Rapidez :package_name_without_prefix
<!--delete-->
This repository can be used as template for a new Rapidez package.
# Rapidez mirasvit-label

- Click on "Use this template" on the top of this Github repo page
- Run `php ./configure.php`
This package adds Mirasvit label compatibility to Rapidez.

Credits to [`spatie/package-skeleton-laravel`](https://github.com/spatie/package-skeleton-laravel) for the inpiration for this template.

Keep in mind that if you contribute to this template; it should work for official and unofficial packages!
- `rapidez/something`
- `someone/rapidez-something`
<!--/delete-->
:package_description
## Requirements
For this module to work you need to have the [Mirasvit labels](https://mirasvit.com/magento-2-extensions/product-labels.html) module installed.

## Installation

```
composer require :vendor_slug/:package_slug
```

## Configuration

You can publish the config with:
```
php artisan vendor:publish --tag=rapidez-:package_slug_without_prefix-config
composer require rapidez/mirasvit-label
```

## Views

You can publish the views with:
```
php artisan vendor:publish --tag=rapidez-:package_slug_without_prefix-views
php artisan vendor:publish --tag=mirasvitlabel-views
```

### Product page
Add `@include('mirasvitlabel::product.label')` where you'd like to display the labels, most likely somewhere around the images: `resources/views/vendor/rapidez/product/overview.blade.php`.

### Category page
Add `@include('mirasvitlabel::category.label')` in: `resources/views/vendor/rapidez/category/partials/listing/item.blade.php`.

## Notes
Not all features of Mirasvit product labels are integrated yet. Missing features are:
* Label directions
* Images
* Product variables

## License

GNU General Public License v3. Please see [License File](LICENSE) for more information.
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": ":vendor_slug/:package_slug",
"description": ":package_description",
"name": "rapidez/mirasvit-label",
"description": "This package adds Mirasvit label compatibility to Rapidez",
"keywords": [
"rapidez",
":package_slug"
"mirasvit-label"
],
"homepage": "https://github.com/:vendor_slug/:package_slug",
"homepage": "https://github.com/rapidez/mirasvit-label",
"license": "GPL-3.0",
"authors": [
{
"name": ":author_name",
"email": "[email protected]",
"name": "Bob Wezelman",
"email": "[email protected]",
"role": "Developer"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.1|^8.2",
"rapidez/core": "^1.0"
"rapidez/core": "^2.0"
},
"autoload": {
"psr-4": {
"VendorName\\Skeleton\\": "src"
"Rapidez\\MirasvitLabel\\": "src"
}
},
"config": {
Expand All @@ -31,7 +31,7 @@
"extra": {
"laravel": {
"providers": [
"VendorName\\Skeleton\\SkeletonServiceProvider"
"Rapidez\\MirasvitLabel\\MirasvitLabelServiceProvider"
]
}
}
Expand Down
4 changes: 0 additions & 4 deletions config/skeleton.php

This file was deleted.

217 changes: 0 additions & 217 deletions configure.php

This file was deleted.

35 changes: 0 additions & 35 deletions resources/js/components/Example.vue

This file was deleted.

15 changes: 0 additions & 15 deletions resources/js/package.js

This file was deleted.

Empty file removed resources/views/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions resources/views/category/label.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<span
v-for="label in item.mirasvit_label"
v-if="label.cat_title"
v-bind:style="label.cat_style"
class="absolute transform"
:class="{
'top-0': label.cat_position.includes('top'),
'bottom-0': label.cat_position.includes('bottom'),
'right-0': label.cat_position.includes('right'),
'left-0': label.cat_position.includes('left'),
'top-1/2 -translate-y-1/2': label.cat_position.includes('middle'),
'right-1/2 -translate-x-1/2': label.cat_position.includes('center')
}"
>
@{{ label.cat_title }}
</span>
Empty file.
Loading

0 comments on commit f46aca5

Please sign in to comment.