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

#   Issue with add to cart adding 2 products to the cart instead of one

##

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

Less More

- Posts: 157
- Thank you received: 8
-
-

2 years 2 weeks ago [\#363921](#363921) by [vanboke](/forum/user/4873-vanboke "View vanboke's Profile")  *[Issue with add to cart adding 2 products to the cart instead of one](/forum/27-checkout/908758-issue-with-add-to-cart-adding-2-products-to-the-cart-instead-of-one#363921 "-- url of the page with the problem -- :   www.mainee-learning.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.1.29  I have an issue with one website were you press the add to cart button and 2 products are added to the cart instead of 1, but this only happens on certain browsers.  Google Chrome, Microsoft Edge, and Opera have this issue. However, Safari, Firefox, Brave, and Vivaldi all don't have the problem at all. My client reported the problem to me, and she heard about it from a customer. She didn't test in all the browsers I did, and thought it was a global issue. It turns out it is not.  My client can replicate the problem, as can I. So this is not a one off fluke of an issue.  Has anyone ever seen an issue like this before?")* was created by *[vanboke](/forum/user/4873-vanboke "View vanboke's Profile")*

-- url of the page with the problem -- : [ www.mainee-learning.com/](https://www.mainee-learning.com/)
-- HikaShop version -- : 5.1.1
-- Joomla version -- : 5.2.0
-- PHP version -- : 8.1.29

I have an issue with one website were you press the add to cart button and 2 products are added to the cart instead of 1, but this only happens on certain browsers.

Google Chrome, Microsoft Edge, and Opera have this issue. However, Safari, Firefox, Brave, and Vivaldi all don't have the problem at all. My client reported the problem to me, and she heard about it from a customer. She didn't test in all the browsers I did, and thought it was a global issue. It turns out it is not.

My client can replicate the problem, as can I. So this is not a one off fluke of an issue.

Has anyone ever seen an issue like this before?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODc1OC1pc3N1ZS13aXRoLWFkZC10by1jYXJ0LWFkZGluZy0yLXByb2R1Y3RzLXRvLXRoZS1jYXJ0LWluc3RlYWQtb2Ytb25lP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86323
- Thank you received: 14283
-
-

2 years 2 weeks ago [\#363923](#363923) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with add to cart adding 2 products to the cart instead of one](/forum/27-checkout/908758-issue-with-add-to-cart-adding-2-products-to-the-cart-instead-of-one#363923 "-- url of the page with the problem -- :   www.mainee-learning.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.0 -- PHP version -- : 8.1.29  I have an issue with one website were you press the add to cart button and 2 products are added to the cart instead of 1, but this only happens on certain browsers.  Google Chrome, Microsoft Edge, and Opera have this issue. However, Safari, Firefox, Brave, and Vivaldi all don't have the problem at all. My client reported the problem to me, and she heard about it from a customer. She didn't test in all the browsers I did, and thought it was a global issue. It turns out it is not.  My client can replicate the problem, as can I. So this is not a one off fluke of an issue.  Has anyone ever seen an issue like this before?")*

Hi,

I tried with Chrome and I couldn't reproduce the issue on your website.
However, I was able to reproduce it with Edge.

I found two things:
- It only happens the first time you click on the add to cart button. Further clicks on it don't produce the issue, unless you refresh the page
- while looking at the network tab of the browser, the issue only happens when an extra "prefetch" is done:
[ i.imgur.com/2wjR5JX.png](https://i.imgur.com/2wjR5JX.png)
When it works fine, this prefetch doesn't happen.
However, I don't understand why the browser would run this prefetch.
From what I understand, a prefetch can happen when there is a prefetch attribute to the tag:
[ developer.mozilla.org/en-US/docs/Web/HTM...ributes/rel/prefetch](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/prefetch)
This is not the case here.

Since no one else reported the issue, it might be something specific to your website. First thing would be to temporarily switch to the default Joomla template and see if you still have the issue with it.
If yes, then it might be some javascript from the template messing with these.
Another thing you can try is to switch the "Action button" setting of the HikaShop configuration. Using a button HTML element instead of a normal link might help circumvent the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODc1OC1pc3N1ZS13aXRoLWFkZC10by1jYXJ0LWFkZGluZy0yLXByb2R1Y3RzLXRvLXRoZS1jYXJ0LWluc3RlYWQtb2Ytb25lP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.040 seconds

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