Jump to content

[SOLVED] Want Home Page Slider Images Not Connecting To Product URL


Recommended Posts

Can someone explain if I can have home page slider images that do not actually connect to a product URL - I would simply like to have a slide show of images without the click on slide and connect to product feature.

 

If this is possible could somone please explain to me how to do so.

 

Also - what size should slider images be for best display?

 

Thankyou

Edited by GlennD (see edit history)
Link to comment
Share on other sites

Hi,

 

you can edit homeslider.tpl with it:

 

<!-- Module HomeSlider -->
{if isset($homeslider)}
<script type="text/javascript">
{if isset($homeslider_slides) && $homeslider_slides|@count > 1}
{if $homeslider.loop == 1}
 var homeslider_loop = true;
{else}
 var homeslider_loop = false;
{/if}
{else}
var homeslider_loop = false;
{/if}
var homeslider_speed = {$homeslider.speed};
var homeslider_pause = {$homeslider.pause};
</script>
{/if}
{if isset($homeslider_slides)}
<ul id="homeslider">
{foreach from=$homeslider_slides item=slide}
{if $slide.active}
 <li><img src="{$smarty.const._MODULE_DIR_}/homeslider/images/{$slide.image}" alt="{$slide.legend}" title="{$slide.description}" height="{$homeslider.height}" width="{$homeslider.width}" /></li>
{/if}
{/foreach}
</ul>
{/if}
<!-- /Module HomeSlider -->

 

The best way is override this .tpl file is put the new file with custom html code into folder with your theme, for example themes/my_theme/modules/homeslider/homeslider.tpl

 

Regards

Edited by Alexander Simonchik (see edit history)
  • Like 1
Link to comment
Share on other sites

Thankyou for the reply however I wouldn't know where to start with what you have mentioned.

 

Is there not an easier way? Can I alter a file so as when the images in the slider are clicked they point at nothing ie: Point to no URL?

Link to comment
Share on other sites

I am using v1.5.3.1 with the default Prestashop theme as I have only just discovered this fantastic software package.

 

Lets start from create new file homeslider.tpl with above content. After that you must know your theme name. And put new file here: themes/my_theme/modules/homeslider/homeslider.tpl

 

Alex I was unable to locate homeslider.tpl in the path you mentioned - actually I could not see a folder named homeslider using that path. Here is the path I am talking about (I think you may have been giving the path for an older version than I am using - apologies for not being version specific):

 

prestashop/themes/default/modules -> there is no homeslider directory or homeslider.tpl file here

 

I did however manage to find a homeslider.tpl file at the following path:

 

prestashop/modules/homeslider/ -> there IS a homeslider.tpl here

 

In the location where I did manage to find the homeslider.tpl file I did the following:

 

1) Commented out the original code using <!-- -->

2) Replaced the <li></li> line of code as suggested after copying and pasting the original straight underneath the commented code

3) Saved edited file

4) Ensured force compile

5) Refresh page

 

Obviously that didn't work and I witnessed the original slider images which when clicked would direct to a 404 error and also one of each of the slider images appearing vertically underneath the slider itself.

 

The solution as you would know was to use the correct comment tags for dealing with smarty parsed PHP: {* *}

 

After commenting the original code out correctly using {* *} and replacing the html list item line of code in the copied version it worked perfectly!

 

Thankyou very much for your assistance.

Edited by GlennD (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...