Jump to content



Latest News: (loading..)

- - - - -

Linking banner to _self (same window)


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1   arkness

arkness
  • Members
  • 48 posts

Posted 14 January 2007 - 11:53 PM

Searched for long and hard, but ended up trying my basic html knowledge.

open includes/functions/banner.php in your favourite editor

Find line

Quote

$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

change to:

Quote

$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_self">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

Tried and tested. Works well thus far.

Dont forget to backup before making changes to your code!

#2   bimbachetuning

bimbachetuning
  • Members
  • 9 posts

Posted 16 January 2007 - 05:32 PM

Good and simple mod... but have a problem.

I lost the session id if i click in any banner.

If any person know how to solvent this problem i be happy... lol

Thnks a lot!






P.D.: Sorry my bad english, im spanish  :blush:

#3   b101aa2

b101aa2
  • Members
  • 68 posts

Posted 16 January 2007 - 06:39 PM

View Postbimbachetuning, on Jan 16 2007, 11:32 AM, said:

Good and simple mod... but have a problem.

I lost the session id if i click in any banner.

If any person know how to solvent this problem i be happy... lol

Thnks a lot!
P.D.: Sorry my bad english, im spanish  :blush:


No need to make any other changes unless you have some customizing that is being done. Just remove target="_blank from around line 87 of banner.php in the url line. _blank means new window, _self means same frame, _top means whole page. It's same code as with standard html links, just sliced for usage in php.

#4   bimbachetuning

bimbachetuning
  • Members
  • 9 posts

Posted 16 January 2007 - 08:54 PM

View Postb101aa2, on Jan 16 2007, 07:39 PM, said:

No need to make any other changes unless you have some customizing that is being done. Just remove target="_blank from around line 87 of banner.php in the url line. _blank means new window, _self means same frame, _top means whole page. It's same code as with standard html links, just sliced for usage in php.

Test in your shop:

If you have any product in a basquet, and you click in any banner... your basquet change to busy.

My comment: its necessary some modification plus to no lost the basquet in the same session.

Something know the mod necessary to no lost the session?

Thnks a lot!!!

Edited by bimbachetuning, 16 January 2007 - 08:56 PM.


#5   bimbachetuning

bimbachetuning
  • Members
  • 9 posts

Posted 17 January 2007 - 05:58 PM

Any suggestion to resolve this problem?

Thnks a lot!!!

#6   euphon

euphon
  • Members
  • 1 posts

Posted 15 June 2010 - 02:04 PM

Chane the line no 86
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" >' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
TO

$banner_string = '<a href="' . tep_href_link(FILENAME_DEFAULT) . '" >' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
This will work for header banners and will redirect to index page

#7   sourpickles

sourpickles
  • Members
  • 41 posts

Posted 26 August 2010 - 02:41 PM

View Posteuphon, on 15 June 2010 - 02:04 PM, said:

Chane the line no 86
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" >' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
TO

$banner_string = '<a href="' . tep_href_link(FILENAME_DEFAULT) . '" >' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
This will work for header banners and will redirect to index page

How would I change this is my line looks like this....

$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . mm_output_flash_movie( $banner['banners_title'], DIR_WS_IMAGES . $banner['banners_image'] , $size[0]  , $size[1]) . '</a>';

-------------

I added the flash banner mod so don't know how to mod it with out breaking it

Edited by sourpickles, 26 August 2010 - 02:42 PM.