New button on Product Page

  • Posts: 107
  • Thank you received: 3
11 years 5 months ago #105458

Hi. How can I add a new button on the Product page to link to an externat url or to an article of my Joomla site? (the same for all products)

Thanks.

Last edit: 11 years 5 months ago by lanzanet.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #105469

Hi,

You can edit the view "product / show_default" and add the desired button in the page template.
This view is accessible from the menu Display > Views.

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

  • Posts: 107
  • Thank you received: 3
11 years 5 months ago #105479

Hi, thanks for the reply. I'm not very familiar with some php code, but I tried to add the new button with a similar code than the 'contact us' button. The button appears ok but I don't know how to set the parameters to the 'displayButton' function. Please, Can you tell me a little sample of a call from this function to an external link (' www.google.es ')? Could it be oppened in a new window?

<div id="hikashop_product_contact_main" class="hikashop_product_contact_main">
<?php
  echo $this->cart->displayButton('New Button Text', 'contact_us', $params, '', '');
?>
</div>
Could the button link to an article so the article info would appears in the article section (center page section)?

Thanks.

Last edit: 11 years 5 months ago by Jerome.

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 5 months ago #105539

Hi,

The "displayButton" is an internal function which allow us to display specific button (like the "add to cart").
It is better for you to create a generic button in HTML directly and set your own link and your own parameters (like some javascript to open a link in a new window).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum