Close

Removing Affiliate and Extras From the Footer

Bellgate
9 years ago
#8375 Quote
Avatar
  • 12
I don't need the Affiliate and Extras information in the footer and I want to remove it without modifying Footer.cshtml.  I see there is a place to add custom css styles (Custom Head Styles).  Can I add some css code here to get the result I am looking for?  If so, what do I need to add?
Peter.Zhekov
9 years ago
#8386 Quote
Avatar
  • Moderator
  • 104
Hi Bellgate,

You need to go in "Admin/yourTheme/Settings" and there you will find "Custom Head Styles". There you can write your custom css code to manage your footer.
For example if you want to remove the whole footer block you must write:
.footer{display:none;}
Then press save button which is in right top corner of the page.

If you want to remove just middle section for example:
.footer-middle{display:none;};

So whatever you do not want to show in your site, just go to "Custom Head Styles" in your theme administration and add your custom styles.
Regards,
Peter Zhekov
Nop-Templates.com
Bellgate
9 years ago
#8396 Quote
Avatar
  • 12
Hi Peter,

Thank you for your reply.  I have actually used Custom Head Styles to make modifications so I am familiar with how it works.  From looking at the code I am not sure how to accomplish what I want.

Here is the relevant code:


<div class="footer-middle">
        <div class="footlist">
            <h3 class="title">@T("SevenSpikes.Themes.Smart.Common.LegalInformation")</h3>
            <ul>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("privacyinfo") })">@T("PrivacyNotice")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("conditionsofUse") })">@T("ConditionsOfUse")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("securepayment") })">@T("SevenSpikes.Themes.Smart.Common.SecurePayment")</a></li>
            </ul>
        </div>
        <div class="footlist">
            <h3 class="title">@T("SevenSpikes.Themes.Smart.Common.ShippingReturns")</h3>
            <ul>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("internationalshipping") })">@T("SevenSpikes.Themes.Smart.Common.InternationalShipping")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("shippinginfo") })">@T("ShippingReturns")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("deliveryinformation") })">@T("SevenSpikes.Themes.Smart.Common.DeliveryInformation")</a></li>
            </ul>
        </div>
        <div class="footlist">
            <h3 class="title">@T("SevenSpikes.Themes.Smart.Common.AffiliateExtras")</h3>
            <ul>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("brands") })">@T("SevenSpikes.Themes.Smart.Common.Brands")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("giftvouchers") })">@T("SevenSpikes.Themes.Smart.Common.GiftVouchers")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("becomeaffiliate") })">@T("SevenSpikes.Themes.Smart.Common.BecomeAffiliate")</a></li>
            </ul>
        </div>
        <div class="footlist">
            <h3 class="title">@T("SevenSpikes.Themes.Smart.Common.ServiceSupport")</h3>
            <ul>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("customerassistance") })">@T("SevenSpikes.Themes.Smart.Common.CustomerAssistance")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("faq") })">@T("SevenSpikes.Themes.Smart.Common.FAQ")</a></li>
                <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
            </ul>
        </div>
    </div>

You are right, I can remove the entire middle footer by setting its display property to none, but I can't (from what I see) selectively remove individual footer sections (or lists).  This is because each section (or list) is named footlist.  If the lists had unique names then I could.  For example, if they used names such as footlist-legal, footlist-shippingreturns, etc., then I could.   You can get even finer granularity if each li item had a unique class name.
Peter.Zhekov
9 years ago
#8398 Quote
Avatar
  • Moderator
  • 104
Hi Bellgate,

You can simply add unique class name to every element you want in this view.

<div class="footer-middle">
        <div class="footlist list-1">
            <h3 class="title">@T("SevenSpikes.Themes.Smart.Common.LegalInformation")</h3>
            <ul>
                <li class="unique-class-name-1"><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("privacyinfo") })">@T("PrivacyNotice")</a></li>
                <li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("conditionsofUse") })">@T("ConditionsOfUse")</a></li>
.
.
.
.

The code above shows how easy this is. Look for bold text in the markup. Where you want to have your own class name to select the element just add it like this:
into the element opening tag "<li>" add "class = className" ==> <li class="classname">.
Then it`s easy to remove whatever you want via "Custom Head Styles".  
Regards,
Peter Zhekov
Nop-Templates.com
jakubz
9 years ago
#8772 Quote
Avatar
  • 182
Hi! how can i change footer block with information "about us"? I want insert another topic (shorter/without photo etc.), but don't have idea how to do this?
Deni
9 years ago
#8773 Quote
Avatar
  • Moderator
  • 389
jakubz wrote:
Hi! how can i change footer block with information "about us"? I want insert another topic (shorter/without photo etc.), but don't have idea how to do this?


Hi, 

To do this, you should go to this file: \Themes\Smart\Views\Common\Footer.cshtml and find this row (in the beginning of the file): @Html.Action("TopicBlock", "Topic", new { systemName = "AboutUs" }). Just change "AboutUs" with the system name of the topic you want to show.
Best Regards,
Mladen Staykov
Nop-Templates.com
jakubz
9 years ago
#8808 Quote
Avatar
  • 182
I have problem with blog link.

I add: 
<li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("Blog") })">@T("Blog")</a></li>


Topic is good but link don't work (i click and nothing happen). What I do wrong?
jakubz
9 years ago
#8809 Quote
Avatar
  • 182
Ok i see i have same problem with links to: Cart, Orders and My account :| Code are similiar.
Boyko
9 years ago
#8810 Quote
Avatar
  • Moderator
  • 1570
jakubz wrote:
I have problem with blog link.

I add: 
<li><a href="@Url.RouteUrl("Topic", new { SeName = Html.GetTopicSeName("Blog") })">@T("Blog")</a></li>


Topic is good but link don't work (i click and nothing happen). What I do wrong?


This code works only for Topics!!!
Do you have a topic with system name Blog?
Regards,
Nop-Templates.com Team
Boyko
9 years ago
#8811 Quote
Avatar
  • Moderator
  • 1570
jakubz wrote:
Ok i see i have same problem with links to: Cart, Orders and My account :| Code are similiar.


Hi jakubz,

The code above works only for topics. To add links to the Cart, Orders and My account you need different code. There are predefined routes that you need to use to obtain the URL to these pages.

Cart:
@Url.RouteUrl("ShoppingCart")


My Account

@Url.RouteUrl("CustomerInfo")


Orders:

@Url.RouteUrl("CustomerOrders")
Regards,
Nop-Templates.com Team