fixed changes

This commit is contained in:
prateek srivastava 2021-10-14 13:41:49 +05:30
parent 61e7f1caed
commit 2ac46334df
1 changed files with 28 additions and 25 deletions

View File

@ -50,32 +50,35 @@
@php
$links = [];
if (core()->getConfigData('catalog.products.wishlist_social_share.facebook')) {
$links[] = 'facebook';
}
$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",
]
];
if (core()->getConfigData('catalog.products.wishlist_social_share.instagram')) {
$links[] = 'instagram';
}
if (core()->getConfigData('catalog.products.wishlist_social_share.twitter')) {
$links[] = 'twitter';
}
if (core()->getConfigData('catalog.products.wishlist_social_share.pinterest')) {
$links[] = 'pinterest';
}
if (core()->getConfigData('catalog.products.wishlist_social_share.linkedin')) {
$links[] = 'linkedin';
}
if (core()->getConfigData('catalog.products.wishlist_social_share.whatsapp')) {
$links[] = 'whatsapp';
}
if (core()->getConfigData('catalog.products.wishlist_social_share.email')) {
$links[] = 'email';
foreach($keysCollection as $key) {
if (core()->getConfigData($key['config_key'])) {
array_push($links, $key['link']);
}
}
$message = core()->getConfigData('catalog.products.wishlist_social_share.share_message');