-
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from avored/dev
merging dev to master
- Loading branch information
Showing
120 changed files
with
3,634 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name" : "avored/brand", | ||
"description" : "AvoRed Laravel E commerce - Product Brand Module", | ||
"keywords" : [ | ||
"framework", | ||
"product-brand", | ||
"cart", | ||
"laravel", | ||
"e commerce", | ||
"laravel5", | ||
"shop", | ||
"shopping-cart", | ||
"e-commerce", | ||
"shopping cart", | ||
"e commerce" | ||
], | ||
"license" : "MIT", | ||
"authors" : [{ | ||
"name" : "Purvesh ", | ||
"email" : "[email protected]" | ||
} | ||
], | ||
"type" : "avored-module", | ||
"require" : { | ||
"php" : ">=7.1.3", | ||
"avored/module-installer" : "1.*", | ||
"avored/framework" : "2.*" | ||
}, | ||
"autoload" : { | ||
"classmap" : [ | ||
"database/migrations" | ||
], | ||
"psr-4" : { | ||
"AvoRed\\Brand\\" : "src/" | ||
} | ||
}, | ||
"homepage" : "https://www.avored.com/", | ||
"support" : { | ||
"email" : "[email protected]", | ||
"issues" : "https://www.avored.com/discussion", | ||
"forum" : "https://www.avored.com/discussion", | ||
"wiki" : "https://www.avored.com/docs", | ||
"source" : "https://www.github.com/avored/brand" | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
modules/avored/brand/database/migrations/2017_03_29_000001_avored_brand_schema.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
use AvoRed\Framework\Models\Database\Property; | ||
use AvoRed\Framework\Models\Database\PropertyDropdownOption; | ||
|
||
class AvoredBrandSchema extends Migration | ||
{ | ||
|
||
/** | ||
* | ||
* Install the AvoRed Product Brand Module Schema. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
$property = Property::create([ | ||
'name' => 'Brand', | ||
'identifier' => 'avored-brand', | ||
'data_type' => 'INTEGER', | ||
'field_type' => 'SELECT', | ||
'use_for_all_products' => 1, | ||
'sort_order' => 200 | ||
]); | ||
|
||
PropertyDropdownOption::create([ | ||
'property_id' => $property->id, | ||
'display_text' => 'Test Brand Name' | ||
]); | ||
} | ||
|
||
/** | ||
* Uninstall the AvoRed Address Module Schema. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# AvoRed Brand Module | ||
|
||
### Installation | ||
|
||
composer require avored/brand | ||
|
||
php artisan migrate | ||
|
||
### How to Use | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: AvoRed Brand | ||
identifier: avored-brand | ||
description: AvoRed Product Brand Module | ||
namespace: AvoRed\Brand\ | ||
status: Enabled |
28 changes: 28 additions & 0 deletions
28
modules/avored/brand/resources/views/brand/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@extends('layouts.app') | ||
|
||
@section('meta_title') | ||
Test Brand Title | ||
@endsection | ||
|
||
@section('content') | ||
<div class="row"> | ||
|
||
<div class="col-12"> | ||
<div class="row"> | ||
@if(count($products) <= 0) | ||
<p>Sorry No Product Found</p> | ||
@else | ||
|
||
@foreach($products as $product) | ||
<div class="col-4"> | ||
@include('product.view.product-card',['product' => $product]) | ||
</div> | ||
@endforeach | ||
<div class="clearfix"></div> | ||
{!! $products->links('pagination.bootstrap-4') !!} | ||
@endif | ||
</div> | ||
</div> | ||
|
||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Route; | ||
|
||
Route::middleware(['web']) | ||
->namespace('AvoRed\Brand\Http\Controllers') | ||
->group(function () { | ||
Route::get('brand/{id}', 'BrandController@index')->name('brand.index'); | ||
|
||
}); |
23 changes: 23 additions & 0 deletions
23
modules/avored/brand/src/Http/Controllers/BrandController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace AvoRed\Brand\Http\Controllers; | ||
|
||
use AvoRed\Framework\Models\Database\Product; | ||
use AvoRed\Framework\Models\Database\ProductPropertyIntegerValue; | ||
use AvoRed\Framework\Models\Database\Property; | ||
use App\Http\Controllers\Controller; | ||
|
||
class BrandController extends Controller | ||
{ | ||
public function index($id) { | ||
$property = Property::whereIdentifier('avored-brand')->first(); | ||
|
||
$productIds = ProductPropertyIntegerValue::wherePropertyId($property->id) | ||
->whereValue($id) | ||
->get()->pluck('product_id'); | ||
|
||
$products = Product::whereIn('id', $productIds->toArray())->paginate(10); | ||
|
||
return view('avored-brand::brand.index')->with('products', $products); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
namespace AvoRed\Brand; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
|
||
class Module extends ServiceProvider | ||
{ | ||
|
||
/** | ||
* Bootstrap any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$this->registerResources(); | ||
$this->publishFiles(); | ||
} | ||
|
||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Registering AvoRed featured Resource | ||
* e.g. Route, View, Database & Translation Path | ||
* | ||
* @return void | ||
*/ | ||
protected function registerResources() | ||
{ | ||
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'avored-brand'); | ||
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); | ||
$this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); | ||
} | ||
|
||
/** | ||
* Publish Files for AvoRed Brand Modules. | ||
* | ||
* @return void | ||
*/ | ||
public function publishFiles() { | ||
$this->publishes([ | ||
__DIR__ . '/../resources/views' => base_path('themes/avored/default/views/vendor') | ||
],'avored-module-views'); | ||
$this->publishes([ | ||
__DIR__ . '/../database/migrations' => database_path('avored-migrations'), | ||
]); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 AvoRed E commerce | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name" : "avored/cash-on-delivery", | ||
"description" : "AvoRed Laravel E commerce - Cash On Delivery Module", | ||
"keywords" : [ | ||
"framework", | ||
"banner", | ||
"cart", | ||
"laravel", | ||
"e commerce", | ||
"laravel5", | ||
"shop", | ||
"shopping-cart", | ||
"e-commerce", | ||
"shopping cart", | ||
"e commerce" | ||
], | ||
"license" : "MIT", | ||
"authors" : [{ | ||
"name" : "Purvesh ", | ||
"email" : "[email protected]" | ||
} | ||
], | ||
"type" : "avored-module", | ||
"require" : { | ||
"php" : ">=7.1.3", | ||
"avored/module-installer" : "1.*", | ||
"avored/framework" : "2.*" | ||
}, | ||
"autoload" : { | ||
"psr-4" : { | ||
"AvoRed\\CashOnDelivery\\" : "src/" | ||
} | ||
}, | ||
"homepage" : "https://www.avored.com", | ||
"support" : { | ||
"email" : "[email protected]", | ||
"issues" : "https://www.avored.com/discussion", | ||
"forum" : "https://www.avored.com/discussion", | ||
"wiki" : "https://www.avored.com/docs", | ||
"source" : "https://www.github.com/avored/cash-on-delivery" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# AvoRed Cash on Delivery Payment Module | ||
|
||
### Installation | ||
|
||
composer require avored/cash-on-delivery | ||
|
||
|
||
### How to Use | ||
|
||
|
||
Go to Admin=>Configuration=>Payment=>Enabled Cash on Delivery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: AvoRed Cash on Delivery | ||
identifier: avored-cash-on-delivery | ||
description: AvoRed Fixed Rate Module | ||
namespace: AvoRed\CashOnDelivery\ | ||
status: Enabled |
Oops, something went wrong.