Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

category driven banners


Recommended Posts

Hi, just a little tip for anyone struggling with 'the cookbook's Category Driven Banners mod when trying to link internally.

 

When you click on a banner it opens up a new window which for me didn't really work as i was using the mod to link to products within my shop rather than other websites. I tried for a while to change the code within the contribution and also tried combing 2 contributions to get it to work but couldn't do it.

 

In the end i found a really simple answer to the problem. In include/functions/banner.php you just need to change the redirect from this

 

$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>';

 

to this

$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>';

 

unfortunately this means that all your banners will open in the current window but that works fine for me.

 

If anyone knows how to do this without effecting the other banners let me know.

Scott

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...