From 7b55b5efb0c8362a1a82d14e372858765c66b6bf Mon Sep 17 00:00:00 2001 From: trunghieu Date: Tue, 13 Aug 2019 15:27:40 +0700 Subject: [PATCH 1/4] Fix Bug Minify JS --- view/frontend/layout/default.xml | 3 +++ view/frontend/web/js/config.js | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml index 9219756..a62ed1e 100644 --- a/view/frontend/layout/default.xml +++ b/view/frontend/layout/default.xml @@ -21,6 +21,9 @@ */ --> + + diff --git a/view/frontend/web/js/config.js b/view/frontend/web/js/config.js deleted file mode 100644 index 4b7ac51..0000000 --- a/view/frontend/web/js/config.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Mageplaza - * - * NOTICE OF LICENSE - * - * This source file is subject to the Mageplaza.com license that is - * available through the world-wide-web at this URL: - * https://www.mageplaza.com/LICENSE.txt - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade this extension to newer - * version in the future. - * - * @category Mageplaza - * @package Mageplaza_SocialShare - * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) - * @license https://www.mageplaza.com/LICENSE.txt - */ - -define([ - 'jquery', - 'uiComponent' -], function ($, component) { - 'use strict'; - return component.extend({ - initialize: function (config) { - var buttonColor = config.buttonColor, - iconColor = config.iconColor, - onClick = config.click, - popUp = config.popUp, - noService = config.service, - disabled = config.disable; - - var a2a = $('.a2a_kit'); - - var a2aJS = ''; - a2a.append(a2aJS); - } - }); -}); From 929b5a98c7cea54a2b7454f58f18aa4ba2127f3b Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jun 2020 15:57:44 +0700 Subject: [PATCH 3/4] Clean code --- .github/no-response.yml | 24 +- Block/SocialShare.php | 33 +- CHANGELOG | 2 +- LICENSE | 64 +-- Model/System/Config/Source/FloatCmsPages.php | 4 +- README.md | 2 +- USER-GUIDE.md | 108 ++-- composer.json | 52 +- etc/acl.xml | 72 +-- etc/adminhtml/system.xml | 532 +++++++++--------- etc/config.xml | 160 +++--- etc/module.xml | 58 +- i18n/en_US.csv | 5 +- .../frontend/layout/catalog_category_view.xml | 104 ++-- view/frontend/layout/catalog_product_view.xml | 128 ++--- view/frontend/layout/cms_index_index.xml | 98 ++-- view/frontend/layout/cms_page_view.xml | 70 +-- view/frontend/layout/contact_index_index.xml | 70 +-- view/frontend/layout/default.xml | 74 +-- 19 files changed, 833 insertions(+), 827 deletions(-) diff --git a/.github/no-response.yml b/.github/no-response.yml index 3d0bde5..37cdea3 100644 --- a/.github/no-response.yml +++ b/.github/no-response.yml @@ -1,13 +1,13 @@ -# Configuration for probot-no-response - https://github.com/probot/no-response - -# Number of days of inactivity before an Issue is closed for lack of response -daysUntilClose: 7 -# Label requiring a response -responseRequiredLabel: waiting-customer-response -# Comment to post when closing an Issue for lack of response. Set to `false` to disable -closeComment: > - This issue has been automatically closed because there has been no response - to our request for more information from the original author. With only the - information that is currently in the issue, we don't have enough information - to take action. Please reach out if you have or find the answers we need so +# Configuration for probot-no-response - https://github.com/probot/no-response + +# Number of days of inactivity before an Issue is closed for lack of response +daysUntilClose: 7 +# Label requiring a response +responseRequiredLabel: waiting-customer-response +# Comment to post when closing an Issue for lack of response. Set to `false` to disable +closeComment: > + This issue has been automatically closed because there has been no response + to our request for more information from the original author. With only the + information that is currently in the issue, we don't have enough information + to take action. Please reach out if you have or find the answers we need so that we can investigate further. \ No newline at end of file diff --git a/Block/SocialShare.php b/Block/SocialShare.php index f4ced6b..9152fac 100644 --- a/Block/SocialShare.php +++ b/Block/SocialShare.php @@ -69,7 +69,7 @@ public function __construct( array $data = [] ) { $this->_helperData = $helperData; - $this->_page = $page; + $this->_page = $page; parent::__construct($context, $data); } @@ -92,7 +92,7 @@ public function isEnable() */ public function getIconColor() { - return $this->_helperData->getButtonColor() .','. $this->_helperData->getIconColor(); + return $this->_helperData->getButtonColor() . ',' . $this->_helperData->getIconColor(); } /** @@ -120,9 +120,10 @@ public function isAddMoreShare() { return $this->_helperData->isAddMoreShare(); } - + /** * @param string $service + * * @return string */ public function getShareCounter($service) @@ -170,9 +171,9 @@ public function getEnableService() */ public function getImageUrl($service) { - $baseUrl = $this->_storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA); + $baseUrl = $this->_storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA); $modulePath = 'mageplaza/socialshare/'; - $imageUrl = $baseUrl . $modulePath . $service . '/' . $this->_helperData->getServiceImage($service); + $imageUrl = $baseUrl . $modulePath . $service . '/' . $this->_helperData->getServiceImage($service); return $imageUrl; } @@ -195,13 +196,13 @@ public function getDisabledServices() $disabledServices = []; foreach (self::SERVICES as $service) { if ($this->_helperData->getDisableService($service) !== null) { - $disabledServices[] = '"'. $this->_helperData->getDisableService($service) .'"'; + $disabledServices[] = '"' . $this->_helperData->getDisableService($service) . '"'; } } return implode(',', $disabledServices); } - + /** * @return int */ @@ -279,8 +280,8 @@ public function getContainerClass($displayType) */ public function isThisPageEnable() { - $type = $this->getData('type'); - $thisPage = $this->getData('page'); + $type = $this->getData('type'); + $thisPage = $this->getData('page'); $allowPages = null; if ($type === 'inline') { @@ -298,7 +299,7 @@ public function isThisPageEnable() } if ($this->_helperData->getFloatApplyPages() === FloatApplyFor::SELECT_PAGES) { $selectPages = explode(',', $this->_helperData->getFloatSelectPages()); - $cmsPages = explode(',', $this->_helperData->getFloatCmsPages()); + $cmsPages = explode(',', $this->_helperData->getFloatCmsPages()); if ($thisPage === 'cms_page') { $pageId = $this->_page->getPage()->getId(); if (in_array($pageId, $cmsPages, true)) { @@ -327,12 +328,12 @@ public function isShowUnderCart() */ public function isThisPositionEnable() { - $thisPosition = $this->getData('position'); + $thisPosition = $this->getData('position'); $positionArray = []; if ($thisPosition === 'float_position') { return true; } - $selectPosition = $this->_helperData->getInlinePosition(); + $selectPosition = $this->_helperData->getInlinePosition(); $positionArray[] = $selectPosition; if ($this->isShowUnderCart()) { $positionArray[] = 'under_cart'; @@ -378,7 +379,7 @@ public function setImageSize($buttonSize) $imageSize = 'width="32" height="32"'; break; } - + return $imageSize; } @@ -400,6 +401,7 @@ public function setButtonSize($buttonSize) $buttonSizeStr = 'a2a_kit_size_32'; break; } + return $buttonSizeStr; } @@ -410,6 +412,7 @@ public function getFloatStyle() { if (!$this->isDisplayInline()) { $floatStyle = $this->_helperData->getFloatStyle(); + return $floatStyle === Style::VERTICAL ? 'a2a_vertical_style' : 'a2a_default_style'; } @@ -441,9 +444,9 @@ public function getFloatPosition() */ public function getFloatMargin($type) { - $floatMarginTop = $this->_helperData->getFloatMarginTop(); + $floatMarginTop = $this->_helperData->getFloatMarginTop(); $floatMarginBottom = $this->_helperData->getFloatMarginBottom(); - + return $type === 'bottom' ? "bottom: {$floatMarginBottom}px;" : "top: {$floatMarginTop}px;"; } } diff --git a/CHANGELOG b/CHANGELOG index 0b79759..8ed9d16 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1 +1 @@ -CHANGELOG: https://www.mageplaza.com/releases/social-share/ +CHANGELOG: https://www.mageplaza.com/releases/social-share/ diff --git a/LICENSE b/LICENSE index 87b119f..9e08325 100644 --- a/LICENSE +++ b/LICENSE @@ -1,33 +1,33 @@ -Copyright © 2016-present Mageplaza Co. Ltd. - -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. - -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. - -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. - - 1. GRANT OF LICENSE: By purchasing a product of Mageplaza: - - 1. Customer will receive source code open 100%. - - 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. - - 3. You are allowed to customize our products to fit with your using purpose. - - 4. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS - - 5. Installation and Use - - 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. - - 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. - - 3. Rental: You may not give, sell, sub-license, rent, lease or lend any portion of the Software to anyone. - - 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. - - 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. - - 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. - +Copyright © 2016-present Mageplaza Co. Ltd. + +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. + +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. + +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. + + 1. GRANT OF LICENSE: By purchasing a product of Mageplaza: + + 1. Customer will receive source code open 100%. + + 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. + + 3. You are allowed to customize our products to fit with your using purpose. + + 4. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS + + 5. Installation and Use + + 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. + + 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. + + 3. Rental: You may not give, sell, sub-license, rent, lease or lend any portion of the Software to anyone. + + 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. + + 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. + + 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. + The latest License: https://www.mageplaza.com/LICENSE.txt \ No newline at end of file diff --git a/Model/System/Config/Source/FloatCmsPages.php b/Model/System/Config/Source/FloatCmsPages.php index 0c2a429..37503c2 100644 --- a/Model/System/Config/Source/FloatCmsPages.php +++ b/Model/System/Config/Source/FloatCmsPages.php @@ -30,7 +30,7 @@ class FloatCmsPages extends OptionArray { /** - * @var \Magento\Cms\Model\PageFactory + * @var PageFactory */ protected $_pageFactory; @@ -49,7 +49,7 @@ public function __construct(PageFactory $pageFactory) */ public function getOptionHash() { - $pages = $this->_pageFactory->create()->getCollection(); + $pages = $this->_pageFactory->create()->getCollection(); $cmsPages = []; foreach ($pages as $page) { diff --git a/README.md b/README.md index 59cc7bc..0765f90 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -- User guide: https://docs.mageplaza.com/social-share/ +- User guide: https://docs.mageplaza.com/social-share/ diff --git a/USER-GUIDE.md b/USER-GUIDE.md index f0fc677..556b9d6 100644 --- a/USER-GUIDE.md +++ b/USER-GUIDE.md @@ -1,54 +1,54 @@ -## Documentation - -- Installation guide: https://www.mageplaza.com/install-magento-2-extension/#solution-1-ready-to-paste -- User Guide: https://docs.mageplaza.com/social-share/ -- Product page: https://www.mageplaza.com/magento-2-social-share/ -- FAQs: https://www.mageplaza.com/faqs/ -- Get Support: https://www.mageplaza.com/contact.html or support@mageplaza.com -- Changelog: https://www.mageplaza.com/releases/social-share/ -- License agreement: https://www.mageplaza.com/LICENSE.txt - -## How to install - -### Install ready-to-paste package (Recommended) - -- Installation guide: https://www.mageplaza.com/install-magento-2-extension/ - -## How to upgrade - -1. Backup - -Backup your Magento code, database before upgrading. - -2. Remove SocialShare folder - -In case of customization, you should backup the customized files and modify in newer version. -Now you remove `app/code/Mageplaza/SocialShare` folder. In this step, you can copy override SocialShare folder but this may cause of compilation issue. That why you should remove it. - -3. Upload new version -Upload this package to Magento root directory - -4. Run command line: - -``` -php bin/magento setup:upgrade -php bin/magento setup:static-content:deploy -``` - - -## FAQs - - -#### Q: I got error: `Mageplaza_Core has been already defined` -A: Read solution: https://github.com/mageplaza/module-core/issues/3 - - -#### Q: My site is down -A: Please follow this guide: https://www.mageplaza.com/blog/magento-site-down.html - - -## Support - -- FAQs: https://www.mageplaza.com/faqs/ -- https://mageplaza.freshdesk.com/ -- support@mageplaza.com +## Documentation + +- Installation guide: https://www.mageplaza.com/install-magento-2-extension/#solution-1-ready-to-paste +- User Guide: https://docs.mageplaza.com/social-share/ +- Product page: https://www.mageplaza.com/magento-2-social-share/ +- FAQs: https://www.mageplaza.com/faqs/ +- Get Support: https://www.mageplaza.com/contact.html or support@mageplaza.com +- Changelog: https://www.mageplaza.com/releases/social-share/ +- License agreement: https://www.mageplaza.com/LICENSE.txt + +## How to install + +### Install ready-to-paste package (Recommended) + +- Installation guide: https://www.mageplaza.com/install-magento-2-extension/ + +## How to upgrade + +1. Backup + +Backup your Magento code, database before upgrading. + +2. Remove SocialShare folder + +In case of customization, you should backup the customized files and modify in newer version. +Now you remove `app/code/Mageplaza/SocialShare` folder. In this step, you can copy override SocialShare folder but this may cause of compilation issue. That why you should remove it. + +3. Upload new version +Upload this package to Magento root directory + +4. Run command line: + +``` +php bin/magento setup:upgrade +php bin/magento setup:static-content:deploy +``` + + +## FAQs + + +#### Q: I got error: `Mageplaza_Core has been already defined` +A: Read solution: https://github.com/mageplaza/module-core/issues/3 + + +#### Q: My site is down +A: Please follow this guide: https://www.mageplaza.com/blog/magento-site-down.html + + +## Support + +- FAQs: https://www.mageplaza.com/faqs/ +- https://mageplaza.freshdesk.com/ +- support@mageplaza.com diff --git a/composer.json b/composer.json index 2466c52..4fb7fd6 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,26 @@ -{ - "name": "mageplaza/module-social-share", - "description": "Magento 2 Social Share Extension", - "require": { - "mageplaza/module-core": "^1.4.0" - }, - "type": "magento2-module", - "version": "1.0.0", - "license": "proprietary", - "authors": [ - { - "name": "Mageplaza", - "email": "support@mageplaza.com", - "homepage": "https://www.mageplaza.com", - "role": "Technical Support" - } - ], - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Mageplaza\\SocialShare\\": "" - } - } -} +{ + "name": "mageplaza/module-social-share", + "description": "Magento 2 Social Share Extension", + "require": { + "mageplaza/module-core": "^1.4.5" + }, + "type": "magento2-module", + "version": "1.0.1", + "license": "proprietary", + "authors": [ + { + "name": "Mageplaza", + "email": "support@mageplaza.com", + "homepage": "https://www.mageplaza.com", + "role": "Technical Support" + } + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Mageplaza\\SocialShare\\": "" + } + } +} diff --git a/etc/acl.xml b/etc/acl.xml index c357d1b..c026584 100644 --- a/etc/acl.xml +++ b/etc/acl.xml @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 4c934a0..01937c0 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -1,267 +1,267 @@ - - - - -
- - mageplaza - Mageplaza_SocialShare::configuration - - - - - Magento\Config\Model\Config\Source\Yesno - Yes to enable this module]]> - - - - Mageplaza\SocialShare\Model\System\Config\Source\IconColor - Only apply for default icon - - - - jscolor {hash:true,refine:false} - - Custom - - - - - Mageplaza\SocialShare\Model\System\Config\Source\ButtonColor - Only apply for default icon - - - - jscolor {hash:true,refine:false} - - Custom - - - - - Mageplaza\SocialShare\Model\System\Config\Source\BackgroundColor - - - - jscolor {hash:true,refine:false} - - Custom - - - - - The unit is %, ranging from 0% to 50%. - required-entry validate-digits validate-digits-range digits-range-0-50 - - - - Magento\Config\Model\Config\Source\Yesno - - - - Display after customers' sharing action. - Magento\Config\Model\Config\Source\Yesno - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/facebook - mageplaza/socialshare/facebook - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/twitter - mageplaza/socialshare/twitter - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/facebook_messenger - mageplaza/socialshare/facebook_messenger - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/pinterest - mageplaza/socialshare/pinterest - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/linkedin - mageplaza/socialshare/linkedin - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Config\Model\Config\Backend\Image - mageplaza/socialshare/tumblr - mageplaza/socialshare/tumblr - If empty, the default icon will be used. - - - - - - - Magento\Config\Model\Config\Source\Yesno - - - - Mageplaza\SocialShare\Model\System\Config\Source\DisplayMenu - - - - Magento\Config\Model\Config\Source\Yesno - - click - - - - - required-entry validate-digits validate-digits-range digits-range-1-400 - - 0 - - - - - - - - - Mageplaza\SocialShare\Model\System\Config\Source\FloatApplyFor - - - Mageplaza\SocialShare\Model\System\Config\Source\FloatSelectPages - - - select_pages - - - - Mageplaza\SocialShare\Model\System\Config\Source\FloatCmsPages - - - select_pages - - - - - Mageplaza\SocialShare\Model\System\Config\Source\Style - - - - Mageplaza\SocialShare\Model\System\Config\Source\FloatPosition - - - - Specify the top margin of sharing button block. Default is 150px. - required-entry validate-digits validate-digits-range digits-range-0-1000 - - vertical - - - - - Specify the bottom margin of sharing button block. Default is 0px. - required-entry validate-digits validate-digits-range digits-range-0-1000 - - horizontal - - - - - Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize - 32x32 px button size is recommended. - - - - - - - Mageplaza\SocialShare\Model\System\Config\Source\InlineApplyFor - - - - Mageplaza\SocialShare\Model\System\Config\Source\InlinePosition - - - - Magento\Config\Model\Config\Source\Yesno - - - - Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize - 32x32 px button size is recommended. - - -
-
+ + + + +
+ + mageplaza + Mageplaza_SocialShare::configuration + + + + + Magento\Config\Model\Config\Source\Yesno + Yes to enable this module]]> + + + + Mageplaza\SocialShare\Model\System\Config\Source\IconColor + Only apply for default icon + + + + jscolor {hash:true,refine:false} + + Custom + + + + + Mageplaza\SocialShare\Model\System\Config\Source\ButtonColor + Only apply for default icon + + + + jscolor {hash:true,refine:false} + + Custom + + + + + Mageplaza\SocialShare\Model\System\Config\Source\BackgroundColor + + + + jscolor {hash:true,refine:false} + + Custom + + + + + The unit is %, ranging from 0% to 50%. + required-entry validate-digits validate-digits-range digits-range-0-50 + + + + Magento\Config\Model\Config\Source\Yesno + + + + Display after customers' sharing action. + Magento\Config\Model\Config\Source\Yesno + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/facebook + mageplaza/socialshare/facebook + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/twitter + mageplaza/socialshare/twitter + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/facebook_messenger + mageplaza/socialshare/facebook_messenger + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/pinterest + mageplaza/socialshare/pinterest + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/linkedin + mageplaza/socialshare/linkedin + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Magento\Config\Model\Config\Backend\Image + mageplaza/socialshare/tumblr + mageplaza/socialshare/tumblr + If empty, the default icon will be used. + + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + Mageplaza\SocialShare\Model\System\Config\Source\DisplayMenu + + + + Magento\Config\Model\Config\Source\Yesno + + click + + + + + required-entry validate-digits validate-digits-range digits-range-1-400 + + 0 + + + + + + + + + Mageplaza\SocialShare\Model\System\Config\Source\FloatApplyFor + + + Mageplaza\SocialShare\Model\System\Config\Source\FloatSelectPages + + + select_pages + + + + Mageplaza\SocialShare\Model\System\Config\Source\FloatCmsPages + + + select_pages + + + + + Mageplaza\SocialShare\Model\System\Config\Source\Style + + + + Mageplaza\SocialShare\Model\System\Config\Source\FloatPosition + + + + Specify the top margin of sharing button block. Default is 150px. + required-entry validate-digits validate-digits-range digits-range-0-1000 + + vertical + + + + + Specify the bottom margin of sharing button block. Default is 0px. + required-entry validate-digits validate-digits-range digits-range-0-1000 + + horizontal + + + + + Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize + 32x32 px button size is recommended. + + + + + + + Mageplaza\SocialShare\Model\System\Config\Source\InlineApplyFor + + + + Mageplaza\SocialShare\Model\System\Config\Source\InlinePosition + + + + Magento\Config\Model\Config\Source\Yesno + + + + Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize + 32x32 px button size is recommended. + + +
+
\ No newline at end of file diff --git a/etc/config.xml b/etc/config.xml index 3b33ccd..078d450 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -1,81 +1,81 @@ - - - - - - - 1 - - - 1 - #FFFFFF - #FFFFFF - unset - #FFFFFF - #FFFFFF - #FFFFFF - 0 - 1 - 1 - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - click - 0 - 8 - - - - all_pages - - left - 150 - 0 - 32x32 - - - home_page - bottom_content - 1 - 32x32 - - - + + + + + + + 1 + + + 1 + #FFFFFF + #FFFFFF + unset + #FFFFFF + #FFFFFF + #FFFFFF + 0 + 1 + 1 + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + click + 0 + 8 + + + + all_pages + + left + 150 + 0 + 32x32 + + + home_page + bottom_content + 1 + 32x32 + + + \ No newline at end of file diff --git a/etc/module.xml b/etc/module.xml index 0aa3b2e..265f66d 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,29 +1,29 @@ - - - - - - - - - + + + + + + + + + diff --git a/i18n/en_US.csv b/i18n/en_US.csv index e6b0db8..8267b22 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -27,8 +27,11 @@ Enable,Enable "Select Yes to enable this module","Select Yes to enable this module" "Icon Color","Icon Color" "Only apply for default icon","Only apply for default icon" +"Custom Icon Color","Custom Icon Color" "Button Color","Button Color" +"Custom Button Color","Custom Button Color" "Background Color","Background Color" +"Custom Background Color","Custom Background Color" "Border Radius","Border Radius" "The unit is %, ranging from 0% to 50%.","The unit is %, ranging from 0% to 50%." "Enable Share Counter","Enable Share Counter" @@ -38,7 +41,7 @@ Facebook,Facebook Image,Image "If empty, the default icon will be used.","If empty, the default icon will be used." Twitter,Twitter -Google+,Google+ +"Facebook Messenger","Facebook Messenger" Pinterest,Pinterest LinkedIn,LinkedIn Tumblr,Tumblr diff --git a/view/frontend/layout/catalog_category_view.xml b/view/frontend/layout/catalog_category_view.xml index e4a0bd6..079efd5 100644 --- a/view/frontend/layout/catalog_category_view.xml +++ b/view/frontend/layout/catalog_category_view.xml @@ -1,52 +1,52 @@ - - - - - - - - category_page - top_content - inline - - - - - - - category_page - float - float_position - - - - - category_page - bottom_content - inline - - - - - - + + + + + + + + category_page + top_content + inline + + + + + + + category_page + float + float_position + + + + + category_page + bottom_content + inline + + + + + + diff --git a/view/frontend/layout/catalog_product_view.xml b/view/frontend/layout/catalog_product_view.xml index d63c529..f480ab8 100644 --- a/view/frontend/layout/catalog_product_view.xml +++ b/view/frontend/layout/catalog_product_view.xml @@ -1,64 +1,64 @@ - - - - - - - - product_page - top_content - inline - - - - - - - - - under_cart - under_cart - inline - - - - - - - - - product_page - float_position - float - - - - - product_page - bottom_content - inline - - - - - + + + + + + + + product_page + top_content + inline + + + + + + + + + under_cart + under_cart + inline + + + + + + + + + product_page + float_position + float + + + + + product_page + bottom_content + inline + + + + + diff --git a/view/frontend/layout/cms_index_index.xml b/view/frontend/layout/cms_index_index.xml index 80b4974..0672c01 100644 --- a/view/frontend/layout/cms_index_index.xml +++ b/view/frontend/layout/cms_index_index.xml @@ -1,49 +1,49 @@ - - - - - - - - home_page - top_content - inline - - - - - home_page - bottom_content - inline - - - - - cms_page - float_position - float - - - - - + + + + + + + + home_page + top_content + inline + + + + + home_page + bottom_content + inline + + + + + cms_page + float_position + float + + + + + diff --git a/view/frontend/layout/cms_page_view.xml b/view/frontend/layout/cms_page_view.xml index 8ab4801..3483038 100644 --- a/view/frontend/layout/cms_page_view.xml +++ b/view/frontend/layout/cms_page_view.xml @@ -1,35 +1,35 @@ - - - - - - - - cms_page - float_position - float - - - - - + + + + + + + + cms_page + float_position + float + + + + + diff --git a/view/frontend/layout/contact_index_index.xml b/view/frontend/layout/contact_index_index.xml index 046d363..7283e64 100644 --- a/view/frontend/layout/contact_index_index.xml +++ b/view/frontend/layout/contact_index_index.xml @@ -1,35 +1,35 @@ - - - - - - - - contact_us - float_position - float - - - - - + + + + + + + + contact_us + float_position + float + + + + + diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml index a62ed1e..78c26f5 100644 --- a/view/frontend/layout/default.xml +++ b/view/frontend/layout/default.xml @@ -1,37 +1,37 @@ - - - - -