Skip to content

Commit 9d00df3

Browse files
committed
[Fixed: git issues resolved.]
1 parent 5044222 commit 9d00df3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3134
-164
lines changed

CHANGELOG for v0.1.x.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22

33
#### This changelog consists the bug & security fixes and new features being included in the releases listed below.
44

5+
## **v0.1.5(17th of February, 2020)** - *Release*
6+
7+
- [Bug] Default shipping method and payment method is not selected during checkout.
8+
9+
- [Bug] Review details is blank for configurable product.
10+
11+
- [Bug] Not getting success message on adding configurable product to wishlist.
12+
13+
- [Bug] Sign in customer also not able to make review.
14+
15+
- [Bug] Addresses gets added multiple time in Address Book of customer.
16+
17+
- [Bug] UI issue on cart page.
18+
19+
- [Bug] In Configuration Push Notification fields should not be required field, because of that customer not able to save configuration of pwa.
20+
21+
- [Bug] Wishlisted product is not visible in Customer->Wishlist section.
22+
23+
- [Bug] If from cart guest customer click on move to wishlist, then error message should throw.
24+
25+
- [Bug] Save as address should only available for signed in customer. If guest customer select to checkout with save as address option he is not able to checkout.
26+
27+
- [Bug] Issue with multi-currency. Price of product doesn't get updated in cart according to selected currency.
28+
29+
- [Bug] Layout issue in wishlist grid.
30+
31+
- [Bug] Unable to download Invoice.
32+
33+
- [Bug] Forward icon in shipment is not clickable.
34+
35+
- [Bug] Guest customer is able to make review, if it is not allowed from admin.
36+
37+
- [Bug] UI issue if special price is used for product.
38+
39+
- [Bug] Server Api key should be encrypted and on inspect element it should not visible.
40+
41+
- [Implement] save address option is not coming when logged in customer enters any new address on check out page.
42+
43+
- [Implement] Provide an option to delete review in PWA.
44+
45+
- [Implement] Push Notification Group and Server API key added in PWA configuration.
46+
47+
## **v0.1.4(13th of January, 2020)** - *Release*
48+
49+
- [compatible] Bagisto Version v0.1.9, v0.2.1, v0.2.2.
50+
51+
- [Bug] Filters are not visible.
52+
53+
- [Bug] Discount not applied on product.
54+
55+
- [Bug] After creating configurable product all products get disappear from front-end.
56+
57+
- [Implement] Not getting option to add coupon discount.
58+
559
## **v0.1.3(26th of December, 2019)** - *Release*
660

761
* [Update] Added missing language translations.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It packs in lots of demanding features that allows your business to scale in no
2222

2323
### 2. Requirements:
2424

25-
* **Bagisto**: v0.1.6 or higher.
25+
* **Bagisto**: v0.1.x, v0.2.1, v0.2.2.
2626

2727

2828
### 3. Installation:

packages/Webkul/PWA/publishable/assets/css/pwa-admin.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading

packages/Webkul/PWA/publishable/assets/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2-
"/js/app.js": "/js/app.js?id=e23694f9cb98fcc7d64c",
2+
"/js/app.js": "/js/app.js?id=e0ed52c91f6ed7e53c68",
3+
"/css/pwa-admin.css": "/css/pwa-admin.css?id=7073d876ccd90f556cb1",
34
"/css/pwa.css": "/css/pwa.css?id=9fefbeddf7c821649828"
45
}

packages/Webkul/PWA/src/Cart.php

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
<?php
2+
3+
namespace Webkul\PWA;
4+
5+
use Webkul\Checkout\Repositories\CartRepository;
6+
use Webkul\Checkout\Repositories\CartItemRepository;
7+
use Webkul\Checkout\Repositories\CartAddressRepository;
8+
use Webkul\Customer\Repositories\CustomerRepository;
9+
use Webkul\Product\Repositories\ProductRepository;
10+
use Webkul\Tax\Repositories\TaxCategoryRepository;
11+
use Webkul\Checkout\Models\CartPayment;
12+
use Webkul\Customer\Repositories\WishlistRepository;
13+
use Webkul\Customer\Repositories\CustomerAddressRepository;
14+
use Webkul\Product\Helpers\Price;
15+
use Webkul\Checkout\Cart as BaseCart;
16+
17+
/**
18+
* Class Cart.
19+
*
20+
*/
21+
class Cart extends BaseCart
22+
{
23+
24+
/**
25+
* CartRepository instance
26+
*
27+
* @var mixed
28+
*/
29+
protected $cart;
30+
31+
/**
32+
* CartItemRepository instance
33+
*
34+
* @var mixed
35+
*/
36+
protected $cartItem;
37+
38+
/**
39+
* CustomerRepository instance
40+
*
41+
* @var mixed
42+
*/
43+
protected $customer;
44+
45+
/**
46+
* CartAddressRepository instance
47+
*
48+
* @var mixed
49+
*/
50+
protected $cartAddress;
51+
52+
/**
53+
* ProductRepository instance
54+
*
55+
* @var mixed
56+
*/
57+
protected $product;
58+
59+
/**
60+
* TaxCategoryRepository instance
61+
*
62+
* @var mixed
63+
*/
64+
protected $taxCategory;
65+
66+
/**
67+
* WishlistRepository instance
68+
*
69+
* @var mixed
70+
*/
71+
protected $wishlist;
72+
73+
/**
74+
* CustomerAddressRepository instance
75+
*
76+
* @var mixed
77+
*/
78+
protected $customerAddress;
79+
80+
/**
81+
* Suppress the session flash messages
82+
*/
83+
protected $suppressFlash;
84+
85+
/**
86+
* Product price helper instance
87+
*/
88+
protected $price;
89+
90+
/**
91+
* Create a new controller instance.
92+
*
93+
* @param Webkul\Checkout\Repositories\CartRepository $cart
94+
* @param Webkul\Checkout\Repositories\CartItemRepository $cartItem
95+
* @param Webkul\Checkout\Repositories\CartAddressRepository $cartAddress
96+
* @param Webkul\Customer\Repositories\CustomerRepository $customer
97+
* @param Webkul\Product\Repositories\ProductRepository $product
98+
* @param Webkul\Product\Repositories\TaxCategoryRepository $taxCategory
99+
* @param Webkul\Product\Repositories\CustomerAddressRepository $customerAddress
100+
* @param Webkul\Product\Repositories\CustomerAddressRepository $customerAddress
101+
* @param Webkul\Discount\Repositories\CartRuleRepository $cartRule
102+
* @param Webkul\Helpers\Discount $discount
103+
* @return void
104+
*/
105+
public function __construct(
106+
CartRepository $cart,
107+
CartItemRepository $cartItem,
108+
CartAddressRepository $cartAddress,
109+
CustomerRepository $customer,
110+
ProductRepository $product,
111+
TaxCategoryRepository $taxCategory,
112+
WishlistRepository $wishlist,
113+
CustomerAddressRepository $customerAddress,
114+
Price $price
115+
)
116+
{
117+
parent::__construct(
118+
$cart,
119+
$cartItem,
120+
$cartAddress,
121+
$customer,
122+
$product,
123+
$taxCategory,
124+
$wishlist,
125+
$customerAddress,
126+
$price
127+
);
128+
129+
$this->product = $product;
130+
}
131+
132+
/**
133+
* Save customer address
134+
*
135+
* @return Mixed
136+
*/
137+
public function saveCustomerAddress($data)
138+
{
139+
if (! $cart = $this->getCart())
140+
return false;
141+
142+
$billingAddress = $data['billing'];
143+
$shippingAddress = $data['shipping'];
144+
$billingAddress['cart_id'] = $shippingAddress['cart_id'] = $cart->id;
145+
146+
if (isset($data['billing']['address_id']) && $data['billing']['address_id']) {
147+
$address = $this->customerAddress->findOneWhere(['id'=> $data['billing']['address_id']])->toArray();
148+
$billingAddress['first_name'] = $this->getCurrentCustomer()->user()->first_name;
149+
$billingAddress['last_name'] = $this->getCurrentCustomer()->user()->last_name;
150+
$billingAddress['email'] = $this->getCurrentCustomer()->user()->email;
151+
$billingAddress['address1'] = $address['address1'];
152+
$billingAddress['country'] = $address['country'];
153+
$billingAddress['state'] = $address['state'];
154+
$billingAddress['city'] = $address['city'];
155+
$billingAddress['postcode'] = $address['postcode'];
156+
$billingAddress['phone'] = $address['phone'];
157+
}
158+
159+
if (isset($data['shipping']['address_id']) && $data['shipping']['address_id']) {
160+
$address = $this->customerAddress->findOneWhere(['id'=> $data['shipping']['address_id']])->toArray();
161+
$shippingAddress['first_name'] = $this->getCurrentCustomer()->user()->first_name;
162+
$shippingAddress['last_name'] = $this->getCurrentCustomer()->user()->last_name;
163+
$shippingAddress['email'] = $this->getCurrentCustomer()->user()->email;
164+
$shippingAddress['address1'] = $address['address1'];
165+
$shippingAddress['country'] = $address['country'];
166+
$shippingAddress['state'] = $address['state'];
167+
$shippingAddress['city'] = $address['city'];
168+
$shippingAddress['postcode'] = $address['postcode'];
169+
$shippingAddress['phone'] = $address['phone'];
170+
}
171+
172+
if (isset($data['billing']['save_as_address']) && $data['billing']['save_as_address'] && ! isset($data['billing']['address_id'])) {
173+
$billingAddress['customer_id'] = $this->getCurrentCustomer()->user()->id;
174+
$this->customerAddress->create($billingAddress);
175+
}
176+
177+
if (isset($data['shipping']['save_as_address']) && $data['shipping']['save_as_address']) {
178+
$shippingAddress['customer_id'] = $this->getCurrentCustomer()->user()->id;
179+
$this->customerAddress->create($shippingAddress);
180+
}
181+
182+
if ($billingAddressModel = $cart->billing_address) {
183+
$this->cartAddress->update($billingAddress, $billingAddressModel->id);
184+
185+
if ($shippingAddressModel = $cart->shipping_address) {
186+
if (isset($billingAddress['use_for_shipping']) && $billingAddress['use_for_shipping']) {
187+
$this->cartAddress->update($billingAddress, $shippingAddressModel->id);
188+
} else {
189+
$this->cartAddress->update($shippingAddress, $shippingAddressModel->id);
190+
}
191+
} else {
192+
if (isset($billingAddress['use_for_shipping']) && $billingAddress['use_for_shipping']) {
193+
$this->cartAddress->create(array_merge($billingAddress, ['address_type' => 'shipping']));
194+
} else {
195+
$this->cartAddress->create(array_merge($shippingAddress, ['address_type' => 'shipping']));
196+
}
197+
}
198+
} else {
199+
$this->cartAddress->create(array_merge($billingAddress, ['address_type' => 'billing']));
200+
201+
if (isset($billingAddress['use_for_shipping']) && $billingAddress['use_for_shipping']) {
202+
$this->cartAddress->create(array_merge($billingAddress, ['address_type' => 'shipping']));
203+
} else {
204+
$this->cartAddress->create(array_merge($shippingAddress, ['address_type' => 'shipping']));
205+
}
206+
}
207+
208+
if ($this->getCurrentCustomer()->check()) {
209+
$cart->customer_email = $this->getCurrentCustomer()->user()->email;
210+
$cart->customer_first_name = $this->getCurrentCustomer()->user()->first_name;
211+
$cart->customer_last_name = $this->getCurrentCustomer()->user()->last_name;
212+
} else {
213+
$cart->customer_email = $cart->billing_address->email;
214+
$cart->customer_first_name = $cart->billing_address->first_name;
215+
$cart->customer_last_name = $cart->billing_address->last_name;
216+
}
217+
218+
$cart->save();
219+
220+
return true;
221+
}
222+
}

packages/Webkul/PWA/src/Config/menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'name' => 'Progressive Web App',
66
'route' => 'pwa.pushnotification.create',
77
'sort' => 9,
8-
'icon-class' => 'catalog-icon',
8+
'icon-class' => 'pwa-icon',
99
], [
1010
'key' => 'PWA.index',
1111
'route' => 'pwa.pushnotification.index',

0 commit comments

Comments
 (0)