@@ -244,7 +244,7 @@
var optionWrapper = Vue.component('option-wrapper', {
- template: '#options-template',
+ template: '#options-template',
data: () => ({
optionRowCount: 0,
diff --git a/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php b/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php
new file mode 100644
index 000000000..4221017eb
--- /dev/null
+++ b/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php
@@ -0,0 +1,45 @@
+
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CheckoutController extends Controller
+{
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ protected $_config;
+
+ public function __construct()
+ {
+ // $this->middleware(['customer', 'guest']);
+
+ $this->_config = request('_config');
+ }
+
+ /**
+ * Display a listing of the resource.
+ *
+ * @return \Illuminate\Http\Response
+ */
+ public function index()
+ {
+ $customer_id = auth()->guard('customer')->user();
+
+ return view($this->_config['view'],compact('customer_id'));
+ }
+
+}
\ No newline at end of file
diff --git a/packages/Webkul/Cart/src/Providers/CartServiceProvider.php b/packages/Webkul/Cart/src/Providers/CartServiceProvider.php
index 205ed4a82..f2ad3c67f 100644
--- a/packages/Webkul/Cart/src/Providers/CartServiceProvider.php
+++ b/packages/Webkul/Cart/src/Providers/CartServiceProvider.php
@@ -11,7 +11,7 @@ class CartServiceProvider extends ServiceProvider
public function boot(Router $router)
{
- $router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
+ // $router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
}
diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php
index 1d761c523..77f876c58 100644
--- a/packages/Webkul/Product/src/Models/Product.php
+++ b/packages/Webkul/Product/src/Models/Product.php
@@ -132,6 +132,22 @@ class Product extends Model
return $this->attribute_family->custom_attributes->pluck('code')->contains($attribute);
}
+ /**
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function isSaleable()
+ {
+ if($this->status) {
+ if($this->inventories->sum('qty')) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
/**
* Get an attribute from the model.
*
diff --git a/packages/Webkul/Product/src/Product/ConfigurableOption.php b/packages/Webkul/Product/src/Product/ConfigurableOption.php
new file mode 100644
index 000000000..6cb84ad3d
--- /dev/null
+++ b/packages/Webkul/Product/src/Product/ConfigurableOption.php
@@ -0,0 +1,228 @@
+attributeOption = $attributeOption;
+
+ $this->gallery = $gallery;
+
+ $this->price = $price;
+ }
+
+ /**
+ * Returns the allowed variants
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getAllowProducts($product)
+ {
+ $variants = [];
+
+ foreach ($product->variants as $variant) {
+ if ($variant->isSaleable()) {
+ $variants[] = $variant;
+ }
+ }
+
+ return $variants;
+ }
+
+ /**
+ * Returns the allowed variants JSON
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getConfigurationConfig($product)
+ {
+ $options = $this->getOptions($product, $this->getAllowProducts($product));
+
+ $config = [
+ 'attributes' => $this->getAttributesData($product, $options),
+ 'index' => isset($options['index']) ? $options['index'] : [],
+ 'variant_prices' => $this->getVariantPrices($product),
+ 'variant_images' => $this->getVariantImages($product),
+ 'chooseText' => trans('shop::app.products.choose-option')
+ ];
+
+ return $config;
+ }
+
+ /**
+ * Get allowed attributes
+ *
+ * @param Product $product
+ * @return array
+ */
+ public function getAllowAttributes($product)
+ {
+ return $product->super_attributes;
+ }
+
+ /**
+ * Get Configurable Product Options
+ *
+ * @param Product $currentProduct
+ * @param array $allowedProducts
+ * @return array
+ */
+ public function getOptions($currentProduct, $allowedProducts)
+ {
+ $options = [];
+
+ $allowAttributes = $this->getAllowAttributes($currentProduct);
+
+ foreach ($allowedProducts as $product) {
+
+ $productId = $product->id;
+
+ foreach ($allowAttributes as $productAttribute) {
+ $productAttributeId = $productAttribute->id;
+
+ $attributeValue = $product->{$productAttribute->code};
+
+ $options[$productAttributeId][$attributeValue][] = $productId;
+
+ $options['index'][$productId][$productAttributeId] = $attributeValue;
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Get product attributes
+ *
+ * @param Product $product
+ * @param array $options
+ * @return array
+ */
+ public function getAttributesData($product, array $options = [])
+ {
+ $defaultValues = [];
+
+ $attributes = [];
+
+ foreach ($product->super_attributes as $attribute) {
+
+ $attributeOptionsData = $this->getAttributeOptionsData($attribute, $options);
+
+ if ($attributeOptionsData) {
+ $attributeId = $attribute->id;
+
+ $attributes[] = [
+ 'id' => $attributeId,
+ 'code' => $attribute->code,
+ 'label' => $attribute->name,
+ 'options' => $attributeOptionsData
+ ];
+ }
+ }
+
+ return $attributes;
+ }
+
+ /**
+ * @param Attribute $attribute
+ * @param array $options
+ * @return array
+ */
+ protected function getAttributeOptionsData($attribute, $options)
+ {
+ $attributeOptionsData = [];
+
+ foreach ($attribute->options as $attributeOption) {
+
+ $optionId = $attributeOption->id;
+
+ if(isset($options[$attribute->id][$optionId])) {
+ $attributeOptionsData[] = [
+ 'id' => $optionId,
+ 'label' => $attributeOption->label,
+ 'products' => $options[$attribute->id][$optionId]
+ ];
+ }
+ }
+
+ return $attributeOptionsData;
+ }
+
+ /**
+ * Get product prices for configurable variations
+ *
+ * @param Product $product
+ * @return array
+ */
+ protected function getVariantPrices($product)
+ {
+ $prices = [];
+
+ foreach ($this->getAllowProducts($product) as $variant) {
+ $prices[$variant->id] = [
+ 'regular_price' => $variant->price,
+ 'final_price' => $this->price->getMinimalPrice($variant),
+ ];
+ }
+
+ return $prices;
+ }
+
+ /**
+ * Get product images for configurable variations
+ *
+ * @param Product $product
+ * @return array
+ */
+ protected function getVariantImages($product)
+ {
+ $images = [];
+
+ foreach ($this->getAllowProducts($product) as $variant) {
+ $images[$variant->id] = $this->gallery->getImages($variant);
+ }
+
+ return $images;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Product/src/Product/Gallery.php b/packages/Webkul/Product/src/Product/Gallery.php
new file mode 100644
index 000000000..7e47592c1
--- /dev/null
+++ b/packages/Webkul/Product/src/Product/Gallery.php
@@ -0,0 +1,25 @@
+ '',
+ 'medium_image_url' => '',
+ 'large_image_url' => '',
+ ];
+
+ return $images;
+ }
+}
\ No newline at end of file
diff --git a/packages/Webkul/Product/src/Product/Price.php b/packages/Webkul/Product/src/Product/Price.php
index f07417649..98e10e4f4 100644
--- a/packages/Webkul/Product/src/Product/Price.php
+++ b/packages/Webkul/Product/src/Product/Price.php
@@ -78,7 +78,7 @@ class Price extends AbstractProduct
public function getSpecialPrice($product)
{
if($this->haveSpecialPrice($product)) {
- return $product->special_price;
+ return $product->special_price;
} else {
return $product->price;
}
diff --git a/packages/Webkul/Product/src/Product/Review.php b/packages/Webkul/Product/src/Product/Review.php
index d359d4729..3fc979da2 100644
--- a/packages/Webkul/Product/src/Product/Review.php
+++ b/packages/Webkul/Product/src/Product/Review.php
@@ -4,6 +4,17 @@ namespace Webkul\Product\Product;
class Review extends AbstractProduct
{
+ /**
+ * Returns the product's avg rating
+ *
+ * @param Product $product
+ * @return float
+ */
+ public function getReviews($product)
+ {
+ return $product->reviews()->where('status', 'approved');
+ }
+
/**
* Returns the product's avg rating
*
@@ -12,7 +23,7 @@ class Review extends AbstractProduct
*/
public function getAverageRating($product)
{
- return round($product->reviews->where('status',1)->average('rating'));
+ return number_format(round($product->reviews()->where('status', 'approved')->average('rating'), 2), 1);
}
/**
@@ -23,7 +34,7 @@ class Review extends AbstractProduct
*/
public function getTotalReviews($product)
{
- return $product->reviews()->where('status',1)->count();
+ return $product->reviews()->where('status', 'approved')->count();
}
/**
diff --git a/packages/Webkul/Shipping/src/Carrier/FlatRate.php b/packages/Webkul/Shipping/src/Carrier/FlatRate.php
new file mode 100644
index 000000000..62d0d7593
--- /dev/null
+++ b/packages/Webkul/Shipping/src/Carrier/FlatRate.php
@@ -0,0 +1,23 @@
+
*/
-
-interface ShippingInterface
+abstract class AbstractShipping
{
- public function calculate();
-
+ abstract public function calculate();
}
diff --git a/packages/Webkul/Shipping/src/Helper/Rate.php b/packages/Webkul/Shipping/src/Helper/Rate.php
new file mode 100644
index 000000000..d500829df
--- /dev/null
+++ b/packages/Webkul/Shipping/src/Helper/Rate.php
@@ -0,0 +1,31 @@
+calculate();
+ $rates =[];
+
+ foreach($data as $rate){
+ foreach($rate as $flat){
+ $rates[$flat['name']] = $flat['price'];
+ }
+ }
+
+ return $rates;
+ }
+
+}
+
+
+
+
diff --git a/packages/Webkul/Shipping/src/Helpers/Rate.php b/packages/Webkul/Shipping/src/Helpers/Rate.php
deleted file mode 100644
index bdc4b9cda..000000000
--- a/packages/Webkul/Shipping/src/Helpers/Rate.php
+++ /dev/null
@@ -1,21 +0,0 @@
-aliasMiddleware('customer', RedirectIfNotCustomer::class);
+ // $router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
- $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
+ // $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
+
+ // include __DIR__ . '/../Http/routes.php';
+
+ // $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shipping');
}
/**
diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php
index 75019b238..a960ff3dc 100644
--- a/packages/Webkul/Shop/src/Http/routes.php
+++ b/packages/Webkul/Shop/src/Http/routes.php
@@ -10,10 +10,15 @@ Route::group(['middleware' => ['web']], function () {
'view' => 'shop::products.index'
]);
+ Route::get('/checkout', 'Webkul\Cart\Http\Controllers\CheckoutController@index')->defaults('_config', [
+ 'view' => 'shop::customers.checkout.index'
+ ])->name('shop.checkout');
+
+
/* dummy routes */
Route::view('/customer/order','shop::customers.account.orders.index');
- Route::view('/customer/checkout','shop::customers.checkout.index');
+ // Route::view('/customer/checkout','shop::customers.checkout.index');
Route::view('/customer/signin','shop::customers.checkout.signin');
@@ -22,6 +27,10 @@ Route::group(['middleware' => ['web']], function () {
Route::view('/customer/payment_method','shop::customers.checkout.payment-method');
Route::view('/customer/payment_complete','shop::customers.checkout.complete');
+
+ Route::view('/test','shop::index');
+
+
/* dummy routes ends here */
diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
index 87047f10b..0606f90fe 100644
--- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
+++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss
@@ -376,7 +376,7 @@ body {
height: 32px;
margin-bottom: 14px;
border-bottom: 1px solid #e8e8e8;
-
+
span {
font-size: 16px;
color: #242424;
@@ -397,11 +397,11 @@ body {
width: 100%;
height: 100px;
}
-
+
.nav > li {
float: none;
border-bottom: 1px solid #e8e8e8;
-
+
a {
margin-left: 10px;
}
@@ -410,13 +410,13 @@ body {
float: right;
margin-top: 5px;
margin-right: 5px;
- }
+ }
}
.nav > li:first-child {
border-top: 1px solid #e8e8e8;
}
-
+
.nav > li:last-child {
float:none;
@@ -425,14 +425,14 @@ body {
color: #FF6472;
letter-spacing: -0.38px;
}
-
+
img {
margin-left: 20px;
}
}
-
+
/* submenu positioning*/
-
+
.nav ul {
position: absolute;
white-space: nowrap;
@@ -441,26 +441,26 @@ body {
z-index: 1;
left: -99999em;
}
-
+
.nav > li:hover > ul {
left: auto;
min-width: 100%;
}
-
+
.nav > li li:hover > ul {
left: 100%;
margin-left: 1px;
top: -1px;
}
-
+
.nav > li:hover > a:first-child:nth-last-child(2):before {
margin-top:-5px
}
-
+
.nav li li > a:first-child:nth-last-child(2):before {
margin-top: -5px
}
-
+
.nav li li:hover > a:first-child:nth-last-child(2):before {
right: 10px;
}
@@ -533,11 +533,11 @@ body {
width: 100%;
height: 100px;
}
-
+
.nav > li {
float: none;
border-bottom: 1px solid #e8e8e8;
-
+
a {
margin-left: 10px;
}
@@ -546,13 +546,13 @@ body {
float: right;
margin-top: 5px;
margin-right: 5px;
- }
+ }
}
.nav > li:first-child {
border-top: 1px solid #e8e8e8;
}
-
+
.nav > li:last-child {
float:none;
@@ -561,14 +561,14 @@ body {
color: #FF6472;
letter-spacing: -0.38px;
}
-
+
img {
margin-left: 20px;
}
}
-
+
/* submenu positioning*/
-
+
.nav ul {
position: absolute;
white-space: nowrap;
@@ -577,26 +577,26 @@ body {
z-index: 1;
left: -99999em;
}
-
+
.nav > li:hover > ul {
left: auto;
min-width: 100%;
}
-
+
.nav > li li:hover > ul {
left: 100%;
margin-left: 1px;
top: -1px;
}
-
+
.nav > li:hover > a:first-child:nth-last-child(2):before {
margin-top:-5px
}
-
+
.nav li li > a:first-child:nth-last-child(2):before {
margin-top: -5px
}
-
+
.nav li li:hover > a:first-child:nth-last-child(2):before {
right: 10px;
}
@@ -826,6 +826,15 @@ section.slider-block {
.product-ratings {
width: 100%;
margin-bottom: 14px;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+
+ .total-reviews {
+ display: none;
+ }
}
.cart-fav-seg {
@@ -1315,15 +1324,10 @@ section.slider-block {
//address form ends
}
//account ends here
-
-
-
-
//customers page css ends here
// product pages css starts here
-
-section.product-detail, section.product-review {
+section.product-detail {
font-size: 16px;
color: $product-font-color;
@@ -1479,20 +1483,32 @@ section.product-detail, section.product-review {
}
.details {
+ .product-price {
+ margin-bottom: 14px;
+ }
+
+ .product-ratings {
+ margin-bottom: 20px;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+
+ .total-reviews {
+ display: inline-block;
+ margin-left: 15px;
+ }
+ }
.product-heading {
font-size: 24px;
color: $product-font-color;
- margin-bottom: 14px;
- }
-
- .rating {
- color: $product-font-color;
- margin-bottom: 14px;
+ margin-bottom: 15px;
}
.product-price {
- margin-bottom: 14px;
+ margin-bottom: 15px;
font-size: 24px;
.special-price {
@@ -1501,11 +1517,13 @@ section.product-detail, section.product-review {
}
.stock-status {
- margin-bottom: 14px;
+ margin-bottom: 15px;
}
.description {
- margin-bottom: 14px;
+ margin-bottom: 15px;
+ padding-bottom: 15px;
+ border-bottom: solid 1px rgba(162, 162, 162, 0.2)
}
.full-specifications {
@@ -1528,145 +1546,81 @@ section.product-detail, section.product-review {
.attributes {
display: block;
width: 100%;
-
- .attribute {
- height: 39px;
- margin-bottom: 20px;
-
- .title {
- float: left;
- height: 100%;
- min-width: 130px;
- padding-top: 9px;
- }
-
- .values {
- display: inline-flex;
-
- .colors {
- margin-right:5px;
- }
- .colors:last-child {
- margin-right: 0;
- }
-
- .red {
- height: 37px;
- width: 37px;
- background: red;
- border: 1px solid $border-color;
- border-radius: 2px;
- }
-
- .blue {
- height: 37px;
- width: 37px;
- background: blue;
- border: 1px solid $border-color;
- border-radius: 2px;
- }
-
- .green {
- height: 37px;
- width: 37px;
- background: green;
- border: 1px solid $border-color;
- border-radius: 2px;
- }
-
- .size {
- margin-right:5px;
- line-height: 38px;
- height: 37px;
- width: 60px;
- border: 1px solid $border-color;
- border-radius: 2px;
- text-align: center;
- vertical-align: middle;
- }
- .size:last-child {
- margin-right: 0;
- }
-
- .quantity {
- .values {
- .control {
- height: 37px !important;
- width: 30px !important;
- }
- }
- }
- }
- }
+ border-bottom: solid 1px rgba(162, 162, 162, 0.2);
}
.full-description {
font-size: 16px;
}
+ }
+ }
+}
- .rating-reviews {
- margin-top: 30px;
+.rating-reviews {
- .title {
- margin-bottom: 15px;
- font-weight: 600;
- }
+ .rating-header {
+ font-weight: 600;
+ padding: 20px 0;
+ }
- .overall {
- margin-bottom: 5px;
+ .stars {
+ .icon {
+ width: 16px;
+ height: 16px;
+ }
+ }
- .review-info {
- .number {
- font-size: 34px;
- }
- }
+ .overall {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
- button {
- float: right;
- border-radius: 0px !important;
- }
-
- }
-
- .reviews {
- margin-top: 34px;
- margin-bottom: 80px;
-
- .review {
- margin-bottom: 25px;
-
- .stars {
- margin-bottom: 15px;
- display: inline-block;
-
- .icon {
- width: 18px;
- height: 18px;
- }
- }
-
- .message {
- margin-bottom: 10px;
- }
-
- .reviewer-details {
- color: #5E5E5E;
- }
- }
-
- .view-all {
- margin-top:15px;
- color: $logo-color;
- margin-bottom:15px;
- }
- }
+ .review-info {
+ .number {
+ font-size: 34px;
}
+
+ .total-reviews {
+ margin-top: 10px;
+ }
+ }
+ }
+
+ .reviews {
+ margin-top: 40px;
+ margin-bottom: 40px;
+
+ .review {
+ margin-bottom: 25px;
+
+ .title {
+ margin-bottom: 5px;
+ }
+
+ .stars {
+ margin-bottom: 15px;
+ display: inline-block;
+ }
+
+ .message {
+ margin-bottom: 10px;
+ }
+
+ .reviewer-details {
+ color: #5E5E5E;
+ }
+ }
+
+ .view-all {
+ margin-top:15px;
+ color: $logo-color;
+ margin-bottom:15px;
}
}
}
/* cart pages and elements css begins here */
-
section.cart {
color: $product-font-color;
font-size: 16px;
@@ -1975,14 +1929,14 @@ section.cart {
.placed-on {
display: flex;
- flex-direction: row;
-
+ flex-direction: row;
+
.place-text {
width: 210px;
span {
color: #5E5E5E;
- letter-spacing: -0.12px;
+ letter-spacing: -0.12px;
font-size: 16px;
}
@@ -1992,10 +1946,10 @@ section.cart {
}
.place-date {
-
+
span {
color: #5E5E5E;
- letter-spacing: -0.12px;
+ letter-spacing: -0.12px;
font-size: 16px;
}
}
@@ -2003,24 +1957,24 @@ section.cart {
.payment-status {
display: flex;
- flex-direction: row;
+ flex-direction: row;
margin-top: 22px;
-
+
.payment-text {
width: 210px;
span {
color: #5E5E5E;
- letter-spacing: -0.12px;
+ letter-spacing: -0.12px;
font-size: 16px;
}
}
.status {
-
+
span {
color: #5E5E5E;
- letter-spacing: -0.12px;
+ letter-spacing: -0.12px;
font-size: 16px;
}
}
@@ -2036,10 +1990,10 @@ section.cart {
}
.order-details{
- width:100%;
+ width:100%;
margin-top: 2.5%;
margin-bottom: 2%;
-
+
.detail{
font-size: 18px;
color: #8E8E8E;
@@ -2055,7 +2009,7 @@ section.cart {
td {
padding : 16px;
}
- }
+ }
}
.total {
@@ -2067,7 +2021,7 @@ section.cart {
float: right;
.sub-total {
-
+
span {
font-size: 14px; font-size: 14px;
color: #3A3A3A;
@@ -2091,11 +2045,11 @@ section.cart {
font-size: 14px;
color: #3A3A3A;
}
-
+
.left {
margin-left: 24px;
}
-
+
.middle {
margin-right: 5px;
margin-left: 5px;
@@ -2170,13 +2124,13 @@ section.cart {
vertical-align: middle;
background: #e8e8e8;
}
-
+
.order-information {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 2.3%;
-
+
.order-address-method {
width : 250px;
@@ -2185,7 +2139,7 @@ section.cart {
color: #8E8E8E;
}
}
-
+
p {
font-size: 16px;
color: #3A3A3A;
@@ -2210,8 +2164,8 @@ section.cart {
.order-section-head-small {
display: block;
margin-top: -15px;
-
- span {
+
+ span {
display:inline-block;
width:33.3%;
}
@@ -2259,7 +2213,7 @@ section.cart {
.placed-on {
display: flex;
- flex-direction: column;
+ flex-direction: column;
.place-text {
width:100%;
@@ -2292,10 +2246,10 @@ section.cart {
.payment-status {
display: flex;
- flex-direction: column;
-
+ flex-direction: column;
+
.payment-text {
-
+
span {
font-size: 14px;
}
@@ -2305,7 +2259,7 @@ section.cart {
margin-top: 2px;
}
}
-
+
.horizontal-rule {
margin-top: 1.1%;
width: 100%;
@@ -2322,11 +2276,11 @@ section.cart {
.total {
margin-top: 5%;
height: 130px;
-
+
.calculate {
width: 100%;
float: left;
-
+
.sub-total {
.left {
@@ -2343,13 +2297,13 @@ section.cart {
width:25%;
}
}
-
+
.ship-handle {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2359,13 +2313,13 @@ section.cart {
width:25%;
}
}
-
+
.discount {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2375,9 +2329,9 @@ section.cart {
width:25%;
}
}
-
+
.grand-total {
-
+
.left {
margin-left: 0px;
}
@@ -2391,13 +2345,13 @@ section.cart {
width:25%;
}
}
-
+
.due {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2417,23 +2371,23 @@ section.cart {
.table {
display:none;
}
-
+
.product-config {
border: 1px solid #E8E8E8;
height: 19%;
width:100%;
- margin-top: 10px;
+ margin-top: 10px;
display: block;
.product-attribute {
display: flex;
- flex-direction: row;
-
+ flex-direction: row;
+
.product-property {
width: 30%;
margin-top: 10px;
margin-left: 5px;
-
+
span {
font-size: 14px;
color: #5E5E5E;
@@ -2457,7 +2411,7 @@ section.cart {
.order-information {
flex-direction: column;
-
+
.order-address-method {
width : 250px;
}
@@ -2490,8 +2444,8 @@ section.cart {
.order-section-head-small {
display: block;
margin-top: -15px;
-
- span {
+
+ span {
display:inline-block;
width:33.3%;
}
@@ -2539,7 +2493,7 @@ section.cart {
.placed-on {
display: flex;
- flex-direction: column;
+ flex-direction: column;
.place-text {
width:100%;
@@ -2572,10 +2526,10 @@ section.cart {
.payment-status {
display: flex;
- flex-direction: column;
-
+ flex-direction: column;
+
.payment-text {
-
+
span {
font-size: 14px;
}
@@ -2585,7 +2539,7 @@ section.cart {
margin-top: 2px;
}
}
-
+
.horizontal-rule {
margin-top: 1.1%;
width: 100%;
@@ -2602,11 +2556,11 @@ section.cart {
.total {
margin-top: 5%;
height: 130px;
-
+
.calculate {
width: 100%;
float: left;
-
+
.sub-total {
.left {
@@ -2623,13 +2577,13 @@ section.cart {
width:25%;
}
}
-
+
.ship-handle {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2639,13 +2593,13 @@ section.cart {
width:25%;
}
}
-
+
.discount {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2655,9 +2609,9 @@ section.cart {
width:25%;
}
}
-
+
.grand-total {
-
+
.left {
margin-left: 0px;
}
@@ -2671,13 +2625,13 @@ section.cart {
width:25%;
}
}
-
+
.due {
-
+
.left {
margin-left: 0px;
}
-
+
.middle {
display: none;
}
@@ -2697,23 +2651,23 @@ section.cart {
.table {
display:none;
}
-
+
.product-config {
border: 1px solid #E8E8E8;
height: 19%;
width:100%;
- margin-top: 10px;
+ margin-top: 10px;
display: block;
.product-attribute {
display: flex;
- flex-direction: row;
-
+ flex-direction: row;
+
.product-property {
width: 30%;
margin-top: 10px;
margin-left: 5px;
-
+
span {
font-size: 14px;
color: #5E5E5E;
@@ -2737,7 +2691,7 @@ section.cart {
.order-information {
flex-direction: column;
-
+
.order-address-method {
width : 250px;
}
@@ -2765,7 +2719,7 @@ section.cart {
.checkout-process{
display: flex;
- flex-direction: row;
+ flex-direction: row;
width: 100%;
margin-top:3%;
@@ -2778,16 +2732,16 @@ section.cart {
width: 100%;
ul.checkout-detail {
- height: 60px;
+ height: 60px;
display: inline-flex;
justify-content: space-between;
width: 100%;
padding: 5px;
-
+
li {
- height: 48px;
-
+ height: 48px;
+
.wrapper {
display:flex;
@@ -2796,13 +2750,13 @@ section.cart {
width: 48px;
border: 1px solid black;
border-radius: 50%;
- display: inline-flex;
+ display: inline-flex;
border: 1px solid #E8E8E8;
img {
margin: auto;
}
}
-
+
.decorator.active {
border: 1px solid blue;
}
@@ -2814,7 +2768,7 @@ section.cart {
font-size: 16px;
}
- }
+ }
}
}
@@ -2827,7 +2781,7 @@ section.cart {
}
}
}
-
+
.right-side {
height: 300px;
width: 300px;
@@ -2846,7 +2800,7 @@ section.cart {
}
}
-
+
.item-detail {
margin-top:12px;
@@ -2886,7 +2840,7 @@ section.cart {
font-weight: bold;
}
.right {
-
+
float:right;
font-size: 16px;
color: #242424;
@@ -2895,7 +2849,7 @@ section.cart {
}
}
}
-
+
}
.order-info{
@@ -2916,14 +2870,6 @@ section.cart {
.sign-in {
float:right;
- background: #0031F0;
- font-size: 14px;
- color: #FFFFFF;
- letter-spacing: -0.26px;
- text-align: center;
- height: 38px;
- width: 103px;
- border: none;
}
@@ -2941,7 +2887,7 @@ section.cart {
span {
color:red;
}
-
+
}
.different-billing-addr {
@@ -2964,17 +2910,6 @@ section.cart {
.countinue-button {
margin-top: 3%;
-
- button {
- background: #0031F0;
- font-size: 14px;
- color: #FFFFFF;
- letter-spacing: -0.26px;
- text-align: center;
- height: 38px;
- width: 137px;
- border: none;
- }
}
}
@@ -2992,26 +2927,26 @@ section.cart {
width: 100%;
margin-right: 0%;
height: 60px;
-
+
.checkout-menu {
width: 100%;
-
+
ul.checkout-detail {
- height: 60px;
+ height: 60px;
width: 100%;
padding: 5px;
-
+
li {
- height: 48px;
-
+ height: 48px;
+
.wrapper {
display:flex;
-
+
span {
display: none;
}
-
- }
+
+ }
}
.line {
@@ -3023,7 +2958,7 @@ section.cart {
height: 1px;
}
}
-
+
.horizontal-rule {
display: none;
}
@@ -3040,7 +2975,7 @@ section.cart {
margin-right: 0%;
margin-top: 10px;
height:50px;
-
+
.control-group {
.control{
@@ -3051,11 +2986,11 @@ section.cart {
.different-billing-addr {
margin-top: 5%;
}
-
+
.horizontal-rule {
margin-top: 10%;
}
-
+
.countinue-button {
margin-top: 8%;
}
@@ -3072,26 +3007,26 @@ section.cart {
width: 100%;
margin-right: 0%;
height: 60px;
-
+
.checkout-menu {
width: 100%;
-
+
ul.checkout-detail {
- height: 60px;
+ height: 60px;
width: 100%;
padding: 5px;
-
+
li {
- height: 48px;
-
+ height: 48px;
+
.wrapper {
display:flex;
-
+
span {
display: none;
}
-
- }
+
+ }
}
.line {
@@ -3103,7 +3038,7 @@ section.cart {
height: 1px;
}
}
-
+
.horizontal-rule {
display: none;
}
@@ -3120,7 +3055,7 @@ section.cart {
margin-right: 0%;
margin-top: 10px;
height:50px;
-
+
.control-group {
.control{
@@ -3131,11 +3066,11 @@ section.cart {
.different-billing-addr {
margin-top: 3%;
}
-
+
.horizontal-rule {
margin-top: 10%;
}
-
+
.countinue-button {
margin-top: 5%;
}
@@ -3190,7 +3125,7 @@ section.cart {
span {
color:red;
}
-
+
}
.forgot-pass {
@@ -3212,8 +3147,8 @@ section.cart {
.countinue-button {
margin-top: 3%;
-
- button {
+
+ button {
background: #0031F0;
font-size: 14px;
color: #FFFFFF;
@@ -3261,8 +3196,8 @@ section.cart {
font-weight: bold;
}
- }
-
+ }
+
.price-checkbox-text {
margin-left: 25px;
width:580px;
@@ -3279,8 +3214,8 @@ section.cart {
line-height: 22px;
}
}
-
-
+
+
}
.horizontal-rule {
@@ -3293,8 +3228,8 @@ section.cart {
.countinue-button {
margin-top: 3%;
-
- button {
+
+ button {
background: #0031F0;
font-size: 14px;
color: #FFFFFF;
@@ -3341,8 +3276,8 @@ section.cart {
font-weight: bold;
}
- }
-
+ }
+
.payment-checkbox-text {
margin-left: 25px;
width:580px;
@@ -3359,8 +3294,8 @@ section.cart {
line-height: 22px;
}
}
-
-
+
+
}
.horizontal-rule {
@@ -3373,8 +3308,8 @@ section.cart {
.countinue-button {
margin-top: 3%;
-
- button {
+
+ button {
background: #0031F0;
font-size: 14px; .horizontal-rule {
margin-top: 7%;
@@ -3403,13 +3338,13 @@ section.cart {
// complete page start here
-
+
.complete-page{
width:880px;
height: 1050px;
.order-summary {
-
+
span {
font-size: 24px;
color: #242424;
@@ -3420,15 +3355,15 @@ section.cart {
.address {
display: flex;
- flex-direction: row;
+ flex-direction: row;
margin-top: 30px;
-
+
.shipping-address {
height: 100px;
width: 415px;
.shipping-title {
-
+
span {
font-weight: bold;
font-size: 16px;
@@ -3439,7 +3374,7 @@ section.cart {
.shipping-content {
margin-top: 15px;
width: 175px;
-
+
.addr {
margin-top: 5px;
@@ -3470,9 +3405,9 @@ section.cart {
.billing-address {
width: 415px;
-
+
.shipping-title {
-
+
span {
font-weight: bold;
font-size: 16px;
@@ -3483,7 +3418,7 @@ section.cart {
.shipping-content {
margin-top: 15px;
width: 175px;
-
+
.addr {
margin-top: 5px;
@@ -3519,11 +3454,11 @@ section.cart {
border-radius: 3px;
margin-top: 30px;
display: flex;
- flex-direction: row;
+ flex-direction: row;
.product-image {
margin: 20px 0px 20px 20px;
-
+
img {
height: 160px;
width:160px;
@@ -3533,7 +3468,7 @@ section.cart {
.product-desc {
margin-top: 20px;
margin-left: 10px;
-
+
.product-title {
span {
@@ -3587,7 +3522,7 @@ section.cart {
margin-top:14px;
span {
-
+
font-size: 16px;
color: #242424;
}
@@ -3600,26 +3535,26 @@ section.cart {
border-radius: 3px;
margin-top: 30px;
display: flex;
- flex-direction: row;
+ flex-direction: row;
justify-content: space-between;
-
+
.payment {
-
+
.shipping{
display: flex;
- flex-direction: row;
+ flex-direction: row;
.pay-icon {
height: 48px;
width: 48px;
border-radius: 50%;
border: 1px solid #E8E8E8;
-
+
img {
margin-left: 8px;
margin-top: 8px;
}
-
+
span {
margin-left: 10px;
font-size: 16px;
@@ -3630,7 +3565,7 @@ section.cart {
.shipping-text {
display: flex;
- flex-direction: column;
+ flex-direction: column;
.price {
margin-top: 5px;
@@ -3645,7 +3580,7 @@ section.cart {
.fedex-shipping {
margin-left: 5px;
-
+
span {
font-size: 16px;
color: #242424;
@@ -3658,14 +3593,14 @@ section.cart {
.net-banking{
margin-top: 23px;
display: flex;
- flex-direction: row;
+ flex-direction: row;
.pay-icon {
height: 48px;
width: 48px;
border-radius: 50%;
border: 1px solid #E8E8E8;
-
+
img {
margin-left: 8px;
margin-top: 8px;
@@ -3685,13 +3620,13 @@ section.cart {
.product-bill {
height:200px;
width:300px;
-
+
.sub-total {
span {
font-size: 16px;
color: #242424;
- letter-spacing: -0.38px;
+ letter-spacing: -0.38px;
}
.right{
@@ -3705,9 +3640,9 @@ section.cart {
span {
font-size: 16px;
color: #242424;
- letter-spacing: -0.38px;
+ letter-spacing: -0.38px;
}
-
+
.right{
float:right;
}
@@ -3727,14 +3662,14 @@ section.cart {
span {
font-size: 16px;
color: #242424;
- letter-spacing: -0.38px;
+ letter-spacing: -0.38px;
}
-
+
.right{
float:right;
}
}
- }
+ }
}
.horizontal-rule {
@@ -3760,7 +3695,7 @@ section.cart {
}
}
-// complete page end here
+// complete page end here
// review page start here
@@ -3779,7 +3714,7 @@ section.review {
margin-top: 20px;
.product-info {
-
+
.image {
border:1px solid red;
@@ -3855,21 +3790,21 @@ section.review {
}
.stars {
-
+
width: 270px;
display: inline-block;
-
+
label.star {
font-size: 36px;
color: #d4d4d4;
transition: all .2s;
}
-
+
label.star:before {
content: '\2605';
}
-
- }
+
+ }
.write-review {
margin-top: 25px;
@@ -3913,7 +3848,7 @@ section.review {
margin-top: 40px;
margin-left: 20px;
width: 48%;
-
+
.avg-rating-count{
span {
diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php
index 914f33216..f2aaaf9a6 100644
--- a/packages/Webkul/Shop/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php
@@ -49,6 +49,9 @@ return [
'specification' => 'Specification',
'total-reviews' => ':total Reviews',
'by' => 'By :name',
- 'up-sell-title' => 'We found other products you might like!'
+ 'up-sell-title' => 'We found other products you might like!',
+ 'reviews-title' => 'Ratings & Reviews',
+ 'write-review-btn' => 'Write Review',
+ 'choose-option' => 'Choose an option'
]
];
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/common.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common.blade.php
deleted file mode 100644
index ba9174032..000000000
--- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/common.blade.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
- Price Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/common.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/common.blade.php
new file mode 100644
index 000000000..68186c19b
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/common.blade.php
@@ -0,0 +1,8 @@
+
+
+ @include('shop::customers.checkout.common.nav-left')
+
+ @include('shop::customers.checkout.common.nav-right')
+
+
+
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-left.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-left.blade.php
new file mode 100644
index 000000000..2a33dfe10
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-left.blade.php
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-right.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-right.blade.php
new file mode 100644
index 000000000..2a7cba245
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/common/nav-right.blade.php
@@ -0,0 +1,37 @@
+
+
+
+ Price Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/guest.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/guest.blade.php
new file mode 100644
index 000000000..475c06621
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/guest.blade.php
@@ -0,0 +1,73 @@
+
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/index.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/index.blade.php
index 817177347..8342d022e 100644
--- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/index.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/index.blade.php
@@ -2,178 +2,68 @@
@section('content-wrapper')
-
-
-
-
-
-
-
-
-
- Price Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@endsection
+
+@push('scripts')
+
+
+
+
+
+
+
+@endpush
+
+
+
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php
index 3508e711b..5eda20d85 100644
--- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php
@@ -3,7 +3,7 @@
@section('content-wrapper')
-@include('shop::customers.checkout.common')
+@include('shop::customers.checkout.common.common')
-
+
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php
index 08fc6f915..b0303e15d 100644
--- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php
@@ -1,9 +1,4 @@
-@extends('shop::layouts.master')
-
-@section('content-wrapper')
-
-@include('shop::customers.checkout.common')
@@ -14,7 +9,8 @@
- }})
+ {{-- }}) --}}
+
$ 25.00
@@ -45,7 +41,7 @@
-
+
@@ -54,4 +50,3 @@
-@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/index.blade.php b/packages/Webkul/Shop/src/Resources/views/index.blade.php
new file mode 100644
index 000000000..a8e715d27
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/index.blade.php
@@ -0,0 +1,24 @@
+@inject('rateHelper' , 'Webkul\Shipping\Helper\Rate')
+
+
+
+
+ @foreach($rateHelper->collectRates() as $key=>$count)
+
+
+
+ ${{ core()->currency($count) }} {{ $key }}
+
+
+
+
+ @endforeach
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
index 34f182e1a..4a8597386 100644
--- a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php
@@ -22,11 +22,7 @@
@include ('shop::products.price', ['product' => $product])
- @if ($product->reviews->count())
-
- @include ('shop::products.review', ['product' => $product])
-
- @endif
+ @include ('shop::products.review', ['product' => $product])
@include ('shop::products.add-to', ['product' => $product])
diff --git a/packages/Webkul/Shop/src/Resources/views/products/review.blade.php b/packages/Webkul/Shop/src/Resources/views/products/review.blade.php
index f5cd7d9ed..fb9c2f09c 100644
--- a/packages/Webkul/Shop/src/Resources/views/products/review.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/review.blade.php
@@ -1,11 +1,19 @@
-
+@inject ('reviewHelper', 'Webkul\Product\Product\Review')
- @inject ('reviewHelper', 'Webkul\Product\Product\Review')
+@if ($total = $reviewHelper->getTotalReviews($product))
+
- @for ($i = 1; $i <= $reviewHelper->getAverageRating($product); $i++)
+
+ @for ($i = 1; $i <= round($reviewHelper->getAverageRating($product)); $i++)
-
-
- @endfor
-
-
\ No newline at end of file
+
+
+ @endfor
+
+
+
+ {{ __('shop::app.products.total-reviews', ['total' => $total]) }}
+
+
+
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/views/products/reviews/index.blade.php b/packages/Webkul/Shop/src/Resources/views/products/reviews/index.blade.php
index 763e98866..ee0f7a427 100644
--- a/packages/Webkul/Shop/src/Resources/views/products/reviews/index.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/reviews/index.blade.php
@@ -1,6 +1,7 @@
@inject ('reviewHelper', 'Webkul\Product\Product\Review')
@inject ('priceHelper', 'Webkul\Product\Product\Price')
+
@extends('shop::layouts.master')
@section('content-wrapper')
diff --git a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php
index 8e776dd5f..c42e1a245 100644
--- a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php
@@ -10,53 +10,56 @@
- @include ('shop::products.view.gallery')
+ |
-
+
\ No newline at end of file