[Skip to main content](#vessel-content)

#   Link function for product item

##

- **[solrac](/forum/user/39087-solrac "View solrac's Profile")**
- [![solrac's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39087-solrac "View solrac's Profile") Topic Author
- [ Offline](/forum/user/39087-solrac)

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 2 weeks ago [\#216623](#216623) by [solrac](/forum/user/39087-solrac "View solrac's Profile")  *[Link function for product item](/forum/25-install-update/879726-link-function-for-product-item#216623 "-- HikaShop version -- : 2.6.0  Hello, I am a developer and I am creating a module to use a gallery images of products. The images are ok for the module but I can't find the function to associate the correct link I see several $this-&gt;getlink( on files but I can't find where is this function and I can't call it as it is inside the module. Can anyone help me out how to create the correct link for products? What files I need to include, the query I need and the function to use. Thanks and regards")* was created by *[solrac](/forum/user/39087-solrac "View solrac's Profile")*

-- HikaShop version -- : 2.6.0

Hello,
I am a developer and I am creating a module to use a gallery images of products.
The images are ok for the module but I can't find the function to associate the correct link
I see several $this-&gt;getlink( on files but I can't find where is this function and I can't call it as it is inside the module.
Can anyone help me out how to create the correct link for products?
What files I need to include, the query I need and the function to use.
Thanks and regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg3OTcyNi1saW5rLWZ1bmN0aW9uLWZvci1wcm9kdWN0LWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14267
-
-

11 years 2 weeks ago [\#216637](#216637) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Link function for product item](/forum/25-install-update/879726-link-function-for-product-item#216637 "-- HikaShop version -- : 2.6.0  Hello, I am a developer and I am creating a module to use a gallery images of products. The images are ok for the module but I can't find the function to associate the correct link I see several $this-&gt;getlink( on files but I can't find where is this function and I can't call it as it is inside the module. Can anyone help me out how to create the correct link for products? What files I need to include, the query I need and the function to use. Thanks and regards")*

Hi,

So, suppose that your product data is an object in the variable $product.
You can use such code: Code:

include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).'/components/com_hikashop/helpers/helper.php'); //load the main helper of HikaShop $Itemid = XXX; //where XXX is the id of a product/category listing menu item $productClass = hikashop_get('class.product'); $productClass-&gt;addAlias($product); echo hikashop_contentLink('product&amp;task=show&amp;cid='.$product-&gt;product_id.'&amp;name='.$product-&gt;alias.$Itemid, $product);

The following user(s) said Thank You: [solrac](/forum/user/39087-solrac "View solrac's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg3OTcyNi1saW5rLWZ1bmN0aW9uLWZvci1wcm9kdWN0LWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.159 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
