custom add to cart button on product page

  • Posts: 222
  • Thank you received: 1
9 years 7 months ago #227317

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

Hi,
I added custom "add_to_wishlist" button:

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

But can't add "add-to-cart" button. The code below is not working:
echo $this->cart->displayButton(JText::_('ADD_TO_CART'), 'add', $this->params, $url, $this->ajax, ' adbutton', $max, $min);

Where is a mistake?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 7 months ago #227319

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 & 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.054 seconds
Powered by Kunena Forum