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

#   Pressing enter in product page automatically changes quantity to -1

##

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

9 years 1 month ago [\#279564](#279564) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Pressing enter in product page automatically changes quantity to -1](/forum/31-development/892187-pressing-enter-in-product-page-automatically-changes-quantity-to-1#279564 "Hi! We are developing a plugin with a handy barcode scanner. We remarked that when we use the barcode the quantity fileds goes to &quot;unlimited&quot;. At first I thought it was the hardwares problem. But when I m in any field and I press enter I get unlimited also. Is this a bug?")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

Hi!
We are developing a plugin with a handy barcode scanner. We remarked that when we use the barcode the quantity fileds goes to "unlimited".
At first I thought it was the hardwares problem. But when I m in any field and I press enter I get unlimited also.
Is this a bug?

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 1 month ago [\#279585](#279585) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Pressing enter in product page automatically changes quantity to -1](/forum/31-development/892187-pressing-enter-in-product-page-automatically-changes-quantity-to-1#279585 "Hi! We are developing a plugin with a handy barcode scanner. We remarked that when we use the barcode the quantity fileds goes to &quot;unlimited&quot;. At first I thought it was the hardwares problem. But when I m in any field and I press enter I get unlimited also. Is this a bug?")*

Hello,

Your issue is probably coming from the fact that pressing "enter" on a form, will always use the first HTML form button (the "unlimited" button in your case), so the solution will probably be to directly add a hidden button which won't do anything just before the "unlimited" one.

To do that you'll just have to edit the code of the "form" file of the "product" view of your back-end template via "Hikashop-&gt;Display-&gt;Views".

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

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