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

#   Add To Cart Extra Ajax Link on Product Detail Page

##

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

Less More

- Posts: 24
- Thank you received: 0
-
-

15 years 1 week ago [\#29293](#29293) by [axyswebs](/forum/user/1550-axyswebs "View axyswebs's Profile")  *[Add To Cart Extra Ajax Link on Product Detail Page](/forum/4-how-to/29293-add-to-cart-extra-ajax-link-on-product-detail-page#29293 "Hi  I am not a programmer but thought I would be able to do this task :(  I am trying to add a second ajax add to cart link in the show.php template but cannot find the right code to use.  I am currently using this code, in the attached file, in my product listings templates which works fine there but it doesn't work in the product details page.  Thanks!  &#91;file&#93;")* was created by *[axyswebs](/forum/user/1550-axyswebs "View axyswebs's Profile")*

Hi

I am not a programmer but thought I would be able to do this task ![:(](/media/kunena/emoticons/22.png ":(")

I am trying to add a second ajax add to cart link in the show.php template but cannot find the right code to use.

I am currently using this code, in the attached file, in my product listings templates which works fine there but it doesn't work in the product details page.

Thanks!

####  *This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI5MjkzLWFkZC10by1jYXJ0LWV4dHJhLWFqYXgtbGluay1vbi1wcm9kdWN0LWRldGFpbC1wYWdlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

15 years 1 week ago [\#29318](#29318) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Add To Cart Extra Ajax Link on Product Detail Page](/forum/4-how-to/29293-add-to-cart-extra-ajax-link-on-product-detail-page#29318 "Hi  I am not a programmer but thought I would be able to do this task :(  I am trying to add a second ajax add to cart link in the show.php template but cannot find the right code to use.  I am currently using this code, in the attached file, in my product listings templates which works fine there but it doesn't work in the product details page.  Thanks!  &#91;file&#93;")*

Hi,

On the product page, you should use that code:
&lt;?php
$this-&gt;row =&amp; $this-&gt;element;
$this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this-&gt;row-&gt;product_id.'\',field,1'.$form.'); } else { return false; }';
$this-&gt;setLayout('quantity');
echo $this-&gt;loadTemplate();
?&gt;

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

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

Less More

- Posts: 24
- Thank you received: 0
-
-

15 years 1 week ago [\#29328](#29328) by [axyswebs](/forum/user/1550-axyswebs "View axyswebs's Profile")  Replied by *[axyswebs](/forum/user/1550-axyswebs "View axyswebs's Profile")* on topic *[Re: Add To Cart Extra Ajax Link on Product Detail Page](/forum/4-how-to/29293-add-to-cart-extra-ajax-link-on-product-detail-page#29328 "Hi  I am not a programmer but thought I would be able to do this task :(  I am trying to add a second ajax add to cart link in the show.php template but cannot find the right code to use.  I am currently using this code, in the attached file, in my product listings templates which works fine there but it doesn't work in the product details page.  Thanks!  &#91;file&#93;")*

Excellent thank you!

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

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