-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b8a554
commit b2a689b
Showing
21 changed files
with
6,871 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
/node_modules | ||
package-lock.json |
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 |
---|---|---|
|
@@ -22,21 +22,20 @@ | |
], | ||
"type" : "avored-module", | ||
"require" : { | ||
"php" : ">=7.1.3", | ||
"avored/module-installer" : "1.*", | ||
"avored/ecommerce" : "2.*" | ||
"php": "^7.2", | ||
"avored/module-installer" : "1.*" | ||
}, | ||
"autoload" : { | ||
"psr-4" : { | ||
"AvoRed\\CashOnDelivery\\" : "src/" | ||
} | ||
}, | ||
"homepage" : "https://www.avored.com", | ||
"homepage" : "https://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" | ||
"issues" : "https://avored.com/discussion", | ||
"forum" : "https://avored.com/discussion", | ||
"wiki" : "https://avored.com/docs", | ||
"source" : "https://github.com/avored/banner" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
{ | ||
"/vendor/avored/js/cash-on-delivery.js": "/vendor/avored/js/cash-on-delivery.js" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "npm run development", | ||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch-poll": "npm run watch -- --watch-poll", | ||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --https --key ~/.config/valet/Certificates/laravel-ecommerce.test.key --cert ~/.config/valet/Certificates/laravel-ecommerce.test.crt --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"prod": "npm run production", | ||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | ||
}, | ||
"dependencies": { | ||
"cross-env": "^6.0.0", | ||
"laravel-mix": "^4.1.4", | ||
"vue": "^2.5.17" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
# AvoRed Cash on Delivery Payment Module | ||
# AvoRed Cash On Delivery Payment Module | ||
|
||
### Installation | ||
|
||
composer require avored/cash-on-delivery | ||
composer require avored/cash-on-delivery | ||
|
||
php artisan migrate | ||
|
||
### How to Use | ||
|
||
|
||
Go to Admin=>Configuration=>Payment=>Enabled Cash on Delivery |
This file was deleted.
Oops, something went wrong.
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 | ||
status: active | ||
description: avored cash-on-delivery Module | ||
namespace: AvoRed\CashOnDelivery\ |
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,31 @@ | ||
<script> | ||
export default { | ||
name: 'avored-cash-on-delivery', | ||
props: [], | ||
data () { | ||
return { | ||
selectedCashOnDeliveryPaymentOption: false | ||
} | ||
}, | ||
methods: { | ||
handlePaymentChange(checked, identifier) { | ||
if (checked) { | ||
this.selectedCashOnDeliveryPaymentOption = true | ||
} else { | ||
this.selectedCashOnDeliveryPaymentOption = false | ||
} | ||
window.EventBus.$emit('selectedPaymentIdentifier', identifier) | ||
} | ||
}, | ||
mounted() { | ||
var app = this | ||
var eventBus = window.EventBus | ||
eventBus.$on('placeOrderBefore', function() { | ||
if (app.selectedCashOnDeliveryPaymentOption) { | ||
eventBus.$emit('placeOrderAfter') | ||
} | ||
}) | ||
} | ||
} | ||
</script> |
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 @@ | ||
<template> | ||
<div> | ||
|
||
<avored-select | ||
field-name="a_cash_on_delivery_status" | ||
:options="options" | ||
:init-value="data.a_cash_on_delivery_status" | ||
></avored-select> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'cash-on-delivery-config', | ||
props: ['data', 'options'], | ||
data () { | ||
return { | ||
status: false | ||
} | ||
}, | ||
methods: { | ||
}, | ||
mounted() { | ||
} | ||
} | ||
</script> |
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,4 @@ | ||
AvoRed.initialize((Vue) => { | ||
Vue.component('avored-cash-on-delivery', require('../components/AvoRedCashOnDelivery.vue').default) | ||
Vue.component('cash-on-delivery-config', require('../components/CashOnDeliveryConfig.vue').default) | ||
}) |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'config-title' => 'Cash On Delivery', | ||
'enabled' => 'Enabled', | ||
'disabled' => 'Disabled', | ||
'status' => 'Status' | ||
]; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
<button | ||
class="flex items-center justify-between w-full bg-white rounded-md border-2 border-blue-500 p-4 focus:outline-none"> | ||
<label class="flex items-center"> | ||
<input type="radio" checked class="form-radio h-5 w-5 text-blue-600" /> | ||
<span class="ml-2 text-sm text-gray-700"> | ||
Cash on Delivery | ||
</span> | ||
</label> | ||
<span class="text-gray-600 text-sm"></span> | ||
</button> |
17 changes: 17 additions & 0 deletions
17
resources/views/system/configuration/payment-card.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,17 @@ | ||
@php | ||
$data = collect(); | ||
$data->put('a_cash_on_delivery_status', $repository->getValueByCode('a_cash_on_delivery_status')); | ||
$options = collect(); | ||
$options->put('ENABLED', 'Enabled'); | ||
$options->put('DISABLED', 'Disabled'); | ||
@endphp | ||
|
||
<cash-on-delivery-config | ||
:options="{{ json_encode($options) }}" | ||
:data="{{ $data }}" | ||
></cash-on-delivery-config> | ||
|
||
@push('scripts') | ||
<script src="{{ asset('vendor/avored/js/cash-on-delivery.js') }}"></script> | ||
@endpush |
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
Oops, something went wrong.