Page 1 of 1
Link image to Delivery Info page (Solved)
Posted: Fri Apr 18, 2014 11:16 pm
by cart builder
Hi all,
I've created a delivery icon in the footer and I would like some help please to do the following:
Make the image clickable so that it directs to the Delivery Information page.
('Delivery Information' link is already in the footer which I would like to keep).
Any help would be greatly appreciated!
Re: Link image to Delivery Info page
Posted: Sat Apr 19, 2014 3:31 am
by cart builder
Basically, I need to add something to the following so that when the delivery image(icon) is clicked, it would be directed (linked) to the 'Delivery information' page in the standard OC Template.
In footer.tpl:
<div class="column">
<img src="image/data/delivery.png" style="position:absolute; margin-left:20px; margin-top:10px ; width:70px ; height:70px ;" alt=""/>
</ul>
</div>
<div class="column">
<h3><?php echo $text_information; ?></h3>
<ul>
<?php foreach ($informations as $information) { ?>
<li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
<?php } ?>
</ul>
</div>
So at the moment I just have an icon/image (that cannot be clicked to be redirected).
Please can somebody help !
Re: Link image to Delivery Info page
Posted: Sat Apr 19, 2014 9:01 am
by IP_CAM
If I understand what you mean, have you tried something like this:
<div class="column">
<a href="<?php echo $information['href']; ?>"><img src="image/data/delivery.png" style="position:absolute; margin-left:20px; margin-top:10px ; width:70px ; height:70px ;" alt=""/></a>
</ul> ( What's this one doing here??? )
</div>
I wonder if >>$information['href']<< even produced a usable link, so, it would be better to adress the Page directly, not by using a variable.
Ernie
Re: Link image to Delivery Info page
Posted: Sat Apr 19, 2014 5:43 pm
by cart builder
Hi Ernie,
Many thanks for your help. Following your guidance, I have managed to create a clickable icon - it does however direct to the homepage - but at least I am now halfway there!
Re: Link image to Delivery Info page
Posted: Sat Apr 19, 2014 9:49 pm
by IP_CAM
<?php echo $information['href']; ?>
I figured that the above href-link is not correct, because it lacks the href-content. It would probably have to be something like:
.... whatever.com/shop/index.php?route=information/information&information_id=4
So, try:
<div class="column">
<a href="
http://www.whatever.com/shop/index.php? ... d=whatever">
where the last number seems to be a variable, therefore test Number 1,2,3,4,5,etc. to find the matching page.
I am not yet 'familiar' enough with this, because I never used it so far.
Ernie
Re: Link image to Delivery Info page
Posted: Sat Apr 19, 2014 11:29 pm
by cart builder
Hi Ernie,
Well done for finding the correct piece of script - the actual correct variable for the delivery page is "....information_id=6".
So thanks again for your kind help in getting this sorted !