Popular Tags

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 13 ans
Not sure if this is relevant here but if you want to use the tags feature without the hassle of manually maintaining them here is a straight forward SQL scrip I wrote to help expedite the process. I use this all the time hope you find it useful as well (Site reference www.bijoudiva.com V8.0).

--Start of script
--Your tags...
select 'abalone' tag_name into #nop_tag_build
union  
select 'charm'
union  
select 'chunky'
union  
select 'designer'
union  
select 'fashionable'
union  
select 'floral'
union  
select 'gorgeous'
union  
select 'hammered'
union  
select 'stones'
union  
select 'stretch'  


declare @tag_name varchar(50)
declare nop_tag_update cursor for
select
  tag_name
from
  #nop_tag_build
open nop_tag_update
fetch next from nop_tag_update
into @tag_name
while @@fetch_status = 0
begin

  delete nop_producttag where name = @tag_name
  declare @producttagid int, @rowcount int

  insert into nop_producttag(name, productcount)
  values (@tag_name, 1)

  set @producttagid = @@identity

  insert into nop_producttag_product_mapping (producttagid, productid)
  select @producttagid, productid
  from nop_product
  where fulldescription like '%'+@tag_name+'%' and deleted = 0

  update nop_producttag
  set productcount = @@rowcount
  where producttagid = @producttagid
  
  fetch next from nop_tag_update
  into @tag_name
end
close nop_tag_update
deallocate nop_tag_update
go
drop table #nop_tag_build
Il y a 11 ans
danzik17 wrote:

<nopCommerce:PopularTags ID="ctrlPopularTags" runat="server" visible="false" />

That would work too, however if you don't want it displayed, why waste precious bandwidth loading controls that you aren't going to use?


If visible=false then it doesn't use any bandwidth :)   Invisible controls do not have any rendered HTML.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.