Skip to content

Commit

Permalink
Checkout panel was added. Refactoring and improvements in appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
vilgefortzz committed May 13, 2017
1 parent 7fac75a commit ad3ba52
Show file tree
Hide file tree
Showing 16 changed files with 376 additions and 197 deletions.
22 changes: 22 additions & 0 deletions app/Http/Controllers/ShopController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Http\Controllers;

use App\Cart;
use Illuminate\Http\Request;
use Session;

class ShopController extends Controller
{
public function showCheckout(){

if (!Session::has('cart')){
return back();
}

$oldCart = Session::get('cart');
$cart = new Cart($oldCart);

return view('orders.checkout', ['products' => $cart->products, 'totalPrice' => $cart->totalPrice]);
}
}
75 changes: 58 additions & 17 deletions public/css/app.css

Large diffs are not rendered by default.

42 changes: 26 additions & 16 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11280,12 +11280,34 @@ $(document).ready(function () {
}
});

$('.give_review').on('click', function () {
/**
* FAQ
*/

$('.faq_group').on('click', function () {

var faq_id = $(this).attr('id');
var id = faq_id.split('_')[1];

sessionStorage.setItem('hash', 'write_review');
$('#answer_' + id).slideDown();
});

if (sessionStorage.length > 0) {
/**
* Subcategory menu from main page
*/

$('.dropdown_cat').on('click', function (e) {
e.preventDefault();

var cat_id = $(this).attr('id');
var id = cat_id.split('_')[1];

$('.sub_cat_menu').hide();

$('#sub_cat_' + id).fadeIn();
});

if (localStorage.length > 0) {

if ($('#write_review').length != 0) {
$('html, body').animate({
Expand All @@ -11299,20 +11321,8 @@ $(document).ready(function () {
}, 800);
}

sessionStorage.clear();
localStorage.clear();
}

/**
* FAQ
*/

$('.faq_group').on('click', function () {

var faq_id = $(this).attr('id');
var id = faq_id.split('_')[1];

$('#answer_' + id).slideDown();
});
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

Expand Down
10 changes: 0 additions & 10 deletions public/js/focus_and_dim.js

This file was deleted.

42 changes: 26 additions & 16 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,34 @@ $(document).ready(function() {
}
});

$('.give_review').on('click', function () {
/**
* FAQ
*/

$('.faq_group').on('click', function () {

var faq_id = $(this).attr('id');
var id = faq_id.split('_')[1];

sessionStorage.setItem('hash', 'write_review');
$('#answer_' + id).slideDown();
});

if (sessionStorage.length > 0){
/**
* Subcategory menu from main page
*/

$('.dropdown_cat').on('click', function (e) {
e.preventDefault();

var cat_id = $(this).attr('id');
var id = cat_id.split('_')[1];

$('.sub_cat_menu').hide();

$('#sub_cat_' + id).fadeIn();
});

if (localStorage.length > 0){

if($('#write_review').length != 0) {
$('html, body').animate({
Expand All @@ -84,18 +106,6 @@ $(document).ready(function() {
}, 800);
}

sessionStorage.clear();
localStorage.clear();
}

/**
* FAQ
*/

$('.faq_group').on('click', function () {

var faq_id = $(this).attr('id');
var id = faq_id.split('_')[1];

$('#answer_' + id).slideDown();
});
});
63 changes: 59 additions & 4 deletions resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
// Variables
@import "variables";

// Focus and dim screen on hover
@import "focus_and_dim";

// Recommended products list
@import "products_list";

Expand Down Expand Up @@ -79,8 +76,37 @@ body{
text-decoration: none;
}

.dropdown_cat{
display: inline-block;
}

.dropdown_cat a{
display: block;
color: #59585b;
padding: 14px 16px;
text-decoration: none;
}

.sub_cat_menu{
font-size: 20px;
list-style: none;
}

.sub_cat_menu a{
color: darkred;
text-decoration: none;
}

.sub_cat_menu a:hover{
color: black;
}

.horizontal_menu > li a:hover{
color: #29282b;
color: black;
}

.horizontal_menu > li a:focus{
color: black;
}

.horizontal_line{
Expand Down Expand Up @@ -393,11 +419,40 @@ body{
text-decoration: none;
}

.nice_links{
color: black;
text-decoration: none;
}

.nice_links:hover{
color: darkred;
text-decoration: none;
}

.nice_links:active{
color: darkred;
text-decoration: none;
}

.faq_group:hover{
color: white;
background: #312822;
}

.answer_group{
list-style: none;
}

// Checkout styles

.table > tbody > tr > .no-line {
border-top: none;
}

.table > thead > tr > .no-line {
border-bottom: none;
}

.table > tbody > tr > .thick-line {
border-top: 2px solid;
}
10 changes: 0 additions & 10 deletions resources/assets/sass/focus_and_dim.scss

This file was deleted.

2 changes: 1 addition & 1 deletion resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('layouts.app')
@extends('layouts.app_without_footer')

@section('content')
<div class="container container-fix">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('layouts.app')
@extends('layouts.app_without_footer')

@section('content')
<div class="container container-fix">
Expand Down
Loading

0 comments on commit ad3ba52

Please sign in to comment.