Close

Profile: abdulwahe

Avatar

User posts

4 months ago

We added a product ribbon to a single product, but a different ribbon appears on all the products, when we disabled that ribbon which is appearing on all the products, it starts working fine for a while and few minutes later it turned into last state and a new ribbon starts appearing on all products. how to fix it?

How to achieve vendor rating at product details page, like product rating? which is very important to let them know our vendors about thiers ratings .


I am willing to display "out of stock" at the bottom or top or product picture, is it possible to do that? and how to change the color and size of it? as to make to larger for customers and more visible....

9 months ago

How we can disable advance search in version 4.1 by default. I am using Nop Instant Search plugin.

In 3.9 I did it by changing code in a file plugins\SevenSpikes.Nop.Plugins.InstantSearch
View\InstantSearch.cshtml

The change is Search?adv=true to Search?adv=false

windows.location.href = "@url.RouterUr("HomePage")" + "Search?adv=true&cid=" + selectedCatagory + "&q"+ encodeURLComponent(searchItem) + "&sid=@Mode.SearchInProductDescription&isc=true";

When I access https://www.onlineoutlet.pk on my mobile, I see single large products in a mobile view. Can I reduce the size of the product and view more products?

Here are some sample links; http://www.daraz.pk | http://yayvo.com/

Can you please tell me the exact area where I can place this 'if clause'. I tried placing it after the script tags and also at the end of the page but it has not shown me my Custom Product Collection.


@model TopicModel
@using Nop.Core.Domain.Seo
@using Nop.Core.Infrastructure
@using Nop.Web.Models.Topics;
@{
    var isPopup = ViewBag.IsPopup;
    if (isPopup == null || isPopup == false)
    {
        Layout = "~/Views/Shared/_ColumnsOne.cshtml";
    }

    if (!Model.IsPasswordProtected)
    {
        //title
        Html.AddTitleParts(!String.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Title);
        //meta
        Html.AddMetaDescriptionParts(Model.MetaDescription);
        Html.AddMetaKeywordParts(Model.MetaKeywords);
    }

    var canonicalUrlsEnabled = EngineContext.Current.Resolve<SeoSettings>().CanonicalUrlsEnabled;
    if (canonicalUrlsEnabled)
    {
        var topicUrl = Url.RouteUrl("Topic", new { SeName = Model.SeName }, this.Request.Url.Scheme);
        Html.AddCanonicalUrlParts(topicUrl);
    }

    //page class
    Html.AppendPageCssClassParts("html-topic-page");

}
@if (Model.IsPasswordProtected)
{
    <script type="text/javascript">
        $(document).ready(function () {
            $('#button-password').click(function () {
                var postData = {
                    id: $("#@Html.FieldIdFor(model => model.Id)").val(),
                    password: $('#password').val()
                };
                addAntiForgeryToken(postData);


                $.ajax({
                    cache: false,
                    type: 'POST',
                    url: '@Url.RouteUrl("TopicAuthenticate")',
                    data: postData,
                    dataType: 'json',
                    success: function (data) {
                        if (data.Authenticated) {
                            $('#ph-topic #ph-title h1').html(data.Title);
                            if ($('#ph-topic #ph-title h1').text().length == 0) {
                                $('#ph-title').hide();
                            }
                            $('#ph-topic .page-body').html(data.Body);
                            $('#ph-password').hide();
                            $('#ph-topic').show();
                        }
                        else {
                            $('#password-error').text(data.Error).fadeIn("slow");
                            $('#ph-password #password').select().focus();
                        }
                    }
                });
                return false;
            });
        });

        $(document).ready(function () {
            $('#ph-topic').hide();
            $('#ph-password #password').select().focus();
        });
    </script>

    <div class="topic-password" id="ph-password">
        @using (Html.BeginRouteForm("TopicAuthenticate"))
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(model => model.Id)
            <div class="enter-password-title">
                @T("Topic.EnterPassword")
            </div>
            <div class="enter-password-form">
                @Html.Password("password")
                <input type="submit" id="button-password" value="@T("Topic.Button")" class="button-1 topic-password-button" />
            </div>
            <div class="password-error" id="password-error" style="display: none;"></div>

        }

    </div>
}
<div class="page topic-page" id="ph-topic">
    <div class="page-title" id="ph-title">
        <h1>@Model.Title</h1>
    </div>
    <div class="page-body">
        @Html.Raw(Model.Body)
    </div>
</div>

@if(Model.SystemName.Equals("black-friday1"))
    {
        @Html.Widget("BlackFridayWidgetZone")
    }

======
After making my Topic changes I have to create a Custom Product Collection and configure it to be shown on 'BlackFridayWidgetZone' right? Will it be able to iden

I want to show the collection on a new page e.g. Black-Friday.cshtml. Can I create a new page from admin area which gives me the access to .cshtml page?

My requirement is to have a new page and show products on it through Smart Product Collection. Just like I used collection on my home page.

https://www.onlineoutlet.pk

I want to add a page where I can list my Black Friday products. Is this something I can have? I want to list my Black Friday products just like I have listed products on homepage Smart Product Collection.

I tried doing this by Custom Product Collection in Smart Product Collection plugin but it asks for Widget Zone which I don't know from where to get this? I know, I can add additional Widget Zones by editing SupportedWidgetZones.xml inside Smart Product Collection plugin but I don't know what is the widget zone of my new page.

Kindly help me to get this thing done.

one year ago

I tried unchecking below mentioned options but still I see the advance search form.

1) Enable category search
2) Search in Descriptions
3) Search in product tags  

one year ago

I want to disable advance search option. I can not see the above code in Pavilion theme. Is this code has been replaced. The script code which I see is;


@** Copyright 2015 Seven Spikes Ltd. All rights reserved. (http://www.nop-templates.com)
    * http://www.nop-templates.com/t/licensinginfo
*@

@using Nop.Core;
@using Nop.Core.Infrastructure;
@using SevenSpikes.Nop.Plugins.InstantSearch.Models;

@model InstantSearchModel

@{
    /*
    Kendo UI specific css files.
    kendo.common.min.css - it contains common kendo styles
    kendo.default.min.css - it contains deafult kendo theme specific styles. You can use the kendo theme builder for new themes - http://demos.kendoui.com/themebuilder/index.html
    */

    Html.AddCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.InstantSearch/Themes/" + Model.Theme + "/Content/InstantSearch.css");

    var supportRtl = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Rtl;
    if (supportRtl)
    {
        Html.AddCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.InstantSearch/Themes/" + Model.Theme + "/Content/InstantSearch.rtl.css");
    }

    Html.AddScriptParts("~/Administration/Scripts/kendo/2014.1.318/kendo.core.min.js");
    Html.AddScriptParts("~/Administration/Scripts/kendo/2014.1.318/kendo.data.min.js");
    Html.AddScriptParts("~/Administration/Scripts/kendo/2014.1.318/kendo.popup.min.js");
    Html.AddScriptParts("~/Administration/Scripts/kendo/2014.1.318/kendo.list.min.js");
    Html.AddScriptParts("~/Administration/Scripts/kendo/2014.1.318/kendo.autocomplete.min.js");

    Html.AddScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.InstantSearch/Scripts/InstantSearch.min.js");
}

@if (Model.TopLevelCategories.Count > 0)
{
    @Html.Partial("TopLevelCategoriesDropDown", @Model.TopLevelCategories)
}

<input type="hidden" class="instantSearchResourceElement"
       data-highlightFirstFoundElement="@Model.HighlightFirstFoundElementToBeSelected.ToString().ToLowerInvariant()"
       data-minKeywordLength="@Model.MinKeywordLength"
       data-instantSearchUrl="@Url.RouteUrl("InstantSearch")"
       data-homePageUrl="@Url.RouteUrl("HomePage")"
       data-searchInProductDescriptions="@Model.SearchInProductDescriptions.ToString().ToLowerInvariant()" />

@* You can change the whole html by modifying the template below without the main div element as it is used in the navigation.
    There is NO need to add anchor html elements(<a href..) as the navigation is handled automaticaly when an item is selected.
    You can use the following tokens to get the information retuned from the server:
    ${ data.ProductPageUrl } - contains the url of the product page i.e /p/7. This property is required for the navigation to work and should not be removed from the template!!!
    ${ data.ProductName } - contains the name of the product
    ${ data.DefaultPictureUrl } - contains the Url of the default product picture
    ${ data.ProductPrice } - contains the price of the product
*@
<script id="instantSearchItemTemplate" type="text/x-kendo-template">
    <div class="instant-search-item" data-url="${ data.CustomProperties.Url }">
        <div class="img-block">
            <img src="${ data.DefaultPictureModel.ImageUrl }" alt="${ data.Name }" title="${ data.Name }" style="border: none">
        </div>
        <div class="detail">
            <div class="title">${ data.Name }</div>
            @if (Model.ShowSku)
            {
                <div class="sku"># var sku = ""; if (data.CustomProperties.Sku != null) { sku = "@T("Products.Sku"): " + data.CustomProperties.Sku } # #= sku #</div>
            }
            <div class="price"># var price = ""; if (data.ProductPrice.Price) { price = data.ProductPrice.Price } # #= price #</div>          
        </div>
    </div>
</script>