- Posts: 50
- Thank you received: 0
Custom button to link to products page
10 years 2 weeks ago - 10 years 2 weeks ago #253271
by edward68
Custom button to link to products page was created by edward68
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.6.3
-- PHP version -- : 5.5.38
-- Browser(s) name and version -- : firefox nightly 52.0a1
Hello, When I open the shop page the Category image view is displayed. I have created a div that drops down over the top of the category image on hover. In the drop down div I have the logo, category name and a button that points to nowhere. I would like to be able to have the button link to the products page for that category but don't know which view to edit and how to go about it. I would really appreciate it if someone could please tell me how to best go about making this happen. I realise that I need to update Hikashop Business and will be doing so once this page is finished. Thanks.
-- Joomla version -- : 3.6.3
-- PHP version -- : 5.5.38
-- Browser(s) name and version -- : firefox nightly 52.0a1
Hello, When I open the shop page the Category image view is displayed. I have created a div that drops down over the top of the category image on hover. In the drop down div I have the logo, category name and a button that points to nowhere. I would like to be able to have the button link to the products page for that category but don't know which view to edit and how to go about it. I would really appreciate it if someone could please tell me how to best go about making this happen. I realise that I need to update Hikashop Business and will be doing so once this page is finished. Thanks.
Last edit: 10 years 2 weeks ago by edward68. Reason: problem solved. changed icon
Please Log in or Create an account to join the conversation.
10 years 2 weeks ago - 10 years 2 weeks ago #253274
by edward68
Replied by edward68 on topic Custom button to link to products page
Hi All, Sorry but I solved this one myself:
<?php $link = $this->getLink($this->row);?>
<span class="hikashop_category_name">
<a href="<?php echo $link;?>"><button>Read More
<?php
if($this->params->get('number_of_products',0)){
echo ' ('.$this->row->number_of_products.')';
}
?>
</button></a>
</span>
<?php $link = $this->getLink($this->row);?>
<span class="hikashop_category_name">
<a href="<?php echo $link;?>"><button>Read More
<?php
if($this->params->get('number_of_products',0)){
echo ' ('.$this->row->number_of_products.')';
}
?>
</button></a>
</span>
Last edit: 10 years 2 weeks ago by edward68.
Please Log in or Create an account to join the conversation.
Time to create page: 0.050 seconds