This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,462 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Block;
use Magento\Cms\Block\Page;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;
use Mageplaza\SocialShare\Helper\Data as HelperData;
use Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize;
use Mageplaza\SocialShare\Model\System\Config\Source\DisplayMenu;
use Mageplaza\SocialShare\Model\System\Config\Source\FloatApplyFor;
use Mageplaza\SocialShare\Model\System\Config\Source\FloatPosition;
use Mageplaza\SocialShare\Model\System\Config\Source\Style;
/**
* Class SocialShare
* @package Mageplaza\SocialShare\Block
*/
class SocialShare extends Template
{
const SERVICES = ['facebook', 'twitter', 'facebook_messenger', 'pinterest', 'linkedin', 'tumblr'];
const CLICK_FULL_MENU = 2;
const CLICK_MENU = 1;
const HOVER_MENU = 0;
/**
* @var HelperData
*/
protected $_helperData;
/**
* @var Page
*/
protected $_page;
/**
* SocialShare constructor.
*
* @param Context $context
* @param HelperData $helperData
* @param Page $page
* @param array $data
*/
public function __construct(
Context $context,
HelperData $helperData,
Page $page,
array $data = []
) {
$this->_helperData = $helperData;
$this->_page = $page;
parent::__construct($context, $data);
}
/**
* /////////////////////////////////////////////////////////////
* General Configuration
* ////////////////////////////////////////////////////////////
*/
/**
* @return bool
*/
public function isEnable()
{
return $this->_helperData->isEnabled();
}
/**
* @return mixed
*/
public function getIconColor()
{
return $this->_helperData->getButtonColor() . ',' . $this->_helperData->getIconColor();
}
/**
* @return mixed
*/
public function getBackgroundColor()
{
$color = $this->_helperData->getBackgroundColor();
return 'background: ' . $color . ';';
}
/**
* @return mixed
*/
public function getBorderRadius()
{
return $this->_helperData->getBorderRadius() . '%';
}
/**
* @return bool
*/
public function isAddMoreShare()
{
return $this->_helperData->isAddMoreShare();
}
/**
* @param string $service
*
* @return string
*/
public function getShareCounter($service)
{
$supportServices = ['pinterest', 'tumblr', 'a2a_dd'];
if ($this->_helperData->isShareCounter() && in_array($service, $supportServices, true)) {
return 'a2a_counter';
}
return '';
}
/**
* @return string
*/
public function getThankYou()
{
if ($this->_helperData->isThankYouPopup()) {
return 'true';
}
return 'false';
}
/**
* @return array
*/
public function getEnableService()
{
$enableServices = [];
foreach (self::SERVICES as $service) {
if ($this->_helperData->isServiceEnable($service)) {
$enableServices[] = $service;
}
}
return $enableServices;
}
/**
* @param string $service
*
* @return string
* @throws NoSuchEntityException
*/
public function getImageUrl($service)
{
$baseUrl = $this->_storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA);
$modulePath = 'mageplaza/socialshare/';
$imageUrl = $baseUrl . $modulePath . $service . '/' . $this->_helperData->getServiceImage($service);
return $imageUrl;
}
/**
* @param string $service
*
* @return bool
*/
public function isImageEnable($service)
{
return $this->_helperData->getServiceImage($service) !== null;
}
/**
* @return string
*/
public function getDisabledServices()
{
$disabledServices = [];
foreach (self::SERVICES as $service) {
if ($this->_helperData->getDisableService($service) !== null) {
$disabledServices[] = '"' . $this->_helperData->getDisableService($service) . '"';
}
}
return implode(',', $disabledServices);
}
/**
* @return int
*/
public function getNumberOfService()
{
return (int) $this->_helperData->getNumberOfServices();
}
/**
* @return string
*/
public function getMenuType()
{
$menuType = $this->_helperData->getDisplayMenu();
if ($menuType === DisplayMenu::ON_CLICK) {
if ($this->_helperData->isFullMenuOnClick()) {
return self::CLICK_FULL_MENU;
}
return self::CLICK_MENU;
}
return self::HOVER_MENU;
}
/**
* @return string
*/
public function getDisplayType()
{
$type = $this->getData('type');
if ($type === 'float') {
return 'a2a_floating_style mp_social_share_float';
}
if ($type === 'inline') {
return 'a2a_default_style';
}
return null;
}
/**
* @return bool
*/
public function isDisplayInline()
{
$type = $this->getData('type');
return $type === 'inline';
}
/**
* @return string
*/
public function getPosition()
{
$position = $this->getData('position');
return $position;
}
/**
* @param $displayType
*
* @return string|null
*/
public function getContainerClass($displayType)
{
$position = $this->getData('position');
if ($displayType === 'a2a_default_style') {
return $position === 'under_cart' ? 'mp_social_share_inline_under_cart' : 'mp_social_share_inline';
}
return null;
}
/**
* /////////////////////////////////////////////////////////////
* Float and Inline Configuration
* ////////////////////////////////////////////////////////////
*/
/**
* @return bool
*/
public function isThisPageEnable()
{
$type = $this->getData('type');
$thisPage = $this->getData('page');
$allowPages = null;
if ($type === 'inline') {
$allowPages = explode(',', $this->_helperData->getInlineApplyPages()?:'');
if ($this->isShowUnderCart()) {
$allowPages[] = 'under_cart';
}
if (in_array($thisPage, $allowPages, true)) {
return true;
}
}
if ($type === 'float') {
if ($this->_helperData->getFloatApplyPages() === FloatApplyFor::ALL_PAGES) {
return true;
}
if ($this->_helperData->getFloatApplyPages() === FloatApplyFor::SELECT_PAGES) {
$selectPages = explode(',', $this->_helperData->getFloatSelectPages()?:'');
$cmsPages = explode(',', $this->_helperData->getFloatCmsPages()?:'');
if ($thisPage === 'cms_page') {
$pageId = $this->_page->getPage()->getId();
if (in_array($pageId, $cmsPages, true)) {
return true;
}
}
if (in_array($thisPage, $selectPages, true)) {
return true;
}
}
}
return false;
}
/**
* @return bool
*/
public function isShowUnderCart()
{
return $this->_helperData->isShowUnderCart();
}
/**
* @return bool
*/
public function isThisPositionEnable()
{
$thisPosition = $this->getData('position');
$positionArray = [];
if ($thisPosition === 'float_position') {
return true;
}
$selectPosition = $this->_helperData->getInlinePosition();
$positionArray[] = $selectPosition;
if ($this->isShowUnderCart()) {
$positionArray[] = 'under_cart';
}
if (in_array($thisPosition, $positionArray, true)) {
return true;
}
return false;
}
/**
* @return string
*/
public function getButtonSize()
{
$type = $this->getData('type');
if ($type === 'inline') {
$inlineSize = $this->_helperData->getInlineButtonSize();
return $this->setButtonSize($inlineSize);
}
$floatSize = $this->_helperData->getFloatButtonSize();
return $this->setButtonSize($floatSize);
}
/**
* @param string $buttonSize
*
* @return string
*/
public function setImageSize($buttonSize)
{
switch ($buttonSize) {
case 'a2a_kit_size_16':
$imageSize = 'width="16" height="16"';
break;
case 'a2a_kit_size_64':
$imageSize = 'width="64" height="64"';
break;
default:
$imageSize = 'width="32" height="32"';
break;
}
return $imageSize;
}
/**
* @param string $buttonSize
*
* @return string
*/
public function setButtonSize($buttonSize)
{
switch ($buttonSize) {
case ButtonSize::SMALL:
$buttonSizeStr = 'a2a_kit_size_16';
break;
case ButtonSize::LARGE:
$buttonSizeStr = 'a2a_kit_size_64';
break;
default:
$buttonSizeStr = 'a2a_kit_size_32';
break;
}
return $buttonSizeStr;
}
/**
* @return string
*/
public function getFloatStyle()
{
if (!$this->isDisplayInline()) {
$floatStyle = $this->_helperData->getFloatStyle();
return $floatStyle === Style::VERTICAL ? 'a2a_vertical_style' : 'a2a_default_style';
}
return null;
}
/**
* @param string $floatStyle
*
* @return bool
*/
public function isVerticalStyle($floatStyle)
{
return $floatStyle === 'a2a_vertical_style';
}
/**
* @return string
*/
public function getFloatPosition()
{
return $this->_helperData->getFloatPosition() === FloatPosition::LEFT ? 'left: 0px;' : 'right: 0px;';
}
/**
* @param string $type
*
* @return string
*/
public function getFloatMargin($type)
{
$floatMarginTop = $this->_helperData->getFloatMarginTop();
$floatMarginBottom = $this->_helperData->getFloatMarginBottom();
return $type === 'bottom' ? "bottom: {$floatMarginBottom}px;" : "top: {$floatMarginTop}px;";
}
}
+1
View File
@@ -0,0 +1 @@
CHANGELOG: https://www.mageplaza.com/releases/social-share/
@@ -0,0 +1,334 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Helper;
use Mageplaza\Core\Helper\AbstractData;
use Mageplaza\SocialShare\Model\System\Config\Source\BackgroundColor;
use Mageplaza\SocialShare\Model\System\Config\Source\ButtonColor;
use Mageplaza\SocialShare\Model\System\Config\Source\IconColor;
/**
* Class Data
* @package Mageplaza\SocialShare\Helper
*/
class Data extends AbstractData
{
const CONFIG_MODULE_PATH = 'mpsocialshare';
const CONFIG_FLOAT = 'float/';
const CONFIG_INLINE = 'inline/';
const CONFIG_MORE = 'add_more_share/';
/*
* //////////////////////////////////////////////////
* General Configuration
* /////////////////////////////////////////////////
*/
/**
* @param null $storeId
*
* @return mixed
*/
public function getIconColor($storeId = null)
{
$selectColor = $this->getConfigGeneral('icon_color', $storeId);
if ($selectColor === IconColor::CUSTOM) {
return $this->getConfigGeneral('custom_icon_color', $storeId);
}
return $selectColor;
}
/**
* @param null $storeId
*
* @return mixed
*/
public function getButtonColor($storeId = null)
{
$selectColor = $this->getConfigGeneral('button_color', $storeId);
if ($selectColor === ButtonColor::CUSTOM) {
return $this->getConfigGeneral('custom_button_color', $storeId);
}
return $selectColor;
}
/**
* @param null $storeId
*
* @return mixed
*/
public function getBackgroundColor($storeId = null)
{
$selectColor = $this->getConfigGeneral('background_color', $storeId);
if ($selectColor === BackgroundColor::CUSTOM) {
return $this->getConfigGeneral('custom_background_color', $storeId);
}
return $selectColor;
}
/**
* @param null $storeId
*
* @return mixed
*/
public function getBorderRadius($storeId = null)
{
return $this->getConfigGeneral('border_radius', $storeId);
}
/**
* @param null $storeId
*
* @return mixed
*/
public function isShareCounter($storeId = null)
{
return $this->getConfigGeneral('share_counter', $storeId);
}
/**
* @param null $storeId
*
* @return mixed
*/
public function isThankYouPopup($storeId = null)
{
return $this->getConfigGeneral('thank_you', $storeId);
}
/**
* @param $serviceCode
* @param null $storeId
*
* @return array|mixed
*/
public function isServiceEnable($serviceCode, $storeId = null)
{
return $this->getConfigGeneral($serviceCode . '/enabled', $storeId);
}
/**
* @param $serviceCode
* @param null $storeId
*
* @return array|mixed
*/
public function getServiceImage($serviceCode, $storeId = null)
{
return $this->getConfigGeneral($serviceCode . '/image', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function isAddMoreShare($storeId = null)
{
return $this->getConfigGeneral(self::CONFIG_MORE . 'enabled', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getDisplayMenu($storeId = null)
{
return $this->getConfigGeneral(self::CONFIG_MORE . 'display_menu', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getNumberOfServices($storeId = null)
{
return $this->getConfigGeneral(self::CONFIG_MORE . 'number_service', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function isFullMenuOnClick($storeId = null)
{
return $this->getConfigGeneral(self::CONFIG_MORE . 'full_menu', $storeId);
}
/**
* @param $serviceCode
* @param null $storeId
*
* @return null |null
*/
public function getDisableService($serviceCode, $storeId = null)
{
if (!$this->isServiceEnable($serviceCode, $storeId)) {
return $serviceCode;
}
return null;
}
/*
* //////////////////////////////////////////////////
* Floating Configuration
* /////////////////////////////////////////////////
*/
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatApplyPages($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'apply_for', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatSelectPages($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'select_page', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatCmsPages($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'cms_page', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatStyle($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'style', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatPosition($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'position', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatMarginTop($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'margin_top', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatMarginBottom($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'margin_bottom', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getFloatButtonSize($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_FLOAT . 'button_size', $storeId);
}
/*
* //////////////////////////////////////////////////
* Inline Configuration
* /////////////////////////////////////////////////
*/
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getInlineApplyPages($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_INLINE . 'apply_for', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getInlinePosition($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_INLINE . 'position', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function isShowUnderCart($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_INLINE . 'show_under_cart', $storeId);
}
/**
* @param null $storeId
*
* @return array|mixed
*/
public function getInlineButtonSize($storeId = null)
{
return $this->getModuleConfig(self::CONFIG_INLINE . 'button_size', $storeId);
}
/**
* @return bool
*/
public function checkDailyDealEnable()
{
return $this->_moduleManager->isOutputEnabled('Mageplaza_DailyDeal');
}
}
+33
View File
@@ -0,0 +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.
The latest License: https://www.mageplaza.com/LICENSE.txt
@@ -0,0 +1,49 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class BackgroundColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class BackgroundColor extends OptionArray
{
const CUSTOM = 'Custom';
const NONE = 'transparent';
const WHITE = '#FFFFFF';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::CUSTOM => __('Custom'),
self::WHITE => __('White'),
self::NONE => __('None'),
self::GRAY => __('Gray'),
self::BLACK => __('Black'),
];
}
}
@@ -0,0 +1,49 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class ButtonColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class ButtonColor extends OptionArray
{
const CUSTOM = 'Custom';
const WHITE = '#FFFFFF';
const ORIGINAL = 'unset';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ORIGINAL => __('Default'),
self::WHITE => __('White'),
self::BLACK => __('Black'),
self::GRAY => __('Gray'),
self::CUSTOM => __('Custom'),
];
}
}
@@ -0,0 +1,45 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class ButtonSize
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class ButtonSize extends OptionArray
{
const SMALL = '16x16';
const MEDIUM = '32x32';
const LARGE = '64x64';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::SMALL => __('16x16'),
self::MEDIUM => __('32x32'),
self::LARGE => __('64x64'),
];
}
}
@@ -0,0 +1,43 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class DisplayMenu
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class DisplayMenu extends OptionArray
{
const ON_HOVER = 'hover';
const ON_CLICK = 'click';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ON_HOVER => __('Hover'),
self::ON_CLICK => __('Click'),
];
}
}
@@ -0,0 +1,43 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatApplyFor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatApplyFor extends OptionArray
{
const ALL_PAGES = 'all_pages';
const SELECT_PAGES = 'select_pages';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::ALL_PAGES => __('All Pages'),
self::SELECT_PAGES => __('Select Pages')
];
}
}
@@ -0,0 +1,63 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Magento\Cms\Model\PageFactory;
/**
* Class FloatCmsPages
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatCmsPages extends OptionArray
{
/**
* @var PageFactory
*/
protected $_pageFactory;
/**
* FloatCmsPages constructor.
*
* @param PageFactory $pageFactory
*/
public function __construct(PageFactory $pageFactory)
{
$this->_pageFactory = $pageFactory;
}
/**
* @return array
*/
public function getOptionHash()
{
$pages = $this->_pageFactory->create()->getCollection();
$cmsPages = [];
foreach ($pages as $page) {
if ($page->isActive()){
$cmsPages[$page->getId()] = $page->getTitle();
}
}
return $cmsPages;
}
}
@@ -0,0 +1,43 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatPosition
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatPosition extends OptionArray
{
const LEFT = 'left';
const RIGHT = 'right';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::LEFT => __('Left'),
self::RIGHT => __('Right'),
];
}
}
@@ -0,0 +1,45 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class FloatSelectPages
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class FloatSelectPages extends OptionArray
{
const CATEGORY_PAGE = 'category_page';
const PRODUCT_PAGE = 'product_page';
const CONTACT_US = 'contact_us';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::PRODUCT_PAGE => __('Products Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::CONTACT_US => __('Contact Us')
];
}
}
@@ -0,0 +1,47 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class IconColor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class IconColor extends OptionArray
{
const CUSTOM = 'Custom';
const WHITE = '#FFFFFF';
const GRAY = '#808080';
const BLACK = '#000000';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::CUSTOM => __('Custom'),
self::WHITE => __('White'),
self::GRAY => __('Gray'),
self::BLACK => __('Black'),
];
}
}
@@ -0,0 +1,74 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Mageplaza\SocialShare\Helper\Data as HelperData;
/**
* Class InlineApplyFor
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class InlineApplyFor extends OptionArray
{
const HOME_PAGE = 'home_page';
const CATEGORY_PAGE = 'category_page';
const PRODUCT_PAGE = 'product_page';
const DAILYDEAL_ALLDEALS = 'dailydeal_alldeals';
const DAILYDEAL_BESTSELLERDEALS = 'dailydeal_bestsellerdeals';
const DAILYDEAL_FEATUREDDEALS = 'dailydeal_featureddeals';
const DAILYDEAL_NEWDEALS = 'dailydeal_newdeals';
/**
* @var HelperData
*/
protected $_helperData;
public function __construct(HelperData $helperData)
{
$this->_helperData = $helperData;
}
/**
* @return array
*/
public function getOptionHash()
{
if (!$this->_helperData->checkDailyDealEnable()) {
$pages = [
self::HOME_PAGE => __('Home Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::PRODUCT_PAGE => __('Products Page')
];
} else {
$pages = [
self::HOME_PAGE => __('Home Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::PRODUCT_PAGE => __('Products Page'),
self::DAILYDEAL_ALLDEALS => __('Daily Deal All Deals Page'),
self::DAILYDEAL_BESTSELLERDEALS => __('Daily Deal Bestseller Deals Page'),
self::DAILYDEAL_FEATUREDDEALS => __('Daily Deal Featured Deals Page'),
self::DAILYDEAL_NEWDEALS => __('Daily Deal New Deals Page'),
];
}
return $pages;
}
}
@@ -0,0 +1,43 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class InlinePosition
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class InlinePosition extends OptionArray
{
const TOP_CONTENT = 'top_content';
const BOTTOM_CONTENT = 'bottom_content';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::TOP_CONTENT => __('Top Content'),
self::BOTTOM_CONTENT => __('Bottom Content'),
];
}
}
@@ -0,0 +1,54 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
use Magento\Framework\Option\ArrayInterface;
/**
* Class OptionArray
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
abstract class OptionArray implements ArrayInterface
{
/**
* Return array of options as value-label pairs
*
* @return array Format: array(array('value' => '<value>', 'label' => '<label>'), ...)
*/
public function toOptionArray()
{
$options = [];
foreach ($this->getOptionHash() as $value => $label) {
$options[] = [
'value' => $value,
'label' => $label
];
}
return $options;
}
/**
* @return array
*/
abstract public function getOptionHash();
}
@@ -0,0 +1,43 @@
<?php
/**
* 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
*/
namespace Mageplaza\SocialShare\Model\System\Config\Source;
/**
* Class Style
* @package Mageplaza\SocialShare\Model\System\Config\Source
*/
class Style extends OptionArray
{
const HORIZONTAL = 'horizontal';
const VERTICAL = 'vertical';
/**
* @return array
*/
public function getOptionHash()
{
return [
self::HORIZONTAL => __('Horizontal'),
self::VERTICAL => __('Vertical'),
];
}
}
@@ -0,0 +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
Binary file not shown.
@@ -0,0 +1,26 @@
{
"name": "mageplaza/module-social-share-mkp",
"description": "Magento 2 Social Share Extension",
"require": {
"mageplaza/module-core": "^1.5.3"
},
"type": "magento2-module",
"version": "4.0.4",
"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\\": ""
}
}
}
@@ -0,0 +1,37 @@
<?xml version="1.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
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="Mageplaza_SocialShare::configuration" title="Mageplaza Social Share"/>
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
@@ -0,0 +1,269 @@
<?xml version="1.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
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="mpsocialshare" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Social Share</label>
<tab>mageplaza</tab>
<resource>Mageplaza_SocialShare::configuration</resource>
<group id="general" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General Configuration</label>
<field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment><![CDATA[Select <b>Yes</b> to enable this module.<br />
1. It helps to reduce abandonment cart with <a href="https://www.mageplaza.com/magento-2-one-step-checkout-extension/" target="_blank">One Step Checkout</a>. <br />
2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href="https://go.avada.io/mageplaza">Learn more</a>]]></comment>
</field>
<field id="icon_color" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Icon Color</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\IconColor</source_model>
<comment>Only apply for default icon</comment>
</field>
<field id="custom_icon_color" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Custom Icon Color</label>
<frontend_model>Mageplaza\Core\Block\Adminhtml\System\Config\ColorPicker</frontend_model>
<depends>
<field id="icon_color">Custom</field>
</depends>
</field>
<field id="button_color" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Button Color</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\ButtonColor</source_model>
<comment>Only apply for default icon</comment>
</field>
<field id="custom_button_color" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Custom Button Color</label>
<frontend_model>Mageplaza\Core\Block\Adminhtml\System\Config\ColorPicker</frontend_model>
<depends>
<field id="button_color">Custom</field>
</depends>
</field>
<field id="background_color" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Background Color</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\BackgroundColor</source_model>
</field>
<field id="custom_background_color" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Custom Background Color</label>
<frontend_model>Mageplaza\Core\Block\Adminhtml\System\Config\ColorPicker</frontend_model>
<depends>
<field id="background_color">Custom</field>
</depends>
</field>
<field id="border_radius" translate="label comment" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Border Radius</label>
<comment>The unit is %, ranging from 0% to 50%.</comment>
<validate>required-entry validate-digits validate-digits-range digits-range-0-50</validate>
</field>
<field id="share_counter" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable Share Counter</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="thank_you" translate="label comment" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable Thank You Popup</label>
<comment>Display after customers' sharing action.</comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<group id="facebook" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Facebook</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/facebook</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/facebook</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="twitter" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Twitter</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/twitter</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/twitter</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="facebook_messenger" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Facebook Messenger</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/facebook_messenger</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/facebook_messenger</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="pinterest" translate="label" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Pinterest</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/pinterest</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/pinterest</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="linkedin" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<label>LinkedIn</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/linkedin</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/linkedin</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="tumblr" translate="label" type="text" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Tumblr</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="image" translate="label comment" type="image" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Image</label>
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">mageplaza/socialshare/tumblr</upload_dir>
<base_url type="media" scope_info="1">mageplaza/socialshare/tumblr</base_url>
<comment>If empty, the default icon will be used.</comment>
</field>
</group>
<group id="add_more_share" translate="label" type="text" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Add More Share</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enable</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="display_menu" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Display Menu Type</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\DisplayMenu</source_model>
</field>
<field id="full_menu" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Display Full Menu</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<depends>
<field id="display_menu">click</field>
</depends>
</field>
<field id="number_service" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Number of Services</label>
<validate>required-entry validate-digits validate-digits-range digits-range-1-400</validate>
<depends>
<field id="full_menu">0</field>
</depends>
</field>
</group>
</group>
<group id="float" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Floating Configuration</label>
<field id="apply_for" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Apply For</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\FloatApplyFor</source_model>
</field>
<field id="select_page" translate="label" type="multiselect" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\FloatSelectPages</source_model>
<label>Apply for Select Page</label>
<depends>
<field id="apply_for">select_pages</field>
</depends>
</field>
<field id="cms_page" translate="label" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\FloatCmsPages</source_model>
<label>Apply for CMS Page</label>
<depends>
<field id="apply_for">select_pages</field>
</depends>
</field>
<field id="style" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Style</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\Style</source_model>
</field>
<field id="position" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Position</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\FloatPosition</source_model>
</field>
<field id="margin_top" translate="label comment" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Margin Top</label>
<comment>Specify the top margin of sharing button block. Default is 150px.</comment>
<validate>required-entry validate-digits validate-digits-range digits-range-0-1000</validate>
<depends>
<field id="style">vertical</field>
</depends>
</field>
<field id="margin_bottom" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Margin Bottom</label>
<comment>Specify the bottom margin of sharing button block. Default is 0px.</comment>
<validate>required-entry validate-digits validate-digits-range digits-range-0-1000</validate>
<depends>
<field id="style">horizontal</field>
</depends>
</field>
<field id="button_size" translate="label comment" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Button Size</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize</source_model>
<comment>32x32 px button size is recommended.</comment>
</field>
</group>
<group id="inline" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Inline Configuration</label>
<field id="apply_for" translate="label" type="multiselect" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Apply For</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\InlineApplyFor</source_model>
</field>
<field id="position" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Position</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\InlinePosition</source_model>
</field>
<field id="show_under_cart" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Show Under Add To Cart on Product Detail Page</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="button_size" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Button Size</label>
<source_model>Mageplaza\SocialShare\Model\System\Config\Source\ButtonSize</source_model>
<comment>32x32 px button size is recommended.</comment>
</field>
</group>
</section>
</system>
</config>
@@ -0,0 +1,81 @@
<?xml version="1.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
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<mpsocialshare>
<module>
<type>1</type>
</module>
<general>
<enabled>1</enabled>
<icon_color>#FFFFFF</icon_color>
<custom_icon_color>#FFFFFF</custom_icon_color>
<button_color>unset</button_color>
<custom_button_color>#FFFFFF</custom_button_color>
<background_color>#FFFFFF</background_color>
<custom_background_color>#FFFFFF</custom_background_color>
<border_radius>0</border_radius>
<share_counter>1</share_counter>
<thank_you>1</thank_you>
<facebook>
<enabled>1</enabled>
</facebook>
<twitter>
<enabled>1</enabled>
</twitter>
<facebook_messenger>
<enabled>1</enabled>
</facebook_messenger>
<pinterest>
<enabled>1</enabled>
</pinterest>
<linkedin>
<enabled>1</enabled>
</linkedin>
<tumblr>
<enabled>1</enabled>
</tumblr>
<add_more_share>
<enabled>1</enabled>
<display_menu>click</display_menu>
<full_menu>0</full_menu>
<number_service>8</number_service>
</add_more_share>
</general>
<float>
<apply_for>all_pages</apply_for>
<style>vertical</style>
<position>left</position>
<margin_top>150</margin_top>
<margin_bottom>0</margin_bottom>
<button_size>32x32</button_size>
</float>
<inline>
<apply_for>home_page</apply_for>
<position>bottom_content</position>
<show_under_cart>1</show_under_cart>
<button_size>32x32</button_size>
</inline>
</mpsocialshare>
</default>
</config>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* 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
*/
-->
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="style-src">
<values>
<value id="fue-style" type="host">*.googleapis.com</value>
<value id="addtoany-style" type="host">*.addtoany.com</value>
</values>
</policy>
<policy id="font-src">
<values>
<value id="googleapis" type="host">https://fonts.gstatic.com</value>
</values>
</policy>
<policy id="connect-src">
<values>
<value id="fue-connect" type="host">http://dpm.demdex.net</value>
</values>
</policy>
</policies>
</csp_whitelist>
@@ -0,0 +1,29 @@
<?xml version="1.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
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Mageplaza_SocialShare" setup_version="1.0.0">
<sequence>
<module name="Mageplaza_Core"/>
</sequence>
</module>
</config>
@@ -0,0 +1,73 @@
Custom,Custom
White,White
None,None
Gray,Gray
Black,Black
Default,Default
16x16,16x16
32x32,32x32
64x64,64x64
Hover,Hover
Click,Click
"All Pages","All Pages"
"Select Pages","Select Pages"
Left,Left
Right,Right
"Products Page","Products Page"
"Categories Page","Categories Page"
"Contact Us","Contact Us"
"Home Page","Home Page"
"Daily Deal All Deals Page","Daily Deal All Deals Page"
"Daily Deal Bestseller Deals Page","Daily Deal Bestseller Deals Page"
"Daily Deal Featured Deals Page","Daily Deal Featured Deals Page"
"Daily Deal New Deals Page","Daily Deal New Deals Page"
"Top Content","Top Content"
"Bottom Content","Bottom Content"
Horizontal,Horizontal
Vertical,Vertical
"Social Share","Social Share"
"General Configuration","General Configuration"
Enable,Enable
"Select <b>Yes</b> to enable this module.<br />
1. It helps to reduce abandonment cart with <a href=""https://www.mageplaza.com/magento-2-one-step-checkout-extension/"" target=""_blank"">One Step Checkout</a>. <br />
2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href=""https://go.avada.io/mageplaza"">Learn more</a>","Select <b>Yes</b> to enable this module.<br />
1. It helps to reduce abandonment cart with <a href=""https://www.mageplaza.com/magento-2-one-step-checkout-extension/"" target=""_blank"">One Step Checkout</a>. <br />
2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href=""https://go.avada.io/mageplaza"">Learn more</a>"
"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"
"Enable Thank You Popup","Enable Thank You Popup"
"Display after customers' sharing action.","Display after customers' sharing action."
Facebook,Facebook
Image,Image
"If empty, the default icon will be used.","If empty, the default icon will be used."
Twitter,Twitter
"Facebook Messenger","Facebook Messenger"
Pinterest,Pinterest
LinkedIn,LinkedIn
Tumblr,Tumblr
"Add More Share","Add More Share"
"Display Menu Type","Display Menu Type"
"Display Full Menu","Display Full Menu"
"Number of Services","Number of Services"
"Floating Configuration","Floating Configuration"
"Apply For","Apply For"
"Apply for Select Page","Apply for Select Page"
"Apply for CMS Page","Apply for CMS Page"
Style,Style
Position,Position
"Margin Top","Margin Top"
"Specify the top margin of sharing button block. Default is 150px.","Specify the top margin of sharing button block. Default is 150px."
"Margin Bottom","Margin Bottom"
"Specify the bottom margin of sharing button block. Default is 0px.","Specify the bottom margin of sharing button block. Default is 0px."
"Button Size","Button Size"
"32x32 px button size is recommended.","32x32 px button size is recommended."
"Inline Configuration","Inline Configuration"
"Show Under Add To Cart on Product Detail Page","Show Under Add To Cart on Product Detail Page"
1 Custom Custom
2 White White
3 None None
4 Gray Gray
5 Black Black
6 Default Default
7 16x16 16x16
8 32x32 32x32
9 64x64 64x64
10 Hover Hover
11 Click Click
12 All Pages All Pages
13 Select Pages Select Pages
14 Left Left
15 Right Right
16 Products Page Products Page
17 Categories Page Categories Page
18 Contact Us Contact Us
19 Home Page Home Page
20 Daily Deal All Deals Page Daily Deal All Deals Page
21 Daily Deal Bestseller Deals Page Daily Deal Bestseller Deals Page
22 Daily Deal Featured Deals Page Daily Deal Featured Deals Page
23 Daily Deal New Deals Page Daily Deal New Deals Page
24 Top Content Top Content
25 Bottom Content Bottom Content
26 Horizontal Horizontal
27 Vertical Vertical
28 Social Share Social Share
29 General Configuration General Configuration
30 Enable Enable
31 Select <b>Yes</b> to enable this module.<br /> 1. It helps to reduce abandonment cart with <a href="https://www.mageplaza.com/magento-2-one-step-checkout-extension/" target="_blank">One Step Checkout</a>. <br /> 2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href="https://go.avada.io/mageplaza">Learn more</a> Select <b>Yes</b> to enable this module.<br /> 1. It helps to reduce abandonment cart with <a href="https://www.mageplaza.com/magento-2-one-step-checkout-extension/" target="_blank">One Step Checkout</a>. <br /> 2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href="https://go.avada.io/mageplaza">Learn more</a>
32 Icon Color Icon Color
33 Only apply for default icon Only apply for default icon
34 Custom Icon Color Custom Icon Color
35 Button Color Button Color
36 Custom Button Color Custom Button Color
37 Background Color Background Color
38 Custom Background Color Custom Background Color
39 Border Radius Border Radius
40 The unit is %, ranging from 0% to 50%. The unit is %, ranging from 0% to 50%.
41 Enable Share Counter Enable Share Counter
42 Enable Thank You Popup Enable Thank You Popup
43 Display after customers' sharing action. Display after customers' sharing action.
44 Facebook Facebook
45 Image Image
46 If empty, the default icon will be used. If empty, the default icon will be used.
47 Twitter Twitter
48 Facebook Messenger Facebook Messenger
49 Pinterest Pinterest
50 LinkedIn LinkedIn
51 Tumblr Tumblr
52 Add More Share Add More Share
53 Display Menu Type Display Menu Type
54 Display Full Menu Display Full Menu
55 Number of Services Number of Services
56 Floating Configuration Floating Configuration
57 Apply For Apply For
58 Apply for Select Page Apply for Select Page
59 Apply for CMS Page Apply for CMS Page
60 Style Style
61 Position Position
62 Margin Top Margin Top
63 Specify the top margin of sharing button block. Default is 150px. Specify the top margin of sharing button block. Default is 150px.
64 Margin Bottom Margin Bottom
65 Specify the bottom margin of sharing button block. Default is 0px. Specify the bottom margin of sharing button block. Default is 0px.
66 Button Size Button Size
67 32x32 px button size is recommended. 32x32 px button size is recommended.
68 Inline Configuration Inline Configuration
69 Show Under Add To Cart on Product Detail Page Show Under Add To Cart on Product Detail Page
@@ -0,0 +1,28 @@
<?php
/**
* 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
*/
use Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(
ComponentRegistrar::MODULE,
'Mageplaza_SocialShare',
__DIR__
);
+65
View File
@@ -0,0 +1,65 @@
language: php
php:
- 7.0
- 7.1
- 7.2
sudo: required
dist: trusty
env:
global:
- COMPOSER_BIN_DIR=~/bin
- INTEGRATION_SETS=3
- NODE_JS_VERSION=6
- MAGENTO_HOST_NAME="magento2.travis"
- COMPOSER_MODULE=mageplaza/module-social-share
matrix:
- MAGENTO_VERSION=2.2.1 TEST_SUITE=integration INTEGRATION_INDEX=1
- MAGENTO_VERSION=2.2.1 TEST_SUITE=integration INTEGRATION_INDEX=2
- MAGENTO_VERSION=2.2.1 TEST_SUITE=integration INTEGRATION_INDEX=3
- MAGENTO_VERSION=2.2.2 TEST_SUITE=static
- MAGENTO_VERSION=2.2.2 TEST_SUITE=js GRUNT_COMMAND=static
- MAGENTO_VERSION=2.2.2 TEST_SUITE=integration INTEGRATION_INDEX=1
- MAGENTO_VERSION=2.2.2 TEST_SUITE=integration INTEGRATION_INDEX=2
- MAGENTO_VERSION=2.2.2 TEST_SUITE=integration INTEGRATION_INDEX=3
matrix:
exclude:
- php: 7.0
env: MAGENTO_VERSION=2.2.2 TEST_SUITE=js GRUNT_COMMAND=static
- php: 7.0
env: MAGENTO_VERSION=2.2.2 TEST_SUITE=static
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.nvm"
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
firefox: '46.0'
hosts:
- magento2.travis
before_install:
- git clone https://github.com/magento/magento2 --branch $MAGENTO_VERSION
- cd magento2
- bash ./dev/travis/before_install.sh
install:
- composer install --no-interaction --prefer-dist
- composer require $COMPOSER_MODULE
before_script:
#- cp -f ${TRAVIS_BUILD_DIR}/dev/tests/integration/phpunit.xml.dist dev/tests/integration/
- echo "vendor/$COMPOSER_MODULE" > dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt
- echo "vendor/$COMPOSER_MODULE" > dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
- echo "vendor/$COMPOSER_MODULE/**/*.js" > dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/magento.txt
- bash ./dev/travis/before_script.sh
script:
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
@@ -0,0 +1,52 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">category_page</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">category_page</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">category_page</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,64 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml" before="-">
<arguments>
<argument name="page" xsi:type="string">product_page</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<referenceContainer name="product.info.main">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineCart" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">under_cart</argument>
<argument name="position" xsi:type="string">under_cart</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</referenceContainer>
<referenceContainer name="content.aside">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">product_page</argument>
<argument name="position" xsi:type="string">float_position</argument>
<argument name="type" xsi:type="string">float</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml" after="-">
<arguments>
<argument name="page" xsi:type="string">product_page</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,49 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml" before="-">
<arguments>
<argument name="page" xsi:type="string">home_page</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml" after="-">
<arguments>
<argument name="page" xsi:type="string">home_page</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml" after="-">
<arguments>
<argument name="page" xsi:type="string">cms_page</argument>
<argument name="position" xsi:type="string">float_position</argument>
<argument name="type" xsi:type="string">float</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,35 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">cms_page</argument>
<argument name="position" xsi:type="string">float_position</argument>
<argument name="type" xsi:type="string">float</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,35 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml" after="-">
<arguments>
<argument name="page" xsi:type="string">contact_us</argument>
<argument name="position" xsi:type="string">float_position</argument>
<argument name="type" xsi:type="string">float</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,52 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,52 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,52 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,52 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,38 @@
<?xml version="1.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
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<script src="https://static.addtoany.com/menu/page.js" src_type="url"/>
<script src="Mageplaza_SocialShare::js/thankskit.js"/>
</head>
<body>
<referenceContainer name="after.body.start">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml" after="-">
<arguments>
<argument name="position" xsi:type="string">float_position</argument>
<argument name="type" xsi:type="string">float</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,116 @@
<?php
/**
* 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
*/
?>
<?php /** @var \Mageplaza\SocialShare\Block\SocialShare $block */ ?>
<?php if ($block->isEnable()): ?>
<?php if ($block->isThisPageEnable() && $block->isThisPositionEnable()): ?>
<style type="text/css">
.a2a_svg, .a2a_count {
border-radius: <?= /* @noEscape */ $block->getBorderRadius()?> !important;
display: block;
}
<?php if ($block->isDisplayInline()):?>
.mp_social_share_inline, .mp_social_share_inline_under_cart {
display: flex;
border-radius: 7px;
padding: 7px 7px 7px 5px;
<?= /* @noEscape */ $block->getBackgroundColor()?>
}
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
<?= $block->getPosition() === 'bottom_content' ? 'float: right;' : 'float: left;' ?>
}
.mp_social_share_inline_under_cart {
justify-content: flex-start;
float: left;
}
<?php else: ?>
.mp_social_share_float {
<?php if ($block->isVerticalStyle($block->getFloatStyle())): ?>
<?= /* @noEscape */ $block->getFloatMargin('top')?>
<?php endif;?>
<?= /* @noEscape */ $block->getFloatPosition()?>
<?= /* @noEscape */ $block->getBackgroundColor()?>
z-index: 9999;
}
<?php if (!$block->isVerticalStyle($block->getFloatStyle())):?>
.a2a_floating_style.a2a_default_style {
<?= /* @noEscape */ $block->getFloatMargin('bottom')?>
}
<?php endif;?>
@media only screen and (min-width: 430px) {.navigation { z-index: 1; }}
@media only screen and (max-width: 777px) {
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
float: none;
}
}
.footer-bottom .container .logo { z-index: 0;}
<?php endif;?>
</style>
<div class="<?= /* @noEscape */ $block->getContainerClass($block->getDisplayType()) ?>">
<div class="a2a_kit <?= /* @noEscape */ $block->getDisplayType() ?>
<?= /* @noEscape */ $block->getButtonSize() ?>
<?= /* @noEscape */ $block->getFloatStyle() ?>">
<?php foreach ($block->getEnableService() as $enableService): ?>
<?php if ($block->isImageEnable($enableService)): ?>
<a class="a2a_button_<?= /* @noEscape */ $enableService ?>
<?= /* @noEscape */ $block->getShareCounter($enableService) ?>">
<img src="<?= /* @noEscape */ $block->getImageUrl($enableService) ?>"
<?= /* @noEscape */ $block->setImageSize($block->getButtonSize()) ?>
alt="<?= /* @noEscape */ $enableService ?>">
</a>
<?php else: ?>
<a class="a2a_button_<?= /* @noEscape */ $enableService ?>
<?= /* @noEscape */ $block->getShareCounter($enableService) ?>"></a>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($block->isAddMoreShare()): ?>
<a class="a2a_dd <?= /* @noEscape */ $block->getShareCounter('a2a_dd') ?>"
href="https://www.addtoany.com/share"></a>
<?php endif; ?>
</div>
</div>
<script type="text/javascript">
var a2a_config = a2a_config || {};
a2a_config.icon_color ="<?= /* @noEscape */ $block->getIconColor() ?>";
a2a_config.num_services = <?= /* @noEscape */ $block->getNumberOfService() ?>;
a2a_config.onclick = <?= /* @noEscape */ $block->getMenuType() ?>;
a2a_config.thanks = {postShare: <?= /* @noEscape */ $block->getThankYou() ?>,};
a2a_config.exclude_services = [<?= /* @noEscape */ $block->getDisabledServices() ?>];
</script>
<?php endif; ?>
<?php endif; ?>
@@ -0,0 +1,62 @@
/**
* 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
*/
require([
'jquery'
], function ($) {
$(document).ready(function () {
var existCondition = setInterval(
function () {
if ($('#a2a_modal').css('display') === 'block') {
if ($('.a2a_button_facebook').length !== 0 && $('.a2a_kit .a2a_button_facebook img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_facebook .a2a_s_facebook svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_facebook img').attr('src') + '" width="32" height="32" alt="facebook">');
$('#a2a_thanks_kit .a2a_button_facebook').css('height', '32px');
}
if ($('.a2a_button_twitter').length !== 0 && $('.a2a_kit .a2a_button_twitter img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_twitter .a2a_s_twitter svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_twitter img').attr('src') + '" width="32" height="32" alt="twitter">');
$('#a2a_thanks_kit .a2a_button_twitter').css('height', '32px');
}
if ($('.a2a_button_facebook_messenger').length !== 0 && $('.a2a_kit .a2a_button_facebook_messenger img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_facebook_messenger .a2a_s_facebook_messenger svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_facebook_messenger img').attr('src') + '" width="32" height="32" alt="facebook_messenger">');
$('#a2a_thanks_kit .a2a_button_facebook_messenger').css('height', '32px');
}
if ($('.a2a_button_pinterest').length !== 0 && $('.a2a_kit .a2a_button_pinterest img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_pinterest .a2a_s_pinterest svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_pinterest img').attr('src') + '" width="32" height="32" alt="pinterest">');
$('#a2a_thanks_kit .a2a_button_pinterest').css('height', '32px');
}
if ($('.a2a_button_linkedin').length !== 0 && $('.a2a_kit .a2a_button_linkedin img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_linkedin .a2a_s_linkedin svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_linkedin img').attr('src') + '" width="32" height="32" alt="linkedin">');
$('#a2a_thanks_kit .a2a_button_linkedin').css('height', '32px');
}
if ($('.a2a_button_tumblr').length !== 0 && $('.a2a_kit .a2a_button_tumblr img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_tumblr .a2a_s_tumblr svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_tumblr img').attr('src') + '" width="32" height="32" alt="tumblr">');
$('#a2a_thanks_kit .a2a_button_tumblr').css('height', '32px');
}
}
}, 400
);
});
});