Inhalte aufrufen

Profilbild

Change social media icon


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
9 Antworten zu diesem Thema

#1 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 03 September 2019 - 15:04

I NEED CHANGE SOCIAL MEDIA ICON   PINTREST TO WHATSAPP ANY SOLUTION



#2 Marcel Schmidt

Marcel Schmidt

    SmartStore AG

  • Administrators
  • 57 Beiträge

Geschrieben: 03 September 2019 - 15:30

Smartstore uses FontAwesome Icons

https://fontawesome....lery&q=whatsapp

 

 

just replace pinterest icon class with whatsapp icon class

 

Best regards

Angehängte Bilder



#3 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 03 September 2019 - 16:42

from which file please help



#4 Marcel Schmidt

Marcel Schmidt

    SmartStore AG

  • Administrators
  • 57 Beiträge

Geschrieben: 03 September 2019 - 17:07

You'll need to adjust Footer.cshtml > replace Pinterest socialLink with one for whatsapp, you can also adjust FooterModel.cs to make it fit your needs

just beware that your changes will be lost if you update your smartstore version, so make sure to have a backup of your work, so you can override it if needed

 

 

you can find footer in:

Views > Common > Partials > Footer.cshtml

 

 

best regards



#5 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 03 September 2019 - 17:11

@model FooterModel
 
@using SmartStore.Web.Models.Common;
@using SmartStore.Services.Cms;
 
@{ 
var footerLinks = new List<LinkResolverResult>
{
LinkResolver.Resolve("topic:aboutus"),
LinkResolver.Resolve("topic:imprint"),
LinkResolver.Resolve("topic:disclaimer"),
LinkResolver.Resolve("topic:privacyinfo"),
LinkResolver.Resolve("topic:conditionsofuse")
};
 
var socialLinks = new List<Tuple<string, string>>();
if (Model.FacebookLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.FacebookLink, "facebook-f"));
}
 
if (Model.TwitterLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.TwitterLink, "twitter"));
}
 
if (Model.PinterestLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.PinterestLink, "pinterest-p"));
}
 
if (Model.YoutubeLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.YoutubeLink, "youtube"));
}
 
if (Model.InstagramLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.InstagramLink, "instagram"));
}
 
var invserseFooter = GetThemeVariable<bool>("inverse-footer");
}
 
@{ Html.RenderWidget("footer_top"); }
 
@if (Model.ShowSocialLinks && socialLinks.Any())
{
<div class="footer-social-wrapper">
<div class="container footer-social">
<div class="row">
<div class="col text-center">
@foreach (var link in socialLinks)
{
<a href="@link.Item1" target="_blank" class="btn x-btn-@(invserseFooter ? "clear" : "secondary") btn-circle btn-social btn-brand-@link.Item2">
<i class="fab fa-@link.Item2"></i>
</a>
}
</div>
</div>
</div>
</div>
}
 
<div class="footer-main-wrapper">
<div class="container footer-main">
<div class="row sm-gutters">
 
<div class="col-md-3">
<nav class="footer-links nav-collapsible">
<h4 class="footer-title nav-toggler collapsed" data-toggle="collapse" data-target="#footer-info" aria-controls="footer-info" aria-expanded="false">
                        @T("Footer.Info")
                    </h4>
<div class="collapse nav-collapse" id="footer-info">
                        @{ Html.SmartStore().Menu().Name("FooterInformation").Template("LinkList").Render(); }
</div>
</nav>
</div>
 
<div class="col-md-3">
<nav class="footer-links nav-collapsible">
<h4 class="footer-title nav-toggler collapsed" data-toggle="collapse" data-target="#footer-service" aria-controls="footer-service" aria-expanded="false">
                        <span class="d-none d-md-block">@T("Footer.Service")</span>
                        <span class="d-md-none">@T("Footer.Service.Mobile")</span>
                    </h4>
<div class="collapse nav-collapse" id="footer-service">
                        @{ Html.SmartStore().Menu().Name("FooterService").Template("LinkList").Render(); }
</div>
</nav>
</div>
 
<div class="col-md-3">
<nav class="footer-links company nav-collapsible">
<h4 class="footer-title nav-toggler collapsed" data-toggle="collapse" data-target="#footer-company" aria-controls="footer-company" aria-expanded="false">
                        <span class="d-none d-md-block">@T("Footer.Company")</span>
                        <span class="d-md-none">@T("Footer.Company.Mobile")</span>
                    </h4>
<div class="collapse nav-collapse" id="footer-company">
@{ Html.SmartStore().Menu().Name("FooterCompany").Template("LinkList").Render(); }
</div>
</nav>
</div>
 
<div class="col-md-3">
@{ Html.RenderWidget("footer_col_4_before"); }
 
@if (!Model.HideNewsletterBlock)
{
<div class="footer-newsletter nav-collapsible" data-subscription-url="@(Url.RouteUrl("SubscribeNewsletter"))">
<h4 class="footer-title nav-toggler collapsed" data-toggle="collapse" data-target="#footer-newsletter" aria-controls="footer-newsletter" aria-expanded="false">@T("Newsletter.Title")</h4>
<div class="collapse nav-collapse" id="footer-newsletter">
<div id="newsletter-subscribe-block">
<div class="input-group has-icon mb-2">
@Html.TextBoxFor(x => x.NewsletterEmail, new { id = "newsletter-email", @class = "form-control", placeholder = T("Newsletter.Email") })
<span class="input-group-icon text-muted">
<i class="fa fa-envelope"></i>
</span>
<div class="input-group-append">
<button id="newsletter-subscribe-button" class="btn btn-primary btn-icon" title="@T("Newsletter.Button")">
<i class="fa fa-angle-right"></i>
</button>
</div>
</div>
 
<div class="d-none d-lg-block">
<div class="form-inline">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="newsletter-subscribe" value="newsletter-subscribe" name="optionsRadios" checked="checked">
<label class="form-check-label" for="newsletter-subscribe">
<span>@T("Newsletter.Subscribe")</span>
</label>
</div>
 
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="newsletter-unsubscribe" value="newsletter-unsubscribe" name="optionsRadios">
<label class="form-check-label" for="newsletter-unsubscribe">
<span>@T("Newsletter.Unsubscribe")</span>
</label>
</div>
</div>
</div>
 
@{ Html.RenderWidget("gdpr_consent_small"); }
 
@Html.ValidationMessageFor(x => x.NewsletterEmail)
</div>
<div id="newsletter-result-block" class="alert alert-success d-none"></div>
</div>
</div>
}
 
@if (Model.ShowThemeSelector)
{
<div class="theme-selector d-none d-md-block">
<h4>@T("Footer.Themes")</h4>
<div class="content">
@{
Html.RenderAction("StoreThemeSelector", "Common");
}
</div>
</div>
}
 
@{ Html.RenderWidget("footer_col_4_after"); }
</div>
</div>
</div>
</div>
 
@{ Html.RenderWidget("footer_bottom"); }
 
<div class="footer-bottom-wrapper">
<div class="container footer-bottom">
<div class="row sm-gutters">
 
@if (Model.ShowLegalInfo)
{
<div class="col pb-1 pb-sm-0">
@Html.Raw(Model.LegalInfo)
</div>
}
 
@if (Model.SmartStoreHint.HasValue())
{
<div class="col-12 col-sm-auto pb-1 pb-sm-0 text-sm-center">
@Html.Raw(Model.SmartStoreHint)
</div>
}
 
<div class="col text-sm-right">
@T("Content.CopyrightNotice", DateTime.Now.Year.ToString(), Model.StoreName)
</div>
</div>
</div>
</div>


#6 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 03 September 2019 - 19:08

where i change please help



#7 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 04 September 2019 - 17:53

please help where need to change please



#8 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 09 September 2019 - 09:51

some one help please i am confused where change in tht code 



#9 Marcel Schmidt

Marcel Schmidt

    SmartStore AG

  • Administrators
  • 57 Beiträge

Geschrieben: 09 September 2019 - 16:00

to quickly replace pinterest with whatsapp replace "Pinterest-p" with a "whatsapp" and Model.PinterestLink with an alternativ url (in line 27)

 

if (Model.PinterestLink.HasValue())
{
socialLinks.Add(new Tuple<string, string>(Model.PinterestLink, "pinterest-p"));
}
 
A better / more clean way would be adjusting model and make it fit to your needs


#10 rashindok

rashindok

    Advanced Member

  • Members
  • 51 Beiträge

Geschrieben: 09 September 2019 - 19:00

thnx ok  if ineed make size big what will do