Merge branch 'master' of https://github.com/bagisto/bagisto into development

This commit is contained in:
Prashant Singh 2019-05-30 19:05:13 +05:30
commit 9a4c17066e
7 changed files with 82 additions and 29 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=71f03d05d9690fe24784",
"/css/shop.css": "/css/shop.css?id=6fb34a8fdfa91e44fe57"
}
"/js/shop.js": "/js/shop.js?id=9a7027b387c171cd0fd3",
"/css/shop.css": "/css/shop.css?id=77d013de702af8275b0c"
}

View File

@ -60,6 +60,20 @@ class OnepageController extends Controller
return view($this->_config['view'])->with('cart', Cart::getCart());
}
/**
* Return order short summary
*
* @return \Illuminate\Http\Response
*/
public function summary()
{
$cart = Cart::getCart();
return response()->json([
'html' => view('shop::checkout.total.summary', compact('cart'))->render()
]);
}
/**
* Saves customer address.
*

View File

@ -67,6 +67,9 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
'view' => 'shop::checkout.onepage'
])->name('shop.checkout.onepage.index');
//Checkout Save Order
Route::get('/checkout/summary', 'Webkul\Shop\Http\Controllers\OnepageController@summary')->name('shop.checkout.summary');
//Checkout Save Address Form Store
Route::post('/checkout/save-address', 'Webkul\Shop\Http\Controllers\OnepageController@saveAddress')->name('shop.checkout.save-address');

View File

@ -3198,6 +3198,7 @@ section.review {
.account-layout {
margin-left: 0%;
margin-top: 20px;
width: 100%;
.account-head {
display: flex;
@ -3482,6 +3483,26 @@ section.review {
z-index: -1 !important;
}
.filter-row-one .dropdown-filters {
position: relative !important;
right: 1px !important;
}
@media only screen and (max-width: 770px) {
.table {
.grid-container {
margin-top: 10px;
.filter-row-one {
display: block;
.dropdown-filters {
margin-top: 10px;
}
}
}
}
}
/// rtl css start here
.rtl {
direction: rtl;

View File

@ -103,7 +103,7 @@
</div>
<div class="col-right" v-show="currentStep != 4">
<div class="col-right" v-if="resetSummary" v-show="currentStep != 4">
<summary-section></summary-section>
@ -116,27 +116,7 @@
var shippingHtml = '';
var paymentHtml = '';
var reviewHtml = '';
var summaryHtml = Vue.compile(
"<div class='order-summary'><h3>"
+ '{{ __('shop::app.checkout.total.order-summary') }}' +
"</h3><div class='item-detail'><label>"
+ '{{ intval($cart->items_qty) }} {{ __('shop::app.checkout.total.sub-total') }} {{ __('shop::app.checkout.total.price') }}' +
"</label><label class='right'>"
+ '{{ core()->currency($cart->base_sub_total) }}' +
"</label></div><?php if($cart->base_tax_total): ?><div class='item-detail'><label>"
+ '{{ __('shop::app.checkout.total.tax') }}' +
"</label><label class='right'>"
+ '{{ core()->currency($cart->base_tax_total) }}' +
"</label></div><?php endif; ?><?php if($cart->selected_shipping_rate): ?><div class='item-detail'><label>"
+ '{{ __('shop::app.checkout.total.delivery-charges') }}' +
"</label><label class='right'>"
+ '{{ core()->currency($cart->selected_shipping_rate->base_price) }}' +
"</label></div><?php endif; ?><div class='payble-amount'><label>"
+ '{{ __('shop::app.checkout.total.grand-total') }}' +
"</label><label class='right'>"
+ '{{ core()->currency($cart->base_grand_total) }}' +
"</label></div></div>"
);
var summaryHtml = '';
var customerAddress = null;
@auth('customer')
@ -155,31 +135,44 @@
data: function() {
return {
currentStep: 1,
completedStep: 0,
address: {
billing: {
address1: [''],
use_for_shipping: true,
},
shipping: {
address1: ['']
},
},
selected_shipping_method: '',
selected_payment_method: '',
disable_button: false,
new_shipping_address: false,
new_billing_address: false,
allAddress: {},
countryStates: @json(core()->groupedStatesByCountries()),
country: @json(core()->countries())
country: @json(core()->countries()),
resetSummary: true
}
},
created: function() {
this.getOrderSummary();
if(! customerAddress) {
this.new_shipping_address = true;
this.new_billing_address = true;
@ -234,6 +227,22 @@
});
},
getOrderSummary () {
var this_this = this;
this.$http.get("{{ route('shop.checkout.summary') }}")
.then(function(response) {
this_this.resetSummary = false;
summaryHtml = Vue.compile(response.data.html)
setTimeout(function() {
this_this.resetSummary = true;
}, 0);
})
.catch(function (error) {})
},
saveAddress: function() {
var this_this = this;
@ -247,6 +256,8 @@
shippingHtml = Vue.compile(response.data.html)
this_this.completedStep = 1;
this_this.currentStep = 2;
this_this.getOrderSummary();
}
})
.catch(function (error) {
@ -269,6 +280,8 @@
paymentHtml = Vue.compile(response.data.html)
this_this.completedStep = 2;
this_this.currentStep = 3;
this_this.getOrderSummary();
}
})
.catch(function (error) {
@ -291,6 +304,8 @@
reviewHtml = Vue.compile(response.data.html)
this_this.completedStep = 3;
this_this.currentStep = 4;
this_this.getOrderSummary();
}
})
.catch(function (error) {
@ -369,7 +384,7 @@
this.templateRender = summaryHtml.render;
for (var i in summaryHtml.staticRenderFns) {
summaryTemplateRenderFns.push(summaryHtml.staticRenderFns[i]);
summaryTemplateRenderFns.unshift(summaryHtml.staticRenderFns[i]);
}
},