[SOLVED] Problem with PowerHub theme (nop 3.40)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hello everyone!
I have a problem with this theme.
I cannot load the NEW ARRIVALS tag with all the latest products i have inserted.
The option in Settings->Catalog Settings->Show recently added products is True.
But when i add a new product, this new one doesn't appear in the New arrivals tag.
How can i solve this?

The only editing i done is put in language "new arrivals", "bestsellers" and "featured" to have them in italian.
I tried using the Html.Action:


......
<div class="tab-content">
        <div class="active tab-pane " id="featured">
          @Html.Action("HomepageProducts", "Product")
        </div>

        <div class="tab-pane" id="newproducts">
          @Html.Action("RecentlyAddedProducts", "Product")  <----- I INSERTED THIS LINE
        </div>

        <div class="tab-pane" id="bestseller">
          @Html.Action("HomepageBestSellers", "Product")
        </div>
      </div>
.....

but it loads also the title and the topmenu in that div.
I need help, please :)
9 years ago
I think the best way to get an answer to your question is to contact the vendor of the theme.
Please note that vendors cannot monitor all forum posts as there is no feed on the forum or anything.
So questions like this could easily be missed.
9 years ago
DevNew wrote:
Hello everyone!
I have a problem with this theme.
I cannot load the NEW ARRIVALS tag with all the latest products i have inserted.
The option in Settings->Catalog Settings->Show recently added products is True.
But when i add a new product, this new one doesn't appear in the New arrivals tag.
How can i solve this?

The only editing i done is put in language "new arrivals", "bestsellers" and "featured" to have them in italian.
I tried using the Html.Action:


......
<div class="tab-content">
        <div class="active tab-pane " id="featured">
          @Html.Action("HomepageProducts", "Product")
        </div>

        <div class="tab-pane" id="newproducts">
          @Html.Action("RecentlyAddedProducts", "Product")  <----- I INSERTED THIS LINE
        </div>

        <div class="tab-pane" id="bestseller">
          @Html.Action("HomepageBestSellers", "Product")
        </div>
      </div>
.....

but it loads also the title and the topmenu in that div.
I need help, please :)


Hi,

You can try following code (place at the bottom of the "Themes/PowerHub/Views/Home/Index.cshtml" file):

<script>
    $(document).ready(function () {
        $.ajax({
            cache: false,
            type: 'GET',
            url: '@Url.Action("RecentlyAddedProducts", "Product")',
            dataType: 'html',
            success: function (data) {
                $('.home-page .tab-content #newproducts').append($(data).find('.product-grid'))
            },
            error: function (xhr, ajaxOptions, thrownError) {
            }
        });
    });
</script>

Hope this help :)
9 years ago
Thanks but it doesn't work..
9 years ago
FINALLY SOLVED IT!

Using the solution suggested by ima9ines, i modified his code to:

<script>
    $(document).ready(function () {
        $.ajax({
            cache: false,
            type: 'GET',
            url: '@Url.Action("RecentlyAddedProducts", "Product")',
            dataType: 'html',
            success: function (data) {
                $('.tab-content #newproducts').append($(data).find('.product-grid'))
            },
            error: function (xhr, ajaxOptions, thrownError) {
            }
        });
    });
</script>


and modified the RecentlyAddedProducts.cshtml to:
@model IList<ProductOverviewModel>

@using Nop.Web.Models.Catalog;

    <div class="page-body">
        @if (Model.Count > 0)
        {
            <div class="product-grid">
               @foreach (var product in Model)
               {
                   <div class="item-box">
                       @Html.Partial("_ProductBox", product)
                   </div>
               }
            </div>        
        }
    </div>


And it works :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.