You have no items in your shopping cart.

Friday, April 19, 2024 7:59:12 PM

Bugs

Posted: 6 years ago

#6689 Quote

Support

Posted: 6 years ago

#6689 Quote
We have fixed this bug  Version 5.04 - October 16, 2017.
New code

if @LanguageId>0
begin  
  declare @countLanguage int
  set @countLanguage=0
  select @countLanguage=count(*)
  from Language L WITH (NOLOCK)
/*  where L.Published=1
      and (@StoreId=0 or L.LimitedToStores=0 or Exists(select Top 1 Id from StoreMapping sm   WITH (NOLOCK)
        where sm.EntityName = 'Language' and sm.StoreId=@StoreId and sm.EntityId=L.Id))*/

  if @countLanguage=1
  begin
    set @LanguageId=0
  end
end

Posted: 6 years ago

#6691 Quote

rrogne

Posted: 6 years ago

#6691 Quote
Why even have this check?
From my point of view this seems just to be an unescessary check.

Or am i missing any vital case where i rellay need to have LanguageId set to 0?

Posted: 6 years ago

#6692 Quote

Support

Posted: 6 years ago

#6692 Quote
Why did I add this check?
Plugin tries to read localized values if the customer selects another language.
If your nop store has ONLY one language it's not reasonable to do it. It's performance optimization for store WITH ONE language.
For your nop store you can removed this code (checking the language count).

Example.

if @LanguageId>0
begin
  create table #tmpLocalizedProperty (EntityId int, LocaleKey nvarchar(400), LocaleValue nvarchar(max))
  insert into #tmpLocalizedProperty (EntityId, LocaleKey, LocaleValue)
  select L.EntityId, L.LocaleKey, L.LocaleValue
  from LocalizedProperty L
  where L.LocaleKeyGroup='Category'
    and L.LanguageId=@LanguageId
    and L.EntityId in (select Id from #tmpCategory)

  update G
  set Name=ISNULL(L.LocaleValue,G.name)
  from #tmpCategory G left join #tmpLocalizedProperty L on G.Id=L.EntityId
    and L.LocaleKey='Name'

  update G
  set [Description]=ISNULL(L.LocaleValue,G.[Description])
  from #tmpCategory G left join #tmpLocalizedProperty L on G.Id=L.EntityId
    and L.LocaleKey='Description'

  update G
  set MetaKeywords=ISNULL(L.LocaleValue,G.MetaKeywords)
  from #tmpCategory G left join #tmpLocalizedProperty L on G.Id=L.EntityId
    and L.LocaleKey='MetaKeywords'

  update G
  set MetaDescription=ISNULL(L.LocaleValue,G.MetaDescription)
  from #tmpCategory G left join #tmpLocalizedProperty L on G.Id=L.EntityId
    and L.LocaleKey='MetaDescription'

  update G
  set MetaTitle=ISNULL(L.LocaleValue,G.MetaTitle)
  from #tmpCategory G left join #tmpLocalizedProperty L on G.Id=L.EntityId
    and L.LocaleKey='MetaTitle'
  
  drop table #tmpLocalizedProperty
                
  update C
  set SeName=ltrim(rtrim(Substring(US.Slug,1,400)))
  from #tmpCategory C, (select TOP 1 WITH TIES U.EntityId,U.Slug
    from UrlRecord U WITH (NOLOCK)
    where U.EntityId in (select Id from #tmpCategory)
      and U.EntityName='Category' and U.LanguageId=@LanguageId and U.IsActive=1
      and ltrim(rtrim(U.Slug))!=''
    ORDER BY ROW_NUMBER() OVER(PARTITION BY U.EntityId ORDER BY U.Id DESC)) US
  where C.Id=US.EntityId
end  

Posted: 6 years ago

#6693 Quote

rrogne

Posted: 6 years ago

#6693 Quote
I am not sure if i am getting you correct here, but the code you suggest i should remove. In what procedure is it located?

Posted: 6 years ago

#6694 Quote

Support

Posted: 6 years ago

#6694 Quote
This code was in two procedures.
FNS_CatalogModelFactory_HomepageCategories
and
FNS_CatalogModelFactory_ProductLoadAllPaged

You can download new release from our site.

Posted: 6 years ago

#6740 Quote

rrogne

Posted: 6 years ago

#6740 Quote
Hi, after i have uninstalled your plugin i'm not receiving any products on my category page. Is there anything more i need to do, unless press "uninstall" in admin?

Posted: 6 years ago

#6741 Quote

Support

Posted: 6 years ago

#6741 Quote
Plugin doesn't change any system tables.
If you uninstalled plugin nopcommerce doesn't use it.


Posted: 6 years ago

#6742 Quote

rrogne

Posted: 6 years ago

#6742 Quote
There is some strange behavior. Becuase i'm still calling this procedure "FNS_CatalogModelFactory_ProductLoadAllPaged"

Posted: 6 years ago

#6743 Quote

Support

Posted: 6 years ago

#6743 Quote
Can you remove plugin from Plugins folder?

Posted: 6 years ago

#6744 Quote

rrogne

Posted: 6 years ago

#6744 Quote
That was the case. Thanks!

Posted: 6 years ago

#6864 Quote

rrogne

Posted: 6 years ago

#6864 Quote
Hi it seems to be some kind of issue with displayorder on the category pages.

I have a product where i have display order -10 on the table Product_Category_Mapping.
Total the product have 3 mappings, and all of the have -10 in displayOrder, but it doesn't appear first on the page.

I have checked the stored procedure, and what i can see the condition is that the product should not be deleted, published and VisibleIndividually which it is.

Posted: 6 years ago

#6865 Quote

Support

Posted: 6 years ago

#6865 Quote
What nop version do you use? Do you use the last release?

I checked the code of stored procedure FNS_CatalogModelFactory_ProductLoadAllPaged for nop 3.90

    --category position (display order)
    IF @CategoryIdsCount > 0 SET @sql_orderby = ' pcm.DisplayOrder ASC'
    
    --manufacturer position (display order)
    IF @ManufacturerId > 0
    BEGIN
      IF LEN(@sql_orderby) > 0 SET @sql_orderby = @sql_orderby + ', '
      SET @sql_orderby = @sql_orderby + ' pmm.DisplayOrder ASC'
    END
    --name
    IF LEN(@sql_orderby) > 0 SET @sql_orderby = @sql_orderby + ', '
    SET @sql_orderby = @sql_orderby + ' p.[Name] ASC'

Posted: 6 years ago

#6866 Quote

rrogne

Posted: 6 years ago

#6866 Quote
I use version 3.9.
Yes i did a print in the stored procedure, and the it is orderd by "pcm.DisplayOrder ASC"

Posted: 6 years ago

#6867 Quote

rrogne

Posted: 6 years ago

#6867 Quote
But the order is not by product_category_mapping displayOrder...

Posted: 6 years ago

#6870 Quote

Support

Posted: 6 years ago

#6870 Quote
I can't reproduced this bug....
Can you open the plugin configure page and check the parameter  'Default Product Sorting'?
Do you see 'Position'?

Posted: 6 years ago

#6902 Quote

trishop

Posted: 6 years ago

#6902 Quote
Spent way too much time banging my head against the wall only to figure out the NOPMSSQLPROVIDER plugin was the source of my pain.

Checking the "Use optimization for PriceCalculationService" setting breaks discounts by Manufacturer. Whenever a discount is applied in the cart and that feature is enabled, it doesn't recognize products that have been discounted by manufacturer. When I uncheck that feature everything works as expected.

However, if I have two discounts set up - one by manufacturer and one by product, and a product overlaps in both, the Product table sets the HasDiscountsApplied flag and then, and only then, does the Manufacturer discount get applied.

nopCommerce doesn't check the HasDiscountsApplied flag in the Product table when calculating discounts by Manufacturer.

Posted: 6 years ago

#6904 Quote

Support

Posted: 6 years ago

#6904 Quote
Thank you for report about this bug I'll check it now....

Posted: 6 years ago

#6910 Quote

trishop

Posted: 6 years ago

#6910 Quote
Support wrote:
Thank you for report about this bug I'll check it now....
Were you able to reproduce?

Posted: 6 years ago

#6911 Quote

Support

Posted: 6 years ago

#6911 Quote
I think I have found the problem. Take me several hours.... I want to think...
I use kernel optimizations...

P.S.
I am sorry that I couldn't answer you at once. Most of our free time we spent on upgrading plugins...

Posted: 6 years ago

#6918 Quote

Support

Posted: 6 years ago

#6918 Quote
I am sorry for delay with solving this bug, but I want to check if you and I were right.

>nopCommerce doesn't check the HasDiscountsApplied flag in the Product table when calculating discounts by Manufacturer.

I added this bug several times ago only in nop 3.90 (then in 4.00 too)
I have fixed it.

Thank you.

http://www.foxnetsoft.com/content/files/FoxNetSoft.MSSQLProvider.zip

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved