Comments (4)
Well, you are right, the documentation is not clear about that, I'll update that.
You should define taxes and discounts in a service provider's boot method.
from bazar.
I did the voucher page in vue and everything work, inclusive update, show, but on the create new page i got errors...
The POST method from form go with 0 data inputs values, request payload is empty: []
This is Create.vue:
<template>
<data-form class="row" :action="action" :data="voucher" #default="form">
<div class="col-12 col-lg-7 col-xl-8 form__body">
<card :title="__('General')">
<data-form-input
type="text"
name="name"
:label="__('Name')"
v-model="form.data.name"
></data-form-input>
<data-form-input
type="text"
name="unit"
:label="__('Value (unit-200 or percent-30)')"
v-model="form.data.unit"
></data-form-input>
<data-form-input
type="number"
name="uses"
:label="__('Number of uses')"
v-model="form.data.uses"
></data-form-input>
<data-form-input
handler="editor"
name="description"
:label="__('Description')"
v-model="form.data.description"
></data-form-input>
</card>
</div>
<div class="col-12 col-lg-5 col-xl-4 mt-5 mt-lg-0 form__sidebar">
<div class="sticky-helper">
<card :title="__('Actions')">
<div class="form-group d-flex justify-content-between mb-0">
<button type="submit" class="btn btn-primary" :disabled="form.busy">
{{ __('Save') }}
</button>
</div>
</card>
</div>
</div>
</data-form>
</template>
<script>
export default {
props: {
voucher: {
type: Object,
required: true,
},
},
mounted() {
this.$parent.icon = 'coupon';
this.$parent.title = this.__('Create Voucher');
},
computed: {
action() {
return '/bazar/vouchers';
},
},
}
</script>
from bazar.
So the problem was in Database, after i put variable $attributes with default values, only after that work and send the values i typed in inputs to payload
protected $attributes = [
'uses' => 0,
'code' => '',
'value' => 0,
'name' => '',
'description' => null,
'type' => 'fix'
];
from bazar.
How can i use Discount per all items ? to see price with discount when i have global discount
from bazar.
Related Issues (20)
- Discount for all products or only for one HOT 21
- Bug Cart::addItem HOT 1
- Price formatting problem
- Help Getting started? HOT 4
- Shipping calculate cost problem HOT 3
- Checkout got failed HOT 1
- Route [login] not defined? HOT 2
- \Bazar\Events\CheckoutProcessed , not decrement quantity
- Cannot extend Shpping model to create new column 'awb' HOT 1
- Translate VUE backend not work for right side
- Image upload modal
- only http links in MenuRepository
- Cannot add items to cart HOT 2
- [QUESTION] Converting carts to orders
- Cannot see order items
- [QUESTION] How to customize Vue components
- Can't upload new media
- How to implement redirect in gateway?
- Cone\Root\Fields\MorphMany::asSubResource does not exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazar.