Page 1 of 1
Same banner - Multiple Categories
Posted: Fri Oct 30, 2009 11:52 pm
by Iamdbat
How can you use the same banner - say an affiliated banner on numerous categories - As it stands with ISC you can only allocate a new or existing banner to one category only
But what if you want to use the same banner for a top level category and its sub categories
Do you have to create the same banner for each category ?????????!*&^:F?
Thanks in advance for any input
Re: Same banner - Multiple Categories
Posted: Sat Oct 31, 2009 4:16 am
by Painstik
Yes you will have to make banner for each category

Just like me...
I will try to make that fix, but atm I am working on product search trying to fix that idiotic search engine
Re: Same banner - Multiple Categories
Posted: Sat Oct 31, 2009 1:27 pm
by novista
You could also create a new panel, place your banner info there then add %%panel.panelname%% to you category layout.
Re: Same banner - Multiple Categories
Posted: Sat Oct 31, 2009 4:27 pm
by Painstik
novista wrote:You could also create a new panel, place your banner info there then add %%panel.panelname%% to you category layout.
Allready thought about that, but like that banner would be on all categories and that is not an option I need.
Re: Same banner - Multiple Categories
Posted: Tue Dec 29, 2009 5:52 am
by Iamdbat
As painstik says - It's an ... well not an oversight on behalf of Interspire but something that needs to improved - I suggest if anyone is interested to go to the ideas lab and vote for it
Re: Same banner - Multiple Categories
Posted: Fri Jan 22, 2010 1:00 pm
by Painstik
I have some small changes for creating multiple banners (this is solution for now, but in the future there will be made a much better banner administration)
Open: admin/templates/banner.form.html
Find:
Code: Select all
<select name="bannercat" id="bannercat" class="Field200">
<option value="">%%LNG_ChooseACategory%%</option>
%%GLOBAL_CategoryOptions%%
</select>
Replace with:
Code: Select all
<select name="bannercat[]" id="bannercat" multiple="bannerCatArray" class="Field200">
<option value="">%%LNG_ChooseACategory%%</option>
%%GLOBAL_CategoryOptions%%
</select>
Find:
Code: Select all
<select name="bannerbrand" id="bannerbrand" class="Field200">
<option value="">%%LNG_ChooseABrand%%</option>
%%GLOBAL_BrandOptions%%
</select>
Replace with:
Code: Select all
<select name="bannerbrand[]" id="bannerbrand" multiple="bannerBrandArray" class="Field200">
<option value="">%%LNG_ChooseABrand%%</option>
%%GLOBAL_BrandOptions%%
</select>
Open: admin/includes/classes/class.banners.php
Find:
Code: Select all
$category = (int)$_POST['bannercat'];
$brand = (int)$_POST['bannerbrand'];
Replace with:
Code: Select all
$category = $_POST['bannercat'];
$brand = $_POST['bannerbrand'];
Find:
Replace with (comment) or delete:
Code: Select all
// "catorbrandid" => $catorbrandid,
Find:
Code: Select all
// Creating a new banner
if ($ExistingBannerId == 0) {
return $GLOBALS['ISC_CLASS_DB']->InsertQuery("banners", $banner);
}
Replace with (comment) or delete:
Code: Select all
// if ($ExistingBannerId == 0) {
// return $GLOBALS['ISC_CLASS_DB']->InsertQuery("banners", $banner);
// }
Find:
Code: Select all
// Updating an existing banner
else {
if ($GLOBALS['ISC_CLASS_DB']->UpdateQuery("banners", $banner, "bannerid='".$GLOBALS['ISC_CLASS_DB']->Quote((int)$ExistingBannerId)."'")) {
return $ExistingBannerId;
}
else {
return false;
}
}
Replace with:
Code: Select all
// Updating an existing banner
$deleteQuery = "WHERE name='".$name."'";
$GLOBALS['ISC_CLASS_DB']->DeleteQuery('banners', $deleteQuery);
for($i=0; $i<count($catorbrandid); $i++)
{
$banner['catorbrandid'] = (int)$catorbrandid[$i];
if(!$GLOBALS['ISC_CLASS_DB']->InsertQuery("banners", $banner))
{
return false;
}
}
return true;
Now you can make banners for multiple categories/brands, this is temporary solution, i hope there will be new solution soon with lots of new stuff for banner administration...
Re: Same banner - Multiple Categories
Posted: Sat Jan 23, 2010 11:16 pm
by Iamdbat
I think right or left hand banners would be a good idea as opposed to trying to create new panels and layouts for different parent categories - It would make a lot more sense I think just to be able to place a new banner into a single right hand or left hand panel than have a server request for new layouts all the time - just my 2 cents but I think Interspire engineers should look into the prospect
Re: Same banner - Multiple Categories
Posted: Wed Feb 24, 2010 4:16 pm
by grantg
I assume this works by pressing Ctrl and clicking on the categories in the list? Unfortunately I have selected a few categories and the banner is no longer shown on any of the categories at all, using ISC 5.5.2. Could this be updated? I don't know why it doesn't work...the banner code hasn't changed between 506 and 552
Edit: New banners are not being saved (nothing in the database) - if I edit an existing banner and then save it, it deletes itself.
Re: Same banner - Multiple Categories
Posted: Wed Feb 24, 2010 4:33 pm
by Painstik
When you check them, they are showing on your pages, but they are not comited to databese so they are not selected in admin. This was a quick fix for the problem.
I am sorry, but i am not using new version of isc.
Re: Same banner - Multiple Categories
Posted: Wed Feb 24, 2010 5:32 pm
by grantg
After I applied your modifications, I edited a working banner and changed the categories, so the banner would show on 4 different categories, when I clicked save, it actually deleted the existing banner. New banners do not work if they are to be shown on one or more Brand or Categories.
If you are not intending to upgrade....could you do this on our test site for $?
Thanks