Skip to content

Commit

Permalink
Merge pull request #186 from avored/dev
Browse files Browse the repository at this point in the history
merging dev to master
  • Loading branch information
indpurvesh authored Aug 12, 2018
2 parents 567ccca + e8152e2 commit 9279a94
Show file tree
Hide file tree
Showing 120 changed files with 3,634 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Ignore swp files from vim
*.swp
**/.DS_Store

# Laravel 5 Specific
/node_modules
Expand All @@ -20,6 +21,7 @@ yarn-error.log
/themes/*
/public/cov/*


# Etc
composer.lock
public/mix-manifest.json
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Examples of unacceptable behavior by participants include:

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and the responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We use GitHub issues exclusively to track all bugs and features.

* [Open an issue](https://github.com/avored/laravel-ecommerce/issues) here on GitHub.
If you can, **please provide a fix and create a pull request (PR) instead**; this will automatically create an issue for you.
* Please be patient as not all items will be tested immediately - remember, avored is open source and free of charge.
* Please be patient as not all items will be tested immediately - remember, AvoRed is open source and free of charge.
* Occasionally we'll close issues.
Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed.

Expand All @@ -16,7 +16,7 @@ We gladly accept community pull requests.
There are a few necessary steps before we can accept a pull request:

* [Open an issue](https://github.com/avored/laravel-ecommerce/issues) describing the problem that you are looking to solve in
your PR (if one is not already open), and your approach to solving it (no necessary for bug fixes - only feature contributions).
your PR (if one is not already open), and your approach to solving it (not necessary for bug fixes - only feature contributions).

### Contributor License Agreement
The following terms are used throughout this agreement:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{ __('avored-banner::banner.banner-update') }}
</button>
<a href="{{ route('admin.banner.index') }}" class="btn">
{{ __('avored-ecommerce::lang.cancel') }}
{{ __('avored-framework::lang.cancel') }}
</a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion modules/avored/banner/routes/web.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Illuminate\Support\Facades\Route;

$baseAdminUrl = config('avored-ecommerce.admin_url');
$baseAdminUrl = config('avored-framework.admin_url');


Route::middleware(['web', 'admin.auth', 'permission'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ private function _uploadBanner($image)
$checkDirectory = '/uploads/cms/images/' . implode('/', $tmpPath);
$localImage = Image::upload($image, $checkDirectory);

return $localImage->relativePath;
$symblink = config('avored-framework.symlink_storage_folder'). "/";

$relativePath = str_replace($symblink,'',$localImage->relativePath);
return $relativePath;
}
}
7 changes: 7 additions & 0 deletions modules/avored/banner/src/Models/Database/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ class Banner extends Model
{
protected $fillable = ['name','image_path','alt_text','url','target','status','sort_order'];


public function getImagePathAttribute($val)
{
$symblink = config('avored-framework.symlink_storage_folder');
return $symblink . DIRECTORY_SEPARATOR . $val;
}

}
45 changes: 45 additions & 0 deletions modules/avored/brand/composer.json
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"
}
}
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()
{
}

}
11 changes: 11 additions & 0 deletions modules/avored/brand/readme.md
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


5 changes: 5 additions & 0 deletions modules/avored/brand/register.yaml
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 modules/avored/brand/resources/views/brand/index.blade.php
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
10 changes: 10 additions & 0 deletions modules/avored/brand/routes/web.php
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 modules/avored/brand/src/Http/Controllers/BrandController.php
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);
}
}
57 changes: 57 additions & 0 deletions modules/avored/brand/src/Module.php
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'),
]);
}

}
21 changes: 21 additions & 0 deletions modules/avored/cash-on-delivery/LICENSE
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.
42 changes: 42 additions & 0 deletions modules/avored/cash-on-delivery/composer.json
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"
}
}
11 changes: 11 additions & 0 deletions modules/avored/cash-on-delivery/readme.md
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
5 changes: 5 additions & 0 deletions modules/avored/cash-on-delivery/register.yaml
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
Loading

0 comments on commit 9279a94

Please sign in to comment.