Close

Profile: anton_ivanov

Avatar

User posts

one year ago

Hi,

Well, you can actually make the tab be 2nd in the list but the code for it will not be pretty at all.
You can have the

@if (!isTabDescriptionEmpty)
{
      <li><a href="#quickTab-ShippingInfo">@T("ShippingReturns")</a> </li>
}


inside the foreach statement and only add it after the first iteration of the foreach.
That can happen by changing the foreach to a regular for iteration or adding an int variable "count" that will be incremented on each iteration.

Something like

int count = 0;

@foreach(var tabInfo in Model.Tabs)
{
    @if (!isTabDescriptionEmpty && count == 1)
    {
      <li><a href="#quickTab-ShippingInfo">@T("ShippingReturns")</a> </li>
    }

    <li>
        <a href="#quickTab-@tabInfo.TabKey">@tabInfo.Title</a>
    </li>

    count++;
}


I wouldn't usually recommend such an approach but if you really have to make the tab to be on 2nd place in the list of tabs that is a way to do it.

Hope that helps!

one year ago

Hi,

You can display the tab on only the products that do have a content for that by changing the code order a bit.

At the top of the _ProductsTabsWithoutAjax.cshtml right under the @model TabUIModel you will need to invoke your component and save the returned data in a variable like this:

@{
    var tabDescription = @await Component.InvokeAsync("YourComponentName", new { productId = Model.ProductId });
    var isTabDescriptionEmpty = String.IsNullOrEmpty(tabDescription.ToHtmlString());
}


After that, you should wrap the tab name into an if statement:

 @if (!isTabDescriptionEmpty)
{
      <li><a href="#quickTab-ShippingInfo">@T("ShippingReturns")</a> </li>
}


and then down where the invocation of the component originally was you should write something like:


@if(!isTabDescriptionEmpty)
{
    <div id="quickTab-ShippingInfo">
        @tabDescription
    </div>
}


As for the ordering of the tab, you could either put it after all of the other tabs (like it is now) or before all of the other tabs. That is because all of the other tabs are displayed in a foreach iteration.
If you want your custom tab to be first you should just move the tab name before the foreach iteration that is right above it.

Hope that helps!

one year ago

Hello,

You can add custom quick tabs but that will require some code customization. You will have to edit the ~/Plugins/SevenSpikes.Nop.Plugins.NopQuickTabs/Views/Components/ProductTabs/_ProductTabsWithoutAjax.cshtml (~/Plugins/SevenSpikes.Nop.Plugins.NopQuickTabs/YourThemeName/Views/Components/ProductTabs/_ProductTabsWithoutAjax.cshtml, where YourThemeName is your active theme name if you are using one of our themes).
You will have to uncomment lines 12:

<li><a href="#quickTab-ShippingInfo">@T("ShippingReturns")</a> </li>

and line 23-25:
<div id="quickTab-ShippingInfo">
        @await Component.InvokeAsync("TopicBlock", new { systemName = "ShippingInfo" })
        </div>


That will display the Shipping Info topic as a tab. If you want to display your own information in your tab you will need to change a couple of things.

Firstly, from line 12 you will need to change the resource that is displayed as the tab name. Change @T("ShippingReturns") to show any other return by changing the string inside the @T() or just write your title in plain text.
After that, you will need to change line 24.
Now the code calls the TopicBlock view component. You will need create your own view component that will return the information from your new products table. The Invoke method of your component can have an int productId parameter so it knows for which product it is invoked.
After that you can change the code on line 24 like this:
 @await Component.InvokeAsync("YourComponentName", new { productId = Model.ProductId })


where the YourComponentName is your newly created view components name.

Note: If you want your custom tab to show on your public store you will need to uncheck the Enable Ajax setting in Administration -> Nop-Templates -> Plugins -> Quick Tabs -> Settings.

Note: This guide is written for nopCommerce versions 4.00 and above.

Hope that helps!

one year ago

Hello,

You can edit the resources for your languages from Administration -> Configuration -> Languages -> String Resources.
The menu items in the mega menu are not resources, though. The menu items have a setting "Title" that can have different values per language. In order to change it you will need to go to Administration -> Nop-Templates -> Plugins -> Mega Menu -> Manage Menus -> Edit Menu -> Menu Items and edit the menu item by clicking the downfacing arrow next to the name of the menu item. After that, choose the language from the tabs above the Title setting and enter a value.

Hope that helps!

one year ago

Hello,

This functionality is possible through the Nop Attachments plugin. You can create an attachment with an attached PDF file that will be displayed in the Quick Tabs of your product. Users will be able to click the file and open it.

You will just need to check the Enable Product Attachments tab setting in Administration -> Nop-Templates -> Plugins -> Quick Tabs -> Settings and map your attachment to the quick_tabs_product_attachments_tab widget zone.

Hope that helps!

Hello,

We are looking into ways to pass the facebook app review. I will respond to this post once we've got any results and updated our documentation.

Bugs
one year ago

Hello,

The only localizable setting in the product ribbons Small product picture ribbon and big product picture ribbon is the Text setting.

The Position and Picture settings aren't localizable and that is the correct behaviour.

Hope that helps!

one year ago

Hello,

Can you check if the Use one page checkout setting in Administration -> Configuration -> Settings -> Order Settings is checked? If you'd like the same checkout as on demo.nopcommerce.com this setting should be checked.

one year ago

Hello,

You've mentioned that you've upgraded from 3.9 to 4.0. Can you tell me if you've followed these instructions?

Hi,

We've answered to your ticket and are waiting for a response so we can figure this issue out.