Skip to content

Commit 547c2d8

Browse files
committed
Init file
1 parent b489bee commit 547c2d8

File tree

9 files changed

+131
-5
lines changed

9 files changed

+131
-5
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG: https://www.mageplaza.com/releases/store-credit/

LICENSE

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Copyright (c) 2016-present Mageplaza Co. Ltd.
2+
3+
This License is entered by Mageplaza to govern the usage or redistribution of Mageplaza software. This is a legal agreement between you (either an individual or a single entity) and Mageplaza for Mageplaza software product(s) which may include extensions, templates and services.
4+
5+
By purchasing, installing, or otherwise using Mageplaza products, you acknowledge that you have read this License and agree to be bound by the terms of this Agreement. If you do not agree to the terms of this License, do not install or use Mageplaza products.
6+
7+
The Agreement becomes effective at the moment when you acquire software from our site or receive it through email or on data medium or by any other means. Mageplaza reserves the right to make reasonable changes to the terms of this license agreement and impose its clauses at any given time.
8+
9+
1. GRANT OF LICENSE: By purchasing a product of Mageplaza:
10+
11+
1. Customer will receive source code open 100%.
12+
13+
2. Customer will obtain a License Certificate which will remain valid until the Customer stops using the Product or until Mageplaza terminates this License because of Customer’s failure to comply with any of its Terms and Conditions. Each License Certificate includes a license serial which is valid for one live Magento installation only and unlimited test Magento installations.
14+
15+
3. You are allowed to customize our products to fit with your using purpose.
16+
17+
4. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS
18+
19+
5. Installation and Use
20+
21+
6. For each new Software installation, you are obliged to purchase a separate License. You are not permitted to use any part of the code in whole or part in any other software or product or website. You are legally bound to preserve the copyright information intact including the text/link at bottom.
22+
23+
2. Distribution: You are not allowed to distribute Mageplaza software to third parties. Any distribution without our permission, including non commercial distribution is considered as violation of this Agreement and entails liability, according to the current law. You may not place the Software onto a server that allows access to the Software via a public network or the Internet for distribution purposes.
24+
25+
3. Rental: You may not give, sell, sub-license, rent, lease or lend any portion of the Software to anyone.
26+
27+
4. Compliance with Applicable Laws: You must comply with all applicable laws regarding use of software products. Mageplaza software and a portion of it are protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Accordingly, customer is required to treat the software like any other copyrighted material. Any activity violating copyright law will be prosecuted according to the current law. We retain the right to revoke the license of any user holding an invalid license.
28+
29+
5. TERMINATION: Without prejudice to any other rights, Mageplaza may terminate this License at any time if you fail to comply with the terms and conditions of this License. In such event, it constitutes a breach of the agreement, and your license to use the program is revoked and you must destroy all copies of Mageplaza products in your possession. After being notified of termination of your license, if you continue to use Mageplaza software, you hereby agree to accept an injunction to prevent you from its further use and to pay all costs (including but not limited to reasonable attorney fees) to enforce our revocation of your license and any damages suffered by us because of your misuse of the Software. We are not bound to return you the amount spent for purchase of the Software for the termination of this License.
30+
31+
6. LIMITATION OF LIABILITY: In no event shall Mageplaza be liable for any damages (including, without limitation, lost profits, business interruption, or lost information) rising out of ‘Authorized Users’ use of or inability to use the Mageplaza products, even if Mageplaza has been advised of the possibility of such damages. In no event will Mageplaza be liable for prosecution arising from use of the Software against law or for any illegal use.
32+
33+
The latest License: https://www.mageplaza.com/LICENSE.txt

Model/Resolver/AbstractStoreCredit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class AbstractStoreCredit implements ResolverInterface
4242
protected $helperData;
4343

4444
/**
45-
* AbstractReward constructor.
45+
* AbstractStoreCredit constructor.
4646
*
4747
* @param Data $helperData
4848
*/
@@ -57,7 +57,7 @@ public function __construct(Data $helperData)
5757
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
5858
{
5959
if (!$this->helperData->isEnabled()) {
60-
throw new GraphQlNoSuchEntityException(__('Reward points is disabled.'));
60+
throw new GraphQlNoSuchEntityException(__('Store Credit is disabled.'));
6161
}
6262

6363
if ($this->helperData->versionCompare('2.3.3')) {

Model/Resolver/StoreCreditCustomer/Account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function resolve(
8181

8282
$customer = $value['model'];
8383

84-
$storeCreditCustomer = $this->storeCreditCustomerFactory->create()->loadByCustomerId($customer->getId());
84+
$storeCreditCustomer = $this->storeCreditCustomerFactory->create()->loadByCustomerId($customer->getId());
8585
$data = $storeCreditCustomer->toArray();
8686
$data['mp_credit_balance'] = $storeCreditCustomer->getMpCreditBalance();
8787
$data['mp_credit_notification'] = $storeCreditCustomer->getMpCreditNotification();

Model/Resolver/StoreCreditCustomer/Transaction.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,3 @@ public function getSearchResult($customer, $searchCriteria)
117117
return $result;
118118
}
119119
}
120-

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
# Store Credit GraphQl
1+
# Store Credit GraphQL
22

3+
Mageplaza Store Credit Extension supports getting and pushing data on the website with GraphQl.
4+
5+
## How to install
6+
7+
Run the following command in Magento 2 root folder:
8+
9+
```
10+
composer require mageplaza/module-store-credit-graphql
11+
php bin/magento setup:upgrade
12+
php bin/magento setup:static-content:deploy
13+
```

USER-GUIDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Documentation
2+
3+
- Installation guide: https://www.mageplaza.com/install-magento-2-extension/#solution-1-ready-to-paste
4+
- User Guide: https://docs.mageplaza.com/store-credit/index.html
5+
- Product page: https://www.mageplaza.com/magento-2-store-credit/
6+
- FAQs: https://www.mageplaza.com/faqs/
7+
- Get Support: https://www.mageplaza.com/contact.html or support@mageplaza.com
8+
- Changelog: https://www.mageplaza.com/releases/store-credit
9+
- License agreement: https://www.mageplaza.com/LICENSE.txt
10+
11+
## How to install
12+
13+
### Install ready-to-paste package (Recommended)
14+
15+
- Installation guide: https://www.mageplaza.com/install-magento-2-extension/
16+
17+
## How to upgrade
18+
19+
1. Backup
20+
21+
Backup your Magento code, database before upgrading.
22+
23+
2. Remove StoreCredit folder
24+
25+
In case of customization, you should backup the customized files and modify in newer version.
26+
Now you remove `app/code/Mageplaza/StoreCredit` folder. In this step, you can copy override StoreCredit folder but this may cause of compilation issue. That why you should remove it.
27+
28+
3. Upload new version
29+
Upload this package to Magento root directory
30+
31+
4. Run command line:
32+
33+
```
34+
php bin/magento setup:upgrade
35+
php bin/magento setup:static-content:deploy
36+
```
37+
38+
39+
## FAQs
40+
41+
42+
#### Q: I got error: `Mageplaza_Core has been already defined`
43+
A: Read solution: https://github.com/mageplaza/module-core/issues/3
44+
45+
46+
#### Q: My site is down
47+
A: Please follow this guide: https://www.mageplaza.com/blog/magento-site-down.html
48+
49+
50+
## Support
51+
52+
- FAQs: https://www.mageplaza.com/faqs/
53+
- https://www.mageplaza.com/contact.html
54+
- support@mageplaza.com

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "mageplaza/module-store-credit-graphql",
3+
"description": "Magento 2 Store Credit GraphQL Extension",
4+
"type": "magento2-module",
5+
"version": "1.0.0",
6+
"license": "proprietary",
7+
"authors": [
8+
{
9+
"name": "Mageplaza",
10+
"email": "support@mageplaza.com",
11+
"homepage": "https://www.mageplaza.com",
12+
"role": "Technical Support"
13+
}
14+
],
15+
"autoload": {
16+
"files": [
17+
"registration.php"
18+
],
19+
"psr-4": {
20+
"Mageplaza\\StoreCreditGraphQl\\": ""
21+
}
22+
}
23+
}

i18n/en_US.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"Store Credit is disabled.","Store Credit is disabled."
2+
"The current customer isn't authorized.","The current customer isn't authorized."
3+
"""model"" value should be specified","""model"" value should be specified"
4+
"currentPage value must be greater than 0.","currentPage value must be greater than 0."
5+
"pageSize value must be greater than 0.","pageSize value must be greater than 0."

0 commit comments

Comments
 (0)