Add a "View Product" button to category page

  • Posts: 136
  • Thank you received: 1
11 years 6 months ago #101418

Hi there,

I am just wanting to create a simple button on the product category form so that users are prompted to click on the product for a detailed view. At the moment I have the "Add to Cart" button displayed, but would like to have something like "More info" there instead that would take you to the product page.

Can I do something like that?

How would I go about it.

Here is a link to the site togetherwecook.com.au/index.php/cake-kits

Many thanks,
Jacqueline

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #101436

Hi Jacqueline,

I think that the solution would be to directly edit the "listing_div" file of the "product" view of your front-end template, through "Hikashop->Display->Views" and add this kind of code :

global $Itemid;
$custom_itemid = $this->params->get('itmeid');
            $url_itemid = '';
      if(!empty($custom_itemid)){
        $url_itemid = '&Itemid='.(int)$custom_itemid;
      }
      elseif(!empty($Itemid)){
        $url_itemid = '&Itemid='.(int)$Itemid;
      }
            $link = hikashop_completeLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid);?> <a href="<?php echo $link;?>" title="<?php echo $this->escape($row->product_name); ?>"> MORE INFORMATION </a> <?php
after these lines :
$this->row =& $row;
        $this->setLayout('listing_'.$this->params->get('div_item_layout_type'));
        echo $this->loadTemplate();

Hope this will help you a little.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum