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

#   additional custom template for product card (?link

##

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

Less More

- Posts: 19
- Thank you received: 1
-
-

14 years 2 months ago [\#61053](#61053) by [Apple](/forum/user/8398-apple "View Apple's Profile")  *[additional custom template for product card (?link](/forum/4-how-to/61053-additional-custom-template-for-product-card-link#61053 "Hello,  I have a custom template for a product view (/templates/MY&#95;Template/html/com&#95;hikashop/product/show&#95;default.php), and I would like to have a link from it to the same product card, but shown in other order (one more different template).  Is there a way to pass that extra template name through the link query string? Something like: yoursite.com/category/product/1-product-name?view=show&#95;custom&#95;2.php ?")* was created by *[Apple](/forum/user/8398-apple "View Apple's Profile")*

Hello,

I have a custom template for a product view (/templates/MY_Template/html/com_hikashop/product/show_default.php),
and I would like to have a link from it to the same product card, but shown in other order (one more different template).

Is there a way to pass that extra template name through the link query string?
Something like: yoursite.com/category/product/1-product-name?view=show_custom_2.php
?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzYxMDUzLWFkZGl0aW9uYWwtY3VzdG9tLXRlbXBsYXRlLWZvci1wcm9kdWN0LWNhcmQtbGluaz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14274
-
-

14 years 2 months ago [\#61103](#61103) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: additional custom template for product card (?link](/forum/4-how-to/61053-additional-custom-template-for-product-card-link#61103 "Hello,  I have a custom template for a product view (/templates/MY&#95;Template/html/com&#95;hikashop/product/show&#95;default.php), and I would like to have a link from it to the same product card, but shown in other order (one more different template).  Is there a way to pass that extra template name through the link query string? Something like: yoursite.com/category/product/1-product-name?view=show&#95;custom&#95;2.php ?")*

Hi,

Well, you will have to edit all the files where there is a link to the product page and add that parameter to the link.
For example, in the listing_img_title item box layout (the default one) of products listings the link is generated at the beginning of the file. Just add your parameter there in the link.
I don't recommend to have the extension in the link as it might not work with the SEF. I also don't recommend that you use view but something else like "myview" because view is already used by joomla and could cause a conflict.
You should rather have ?myview=show_custom_2

Then, on your show_default override, you can use $myview = $_GET in order to retrieve the value of your parameter.

The following user(s) said Thank You: [Apple](/forum/user/8398-apple "View Apple's Profile")

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

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

Less More

- Posts: 19
- Thank you received: 1
-
-

14 years 2 months ago [\#61110](#61110) by [Apple](/forum/user/8398-apple "View Apple's Profile")  Replied by *[Apple](/forum/user/8398-apple "View Apple's Profile")* on topic *[Re: additional custom template for product card (?link](/forum/4-how-to/61053-additional-custom-template-for-product-card-link#61110 "Hello,  I have a custom template for a product view (/templates/MY&#95;Template/html/com&#95;hikashop/product/show&#95;default.php), and I would like to have a link from it to the same product card, but shown in other order (one more different template).  Is there a way to pass that extra template name through the link query string? Something like: yoursite.com/category/product/1-product-name?view=show&#95;custom&#95;2.php ?")*

Thanks a lot, **nicolas**

I see. Meanwhile I thought of another solution, not that valid though. Just edit show_default.php, copying the entire code under the if ($_GET == 'mykey') statement, and changing the layout as needed.

BTW, let me tell you that your component is great! Powerfull and highly flexible.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzYxMDUzLWFkZGl0aW9uYWwtY3VzdG9tLXRlbXBsYXRlLWZvci1wcm9kdWN0LWNhcmQtbGluaz90bXBsPW1hcmtkb3du) 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.104 seconds

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

[](#top)
