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

#   Disable textfield quantity in card

##

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

Less More

- Posts: 137
- Thank you received: 2
-
-

15 years 7 months ago [\#13946](#13946) by [emergentec](/forum/user/949-emergentec "View emergentec's Profile")  *[Disable textfield quantity in card](/forum/4-how-to/13946-disable-textfield-quantity-in-card#13946 "Hi!  We would like to disable the textfield quantity in the cart, so the user can't change the quantiy of a product in the cart.  But if we disable the textfield in the view, it's not possible to remove the produkt from the cart. Why?  Best regards")* was created by *[emergentec](/forum/user/949-emergentec "View emergentec's Profile")*

Hi!

We would like to disable the textfield quantity in the cart, so the user can't change the quantiy of a product in the cart.

But if we disable the textfield in the view, it's not possible to remove the produkt from the cart. Why?

Best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzOTQ2LWRpc2FibGUtdGV4dGZpZWxkLXF1YW50aXR5LWluLWNhcmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 7 months ago [\#13956](#13956) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disable textfield quantity in card](/forum/4-how-to/13946-disable-textfield-quantity-in-card#13956 "Hi!  We would like to disable the textfield quantity in the cart, so the user can't change the quantiy of a product in the cart.  But if we disable the textfield in the view, it's not possible to remove the produkt from the cart. Why?  Best regards")*

Are you sure that you didn't remove the delete icon as well when deleting the quantity field ?
Both are next each other so maybe you removed both ?

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

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

Less More

- Posts: 137
- Thank you received: 2
-
-

15 years 7 months ago [\#13977](#13977) by [emergentec](/forum/user/949-emergentec "View emergentec's Profile")  Replied by *[emergentec](/forum/user/949-emergentec "View emergentec's Profile")* on topic *[Re: Disable textfield quantity in card](/forum/4-how-to/13946-disable-textfield-quantity-in-card#13977 "Hi!  We would like to disable the textfield quantity in the cart, so the user can't change the quantiy of a product in the cart.  But if we disable the textfield in the view, it's not possible to remove the produkt from the cart. Why?  Best regards")*

I didn't delete the quantity field, I just disabled it. The delete icon is still there, but the item is not removed of the cart.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEzOTQ2LWRpc2FibGUtdGV4dGZpZWxkLXF1YW50aXR5LWluLWNhcmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 7 months ago [\#13994](#13994) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disable textfield quantity in card](/forum/4-how-to/13946-disable-textfield-quantity-in-card#13994 "Hi!  We would like to disable the textfield quantity in the cart, so the user can't change the quantiy of a product in the cart.  But if we disable the textfield in the view, it's not possible to remove the produkt from the cart. Why?  Best regards")*

Indeed, if you hide the quantity field, the delete icon doesn't work.
Could you go in the menu Display-&gt;Views and edit the file cart of the view product and change the line:
&lt;a href="&lt;?php echo hikashop::completeLink('product&amp;task=updatecart&amp;cart_product_id='.$row-&gt;cart_product_id.'&amp;quantity=0&amp;return_url='.urlencode(base64_encode(urldecode($this-&gt;params-&gt;get('url'))))); ?&gt;" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_&lt;?php echo $row-&gt;cart_product_id;?&gt;'); qty_field.value=0; document.hikashop_cart_form.submit(); return false;" &gt;&lt;img src="&lt;?php echo HIKASHOP_IMAGES . 'delete2.png';?&gt;" border="0" alt="remove product" /&gt;&lt;/a&gt;

to:
&lt;a href="&lt;?php echo hikashop::completeLink('product&amp;task=updatecart&amp;cart_product_id='.$row-&gt;cart_product_id.'&amp;quantity=0&amp;return_url='.urlencode(base64_encode(urldecode($this-&gt;params-&gt;get('url'))))); ?&gt;" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_&lt;?php echo $row-&gt;cart_product_id;?&gt;'); if(qty_field){qty_field.value=0; document.hikashop_cart_form.submit(); return false;}else{ return true;}" &gt;&lt;img src="&lt;?php echo HIKASHOP_IMAGES . 'delete2.png';?&gt;" border="0" alt="remove product" /&gt;&lt;/a&gt;

That should solve the problem

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

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