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

#   custom add to cart button on product page

##

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

Less More

- Posts: 222
- Thank you received: 1
-
-

10 years 10 months ago [\#227317](#227317) by [Vero](/forum/user/5108-vero "View Vero's Profile")  *[custom add to cart button on product page](/forum/26-product-category-display/881707-custom-add-to-cart-button-on-product-page#227317 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi, I added custom &quot;add&#95;to&#95;wishlist&quot; button:  But can't add &quot;add-to-cart&quot; button. The code below is not working:  Where is a mistake?")* was created by *[Vero](/forum/user/5108-vero "View Vero's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8

Hi,
I added custom "add_to_wishlist" button: Code:

$this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_WISHLIST'), $btnType, $this-&gt;params, $url, $wishlistAjax, '', $max, $min, ' wish-button', false) .

But can't add "add-to-cart" button. The code below is not working: Code:

echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'), 'add', $this-&gt;params, $url, $this-&gt;ajax, ' adbutton', $max, $min);

Where is a mistake?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 10 months ago [\#227319](#227319) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[custom add to cart button on product page](/forum/26-product-category-display/881707-custom-add-to-cart-button-on-product-page#227319 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi, I added custom &quot;add&#95;to&#95;wishlist&quot; button:  But can't add &quot;add-to-cart&quot; button. The code below is not working:  Where is a mistake?")*

Hi,

I'm afraid that the "add" button does not use the $options parameters in most cases.
Only when the setting "show_quantity_field" is set to "2", the original HTML button will be used ; otherwise it will use specific layout for the add to cart.

I don't know what settings you're using but depending the setting you have, you can override the view "product / show_quantity"

Regards,

---

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

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

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