diff --git a/FEATURE_REQUEST_TEMPLATE.md b/FEATURE_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..72ac44d98
--- /dev/null
+++ b/FEATURE_REQUEST_TEMPLATE.md
@@ -0,0 +1,66 @@
+
+
+ Feature
+
+
+
+
+
+
Title
+
+
+
+ A well written title should contain a clear, brief explanation of the Feature, making emphasis on the most important points.
+
+
+
+
+
Preconditions
+
+
Please provide as detailed information about your environment as possible.
+
+ framework Version:
+ Commit id:
+
+
+
+
+
Description
+
+
Description helps the developer to understand the Feature.
+
+
+
+
+
Steps to reproduce
+
+
It is important to provide a set of clear steps to that location where feature need to be added. If relevant please include code samples.
+
+ step1
+ step2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000..8dc67d40e
--- /dev/null
+++ b/ISSUE_TEMPLATE.md
@@ -0,0 +1,29 @@
+# Bug report
+
+### Title
+ **Title is a vital part of bug report for developer and triager to quickly identify a unique issue.**
+
+ A well written title should contain a clear, brief explanation of the issue, making emphasis on the most important points.
+
+### Issue Description
+ **Bug description helps the developer to understand the bug.It describes the problem encountered.**
+
+### Preconditions
+ **Please provide as detailed information about your environment as possible.**
+
+ 1. framework Version.
+ 2. Commit id.
+
+### Steps to reproduce
+ **It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.**
+
+ 1. step1
+ 2. step2
+
+### Expected result
+ **Tell us what should happen.**
+* [Screenshots, logs or description]
+
+### Actual result
+ **Tell us what happens instead.**
+ * [Tell us what happens instead]
\ No newline at end of file
diff --git a/README.md b/README.md
index d7f8566a2..3b2800f16 100755
--- a/README.md
+++ b/README.md
@@ -48,6 +48,7 @@ It packs in lots of demanding features that allows your business to scale in no
* Customer Cart, Wishlist, Product Reviews.
* Simple and Configurable Products.
* Price rules (Discount) inbuilt.
+* CMS Pages.
* Check out [click here](https://bagisto.com/features/).
**For Developers**:
diff --git a/SUPPORT_TEMPLATE.md b/SUPPORT_TEMPLATE.md
new file mode 100644
index 000000000..f692a9498
--- /dev/null
+++ b/SUPPORT_TEMPLATE.md
@@ -0,0 +1,48 @@
+
+
+ Support
+
+
+
+
+
+
Title
+
+
+ Title is a vital part of bug report for developer and triager to quickly identify a unique issue.
+
+ A well written title should contain a clear, brief explanation of the issue, making emphasis on the most important points.
+
+
+
+
+
Preconditions
+
+
Please provide as detailed information about your environment as possible.
+
+ framework Version:
+ Commit id:
+
+
+
+
+
Description
+
+
Description helps the developer to understand the exact scenario.It describes the problem encountered.
+
+
+
+
Steps to reproduce
+
+
It is important to provide a set of clear steps to reproduce that scenario. If relevant please include code samples.
+
+ step1
+ step2
+
+
+
diff --git a/composer.json b/composer.json
index 64464aec4..fa707f8ab 100755
--- a/composer.json
+++ b/composer.json
@@ -113,7 +113,8 @@
"extra": {
"laravel": {
"dont-discover": [
- "barryvdh/laravel-debugbar"
+ "barryvdh/laravel-debugbar",
+ "laravel/dusk"
]
}
},
diff --git a/packages/Webkul/Admin/src/Config/menu.php b/packages/Webkul/Admin/src/Config/menu.php
index dd92aa092..6435b5f41 100755
--- a/packages/Webkul/Admin/src/Config/menu.php
+++ b/packages/Webkul/Admin/src/Config/menu.php
@@ -42,7 +42,7 @@ return [
'key' => 'catalog.products',
'name' => 'admin::app.layouts.products',
'route' => 'admin.catalog.products.index',
- 'sort' => 4,
+ 'sort' => 1,
'icon-class' => ''
], [
'key' => 'catalog.categories',
@@ -54,13 +54,13 @@ return [
'key' => 'catalog.attributes',
'name' => 'admin::app.layouts.attributes',
'route' => 'admin.catalog.attributes.index',
- 'sort' => 1,
+ 'sort' => 2,
'icon-class' => ''
], [
'key' => 'catalog.families',
'name' => 'admin::app.layouts.attribute-families',
'route' => 'admin.catalog.families.index',
- 'sort' => 2,
+ 'sort' => 4,
'icon-class' => ''
], [
'key' => 'customers',
diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php
index f37cd3a71..dbde85f72 100755
--- a/packages/Webkul/Admin/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php
@@ -991,6 +991,8 @@ return [
'cms' => [
'pages' => [
+ 'general' => 'General',
+ 'seo' => 'SEO',
'pages' => 'Page',
'title' => 'pages',
'add-title' => 'Add Page',
@@ -998,7 +1000,7 @@ return [
'url-key' => 'URL Key',
'channel' => 'Channel',
'locale' => 'Locale',
- 'create-btn-title' => 'Add Page',
+ 'create-btn-title' => 'Save Page',
'edit-title' => 'Edit Page',
'edit-btn-title' => 'Save Page',
'create-success' => 'Page created successfully',
diff --git a/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php b/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php
index 255a73326..078c1edd1 100644
--- a/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php
@@ -28,91 +28,98 @@
diff --git a/packages/Webkul/Admin/src/Resources/views/cms/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/cms/edit.blade.php
index e18ff2440..7a071f571 100644
--- a/packages/Webkul/Admin/src/Resources/views/cms/edit.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/cms/edit.blade.php
@@ -32,64 +32,71 @@
diff --git a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
index c0859e99e..26b21a4c6 100755
--- a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
@@ -100,6 +100,10 @@
+ @elseif ($field['type'] == 'color')
+
+
+
@elseif ($field['type'] == 'textarea')
diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php
index 6bbb39e25..3dcc9a055 100755
--- a/packages/Webkul/Checkout/src/Cart.php
+++ b/packages/Webkul/Checkout/src/Cart.php
@@ -313,6 +313,10 @@ class Cart {
$weight = ($product->type == 'configurable' ? $childProduct->weight : $product->weight);
+ if (gettype($weight)) {
+ $weight = floatval($weight);
+ }
+
$parentData = [
'sku' => $product->sku,
'quantity' => $data['quantity'],
diff --git a/packages/Webkul/Customer/src/Resources/lang/en/app.php b/packages/Webkul/Customer/src/Resources/lang/en/app.php
index 5f4c1f5ee..22f609f5e 100755
--- a/packages/Webkul/Customer/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Customer/src/Resources/lang/en/app.php
@@ -12,6 +12,6 @@ return [
'remove-all-success' => 'All The Items From Your Wishlist Have Been Removed',
],
'reviews' => [
- 'empty' => 'You Have Not Reviewed Any Of Product Yet'
+ 'empty' => 'You have not reviewed any of product yet'
]
];
\ No newline at end of file
diff --git a/packages/Webkul/Discount/src/Actions/Cart/FixedAmount.php b/packages/Webkul/Discount/src/Actions/Cart/FixedAmount.php
index a8a76352c..4a8990ef2 100644
--- a/packages/Webkul/Discount/src/Actions/Cart/FixedAmount.php
+++ b/packages/Webkul/Discount/src/Actions/Cart/FixedAmount.php
@@ -36,20 +36,24 @@ class FixedAmount extends Action
if ($discQuantity > 1) {
if ($itemQuantity >= $discQuantity) {
- if ($rule->disc_amount > $itemPrice) {
- $discount = round(($itemPrice - $rule->disc_amount), 4) * $discQuantity;
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
} else {
- $discount = $itemPrice;
+ $discount = $rule->disc_amount;
}
} else if ($itemQuantity < $discQuantity) {
- if ($rule->disc_amount > $itemPrice) {
- $discount = round(($itemPrice - $rule->disc_amount), 4) * $itemQuantity;
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
} else {
- $discount = $itemPrice;
+ $discount = $rule->disc_amount;
}
}
} else {
- $discount = round(($itemPrice - $rule->disc_amount), 4);
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
+ } else {
+ $discount = $rule->disc_amount;
+ }
}
if ($itemProductId == $productID) {
@@ -78,12 +82,24 @@ class FixedAmount extends Action
if ($discQuantity > 1) {
if ($itemQuantity >= $discQuantity) {
- $discount = round(($itemPrice - $rule->disc_amount), 4) * $discQuantity;
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
+ } else {
+ $discount = $rule->disc_amount;
+ }
} else if ($itemQuantity < $discQuantity) {
- $discount = round(($itemPrice - $rule->disc_amount), 4) * $itemQuantity;
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
+ } else {
+ $discount = $rule->disc_amount;
+ }
}
} else {
- $discount = round(($itemPrice - $rule->disc_amount), 4);
+ if ($rule->disc_amount >= $itemPrice) {
+ $discount = round($itemPrice * $discQuantity, 4);
+ } else {
+ $discount = $rule->disc_amount;
+ }
}
$totalDiscount = $totalDiscount + $discount;
diff --git a/packages/Webkul/Discount/src/Actions/Cart/PercentOfProduct.php b/packages/Webkul/Discount/src/Actions/Cart/PercentOfProduct.php
index 1ad74a6c8..c14b279af 100644
--- a/packages/Webkul/Discount/src/Actions/Cart/PercentOfProduct.php
+++ b/packages/Webkul/Discount/src/Actions/Cart/PercentOfProduct.php
@@ -53,11 +53,23 @@ class PercentOfProduct extends Action
if ($discQuantity > 1) {
if ($itemQuantity >= $discQuantity) {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4) * $discQuantity;
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
} else if ($itemQuantity < $discQuantity) {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4) * $itemQuantity;
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
}
} else {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4);
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
}
if ($itemProductId == $productID) {
@@ -87,11 +99,23 @@ class PercentOfProduct extends Action
if ($discQuantity > 1) {
if ($itemQuantity >= $discQuantity) {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4) * $discQuantity;
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
} else if ($itemQuantity < $discQuantity) {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4) * $itemQuantity;
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
}
} else {
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4);
+
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
}
$totalDiscount = $totalDiscount + $discount;
diff --git a/packages/Webkul/Discount/src/Actions/Cart/WholeCartToPercent.php b/packages/Webkul/Discount/src/Actions/Cart/WholeCartToPercent.php
index 60037f191..8f2c64f21 100644
--- a/packages/Webkul/Discount/src/Actions/Cart/WholeCartToPercent.php
+++ b/packages/Webkul/Discount/src/Actions/Cart/WholeCartToPercent.php
@@ -47,6 +47,10 @@ class WholeCartToPercent extends Action
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4);
+ if ($discount >= $itemPrice) {
+ $discount = $itemPrice;
+ }
+
$totalDiscount = $totalDiscount + $discount;
if ($item->product_id == $productID) {
@@ -76,26 +80,28 @@ class WholeCartToPercent extends Action
$discount = round(($itemPrice * $rule->disc_amount) / 100, 4);
+ if ($discount > $itemPrice) {
+ $discount = $itemPrice;
+ }
+
$totalDiscount = $totalDiscount + $discount;
- if ($item->product_id == $productID) {
- $report = array();
+ $report = array();
- $report['item_id'] = $item->id;
- $report['product_id'] = $item->child ? $item->child->product_id : $item->product_id;
+ $report['item_id'] = $item->id;
+ $report['product_id'] = $item->child ? $item->child->product_id : $item->product_id;
- if ($discount <= $itemPrice) {
- $report['discount'] = $discount;
- } else {
- $report['discount'] = $itemPrice;
- }
-
- $report['formatted_discount'] = core()->currency(round($discount, 4));
-
- $impact->push($report);
-
- unset($report);
+ if ($discount <= $itemPrice) {
+ $report['discount'] = $discount;
+ } else {
+ $report['discount'] = $itemPrice;
}
+
+ $report['formatted_discount'] = core()->currency(round($discount, 4));
+
+ $impact->push($report);
+
+ unset($report);
}
}
diff --git a/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php b/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php
index 9a356caf2..9f596b845 100644
--- a/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php
+++ b/packages/Webkul/Discount/src/Helpers/Cart/ConvertXToProductId.php
@@ -70,9 +70,16 @@ class ConvertXToProductId
$this->conditionSymbols = config('pricerules.cart.conditions.symbols');
}
+ /**
+ * Collects the attribute and category conditions
+ *
+ * @param Integer $ruleId
+ *
+ * @param Object $attrribute_conditions
+ */
public function convertX($ruleId, $attribute_conditions)
{
- $attributeConditions = json_decode($attribute_conditions);
+ $attributeConditions = $attribute_conditions;
$categoryValues = $attributeConditions->categories ?? null;
diff --git a/packages/Webkul/Discount/src/Helpers/Cart/Discount.php b/packages/Webkul/Discount/src/Helpers/Cart/Discount.php
index 6514ecde2..afb761cc9 100644
--- a/packages/Webkul/Discount/src/Helpers/Cart/Discount.php
+++ b/packages/Webkul/Discount/src/Helpers/Cart/Discount.php
@@ -668,7 +668,7 @@ abstract class Discount
if (! $result) {
$this->clearDiscount();
- $alreadyAppliedRule->delete();
+ $alreadyAppliedRule->first()->delete();
} else {
$this->reassess($alreadyAppliedCartRule);
}
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php
index 1c98d4b92..3beca8b8c 100644
--- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php
+++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php
@@ -269,6 +269,7 @@ class CartRuleController extends Controller
// $coupons['limit'] = $data['usage_limit'];
// }
+
// create a cart rule
$ruleCreated = $this->cartRule->create($data);
diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php
index 0608ef3dc..41d3d989f 100755
--- a/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php
@@ -13,10 +13,15 @@
{{ __('shop::app.checkout.success.info') }}
+ {{ view_render_event('bagisto.shop.checkout.continue-shopping.before', ['order' => $order]) }}
+
+
+ {{ view_render_event('bagisto.shop.checkout.continue-shopping.after', ['order' => $order]) }}
+
-@endsection
\ No newline at end of file
+@endsection