Buy now + Add to cart: two buttons

  • Posts: 1
  • Thank you received: 0
2 years 2 months ago #344191

-- Error-message(debug-mod must be tuned on) -- : Hello,

Is it possible to add an "Buy now" button, next to the "Add to cart" button. This would mean having two buttons, one that allows to keep shoping after adding the product to the cart, and the "Buy now" that would allow to add the product + go directly to the cart for check out, without keep navigating.

Thank you so much

Hello,

Is it possible to add a "Buy now" button, next to the "Add to cart" button. This would mean having two buttons, one that allows to keep shoping after adding the product to the cart, and the "Buy now" that would allow to add the product + go directly to the cart for check out, without keep navigating.

Thank you so much,

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344194

Hi,

There is no option for that.

The behavior of the shop after an add to cart is controlled by the settings of the HikaShop cart notification plugin.
So even if you were able to add a second button, it would behave the same way when you click on it.

What I can suggest is to change the mode to "popup" in the settings of that plugin via the Joomla plugins manager.
That way, when you add a product to the cart, you'll get a popup with two buttons, one to continue, one to go to the checkout.

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

  • Posts: 18
  • Thank you received: 1
2 years 2 months ago #344999

Hello Nicolas,
I had found a solution for VirtueMart as link:
<a href="cart/add.html?quantity[]=1&virtuemart_product_id[]=23"><img src="images/download.png" /></a>
This link add the product to cart and open the checkout page.

Is it possible to do a similar in HikaShop ?

Last edit: 2 years 2 months ago by imcom.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #345000

Hi,

Well, it depends.
If it's just to add a product to the cart, then you can do a small override to add the HTML add to cart button (the link HTML is available with a button when you edit a product in the backend).
However, this doesn't support characteristics, options, custom item fields (and that's the same for the VM link)... So it might do the job for some merchants, but it's not a solution for everyone.

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

  • Posts: 18
  • Thank you received: 1
2 years 2 months ago #345013

Hi Nicolas, thanks for the reply.
Yes, of course, I agree with you that it is not good solution for everyone.
But having simple products like Downloads, sometimes we need to make the user experience as easy as possible. Imagine the product page (which already has a "Buy" button at the top, then a broad description below, and here it is convenient to insert a nice image / call to action button. A sort of landing page.
I believe there will be many people to thank you for providing us with a similar solution.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #345015

Hi,

As I said, you can already do it with the HTML add to cart button with a view override.
The code is:

<a class="hikabtn" href="index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&cid=xxx&Itemid=yyy">Add to cart</a>
where xxx is the id of the product and yyy the id of a HikaShop menu item to use for the process.
If it's a static button, you can put that HTML code anywhere.
If you want something dynamic, on the product, you can edit one of the view overrides of the product page (for example show_default) and add that code and replace xxx by:
<?php echo $this->element->product_id; ?>
Again, this will ignore variants, options, custom item fields and the notification mechanism. It will add the product to the cart and redirect to the checkout.

The following user(s) said Thank You: joomleb, imcom

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

  • Posts: 18
  • Thank you received: 1
2 years 2 months ago #345049

WOW!
Great!
You are a genius!
Thank you!

The following user(s) said Thank You: Philip

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

Time to create page: 0.051 seconds
Powered by Kunena Forum