Merge pull request #5277 from devansh-webkul/revert-pr-5234

Reverted Wishlist Share #5234
This commit is contained in:
Devansh 2021-10-27 14:18:11 +05:30 committed by GitHub
commit a84ea9b689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 128 deletions

View File

@ -268,46 +268,6 @@ return [
'type' => 'text',
]
],
], [
'key' => 'catalog.products.wishlist_social_share',
'name' => 'Wishlist Social Share',
'sort' => 9,
'fields' => [
[
'name' => 'enabled',
'title' => 'Enable Social Share?',
'type' => 'boolean',
], [
'name' => 'facebook',
'title' => 'Enable Share in Facebook?',
'type' => 'boolean',
], [
'name' => 'twitter',
'title' => 'Enable Share in Twitter?',
'type' => 'boolean',
], [
'name' => 'pinterest',
'title' => 'Enable Share in Pinterest?',
'type' => 'boolean',
], [
'name' => 'whatsapp',
'title' => 'Enable Share in What\'s App?',
'type' => 'boolean',
'info' => 'What\'s App share link just will appear to mobile devices.'
], [
'name' => 'linkedin',
'title' => 'Enable Share in Linkedin?',
'type' => 'boolean',
], [
'name' => 'email',
'title' => 'Enable Share in Email?',
'type' => 'boolean',
], [
'name' => 'share_message',
'title' => 'Share Message',
'type' => 'text',
]
],
], [
'key' => 'catalog.inventory',
'name' => 'admin::app.admin.system.inventory',

View File

@ -53,7 +53,6 @@
'additionalAttributes' => true,
'btnText' => $moveToCartText,
'addToCartBtnClass' => 'small-padding',
'wishlistShare' => core()->getConfigData('catalog.products.wishlist_social_share.enabled')
])
@endforeach
@ -68,4 +67,4 @@
</div>
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
@endsection
@endsection

View File

@ -11,78 +11,10 @@
font-size: 18px;
font-weight: 600;
}
.bb-social-share {
padding: 1rem 0;
}
.bb-social-share__title {
margin-bottom: 1rem;
font-weight: bold;
}
.bb-social-share__items {
list-style: none;
display: flex;
align-items: center;
}
.bb-social-share__item {
margin-right: 1rem;
}
.bb-social-share__item a {
text-decoration: none;
}
.bb-social-share__item a:hover {
text-decoration: none;
}
.bb-social-share__item a svg {
display: inline-block;
width: 2rem;
height: 2rem;
}
</style>
@endpush
@php
$links = [];
$keysCollection = [
[
"config_key" => "catalog.products.wishlist_social_share.facebook",
"link" => "facebook",
], [
"config_key" => "catalog.products.wishlist_social_share.instagram",
"link" => "instagram",
], [
"config_key" => "catalog.products.wishlist_social_share.pinterest",
"link" => "pinterest",
], [
"config_key" => "catalog.products.wishlist_social_share.twitter",
"link" => "twitter",
], [
"config_key" => "catalog.products.wishlist_social_share.linkedin",
"link" => "linkedin",
], [
"config_key" => "catalog.products.wishlist_social_share.whatsapp",
"link" => "whatsapp",
], [
"config_key" => "catalog.products.wishlist_social_share.email",
"link" => "email",
]
];
foreach($keysCollection as $key) {
if (core()->getConfigData($key['config_key'])) {
$links[] = $key['link'];
}
}
$message = core()->getConfigData('catalog.products.wishlist_social_share.share_message');
if (isset($checkmode) && $checkmode && $toolbarHelper->getCurrentMode() == "list") {
$list = true;
}
@ -179,24 +111,6 @@
? true : false,
])
</div>
@if ($wishlistShare)
<div class="share-wishlist">
<aside class="bb-social-share">
<div class="bb-social-share__title">
{{ __('Share Now') }}
</div>
<ul class="bb-social-share__items">
@foreach($links as $link)
@include(
'social_share::links.' . $link,
compact('product', 'message')
)
@endforeach
</ul>
</aside>
</div>
@endif
</div>
</div>
</div>