Banners Extension for 1.9 (Multiple)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
thanks cooperchen, worked!

I put 2 banners but shows only one. The images are not changing!

Have I to do some more changes in code?
13 years ago
two banner in same place have a problem is that java script will be cover, so banner just oneline show, In this problem, I thought that we need to find another way to resolve.

but now, I still have no idea how to resolve it..
13 years ago
Hi

I am trying to implement this on my nop1.9 i am kind of novice in all these, please help, i am not able to perform these steps, as my site is already live, please suggest how to go about it..

Nop.BusinessLogic
  Advertise (Folder Add)
    Banner.cs (File Add)
    BannerManager.cs (File Add)
  Data
    NopModel.edmx (File Modified)
    <#Include>
    Add - Table Nop_Banner
      Entity: Banner
      Entity Set Name: Banners
    </#Include>

    NopObjectContext.cs (File Modified)
    <#Include>
          /// <summary>
          /// Gets an Banner instance that is used to query, add, modify, and delete objects of the specified entity type.
          /// </summary>
          public ObjectSet<Banner> Banners
          {
              get
              {
                  if ((_banners == null))
                  {
                      _banners = CreateObjectSet<Banner>();
                  }
                  return _banners;
              }
          }
          private ObjectSet<Banner> _banners;
    </#Include>

Thanks in advance
13 years ago
dear kakoli

if u using my upgrade package, in package you will find two folders, just replace them with your nopcommerce, follow Backlog Banners.txt step by step.

Backlog Banners.txt, I did not correct it too much.

at last, sorry for my poor english, and I touch nopcommerce not more than one month, so am I novice..

best regards.
13 years ago
Thanks for replying, but i couldnt find updgrade package, can please send me the link..
13 years ago
cooperchen wrote:
two banner in same place have a problem is that java script will be cover, so banner just oneline show, In this problem, I thought that we need to find another way to resolve.

but now, I still have no idea how to resolve it..

To enable the JavaScript to rotate multiple images, change the following line in file: Modules\Banner.ascx.cs from:
    Page.ClientScript.RegisterClientScriptBlock(typeof(string), "RotatorBanner", sScript);
to:
    Page.ClientScript.RegisterStartupScript(typeof(string), "RotatorBanner", sScript);

The problem was that RegisterClientScriptBlock inserts the script block at the top of the rendered page (possibly) before magicimage.js is included.

.
13 years ago
thanks mb

in banners 1.8, the origin code is RegisterClientScriptBlock, I change it to RegisterStartupScript, because I found banner.ascx include magicimage.js behind RegisterClientScriptBlock. and It make browser happen error. QuickStart() can not be find.

so I found banner some time work, some time do not work, so I change it to RegisterStartupScript to make sure banner worked.

I will be change it back to RegisterClientScriptBlock and try it again. thanks a lot. :)
13 years ago
I change code back to RegisterClientScriptBlock, and move QuckStart() to RegisterStartupScript, It worked.

but I still have a problem is that magicimage.js show banner on tag <div id="MagicImage">, so in same page only one can be show.

did somebody can help me how to chage tag <div id="MagicImage"> to dynamic...

I try to put these code to change, but it failed.

            HtmlControl magic = (HtmlControl)FindControl("MagicImage");
            if (magic != null)
            {
                (magic).ID = "mg_" + this.ID;
            }
13 years ago
Thanks for replying, but i couldnt find updgrade package, can please send me the link..
13 years ago
I  have a link on this topic at fist page, you can find it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.