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

#   Page de commande avec quantité non modifiable + bouton suppression

##

- **[Springmedias](/forum/user/55853-springmedias "View Springmedias's Profile")**
- [![Springmedias's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/55853-springmedias "View Springmedias's Profile") Topic Author
- [ Offline](/forum/user/55853-springmedias)

Less More

- Posts: 13
- Thank you received: 0
-
-

8 years 5 months ago [\#294131](#294131) by [Springmedias](/forum/user/55853-springmedias "View Springmedias's Profile")  *[Page de commande avec quantité non modifiable + bouton suppression](/forum/25-install-update/895014-page-de-commande-avec-quantite-non-modifiable-bouton-suppression#294131 "Bonjour,  Dans la page de synthèse des commandes pouvez vous me dire s'il est possible de conserver l'information de quantité mais la rendre non modifiable et garder le bouton suppression ?  Merci")* was created by *[Springmedias](/forum/user/55853-springmedias "View Springmedias's Profile")*

Bonjour,

Dans la page de synthèse des commandes pouvez vous me dire s'il est possible de conserver l'information de quantité mais la rendre non modifiable et garder le bouton suppression ?

Merci  [ ![Capturedecran2018-06-15a21.43.09.png](/forum/attachment/43937) ](/forum/attachment/43937 "...5a21.43.09.png")

[ ![Capturedecran2018-06-15a21.43.09.png](/forum/attachment/43937) ](/forum/attachment/43937 "...5a21.43.09.png")

- [ ![Capturedecran2018-06-15a21.43.09.png](/forum/attachment/43937) ](/forum/attachment/43937 "...5a21.43.09.png") [ ](/forum/attachment/43937?download=1 "...5a21.43.09.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5NTAxNC1wYWdlLWRlLWNvbW1hbmRlLWF2ZWMtcXVhbnRpdGUtbm9uLW1vZGlmaWFibGUtYm91dG9uLXN1cHByZXNzaW9uP3RtcGw9bWFya2Rvd24=) 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")
- [ Online](/forum/user/63-nicolas)

Less More

- Posts: 86560
- Thank you received: 14307
-
-

8 years 4 months ago [\#294158](#294158) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Page de commande avec quantité non modifiable + bouton suppression](/forum/25-install-update/895014-page-de-commande-avec-quantite-non-modifiable-bouton-suppression#294158 "Bonjour,  Dans la page de synthèse des commandes pouvez vous me dire s'il est possible de conserver l'information de quantité mais la rendre non modifiable et garder le bouton suppression ?  Merci")*

Bonjour,

Il y a l'option "read only" dans la vue "cart" du "checkout workflow" dans la configuration HikaShop, pour rendre la quantité non modifiable, mais cela enlève le champs de quantité ET le bouton de suppression.
Pour n'avoir que l'un des deux, il va falloir modifier le code de la vue "show_block_cart" via le menu Affichage&gt;Vues: Code:

if(empty($this-&gt;options['status'])) { if($product-&gt;product_parent_id != 0 &amp;&amp; isset($product-&gt;main_product_quantity_layout)) $product-&gt;product_quantity_layout = $product-&gt;main_product_quantity_layout; if($product-&gt;product_quantity_layout == 'show_select' &#124;&#124; (empty($product-&gt;product_quantity_layout) &amp;&amp; $this-&gt;config-&gt;get('product_quantity_display', '') == 'show_select')) { $min_quantity = ($product-&gt;product_min_per_order &#124;&#124; empty($product-&gt;parent_product)) ? $product-&gt;product_min_per_order : $product-&gt;parent_product-&gt;product_min_per_order; $max_quantity = ($product-&gt;product_max_per_order &#124;&#124; empty($product-&gt;parent_product)) ? $product-&gt;product_max_per_order : $product-&gt;parent_product-&gt;product_max_per_order; $min_quantity = max((int)$min_quantity, 1); $max_quantity = max((int)$max_quantity, 0); if($max_quantity == 0) $max_quantity = (int)$min_quantity * 15; $values = array( 0 =&gt; JHTML::_('select.option', 0, 0) ); for($j = $min_quantity; $j &lt;= $max_quantity; $j += $min_quantity) { $values[$j] = JHTML::_('select.option', $j, $j); } $onchange = 'onchange="window.hikashop.checkQuantity(this); var qty_field = document.getElementById(\'hikashop_checkout_quantity_'.$product-&gt;cart_product_id.'\'); if (qty_field &amp;&amp; qty_field.value != \''.$product-&gt;cart_product_quantity.'\'){'.$input.'return window.checkout.submitCart('.$this-&gt;step.','.$this-&gt;module_position.'); } return false;"'; $ret = JHTML::_('select.genericlist', $values, 'checkout[cart][item]['.$product-&gt;cart_product_id.']', 'id="hikashop_checkout_quantity_'.$product-&gt;cart_product_id.'" data-hk-qty-old="'. $product-&gt;cart_product_quantity.'" '.$onchange, 'value', 'text', $product-&gt;cart_product_quantity); echo str_replace('id="checkoutcartitem'.$product-&gt;cart_product_id.'"', '', $ret); } else { ?&gt; &lt;input id="hikashop_checkout_quantity_&lt;?php echo $product-&gt;cart_product_id;?&gt;" type="text" name="checkout[cart][item][&lt;?php echo $product-&gt;cart_product_id;?&gt;]" class="hikashop_product_quantity_field" data-hk-qty-old="&lt;?php echo $product-&gt;cart_product_quantity; ?&gt;" value="&lt;?php echo $product-&gt;cart_product_quantity; ?&gt;" onchange="window.hikashop.checkQuantity(this);"/&gt; &lt;div class="hikashop_cart_product_quantity_refresh"&gt; &lt;a class="hikashop_no_print" href="#" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_&lt;?php echo $product-&gt;cart_product_id;?&gt;'); if (qty_field &amp;&amp; qty_field.value != '&lt;?php echo $product-&gt;cart_product_quantity; ?&gt;'){&lt;?php echo $input; ?&gt; return window.checkout.submitCart(&lt;?php echo $this-&gt;step; ?&gt;,&lt;?php echo $this-&gt;module_position; ?&gt;); } return false;" title="&lt;?php echo JText::_('HIKA_REFRESH'); ?&gt;"&gt; &lt;img src="&lt;?php echo HIKASHOP_IMAGES . 'refresh.png';?&gt;" border="0" alt="&lt;?php echo JText::_('HIKA_REFRESH'); ?&gt;" /&gt; &lt;/a&gt; &lt;/div&gt; &lt;?php } if(!empty($this-&gt;options['show_delete'])) { $url = hikashop_currentURL(); ?&gt; &lt;div class="hikashop_cart_product_quantity_delete"&gt; &lt;a class="hikashop_no_print" href="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart&amp;product_id='.$product-&gt;product_id.'&amp;quantity=0&amp;return_url='.urlencode(base64_encode(urldecode($url)))); ?&gt;" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_&lt;?php echo $product-&gt;cart_product_id;?&gt;'); if(qty_field){qty_field.value=0; return window.checkout.submitCart(&lt;?php echo $this-&gt;step; ?&gt;,&lt;?php echo $this-&gt;module_position; ?&gt;); } return false;" title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;"&gt; &lt;img src="&lt;?php echo HIKASHOP_IMAGES . 'delete2.png';?&gt;" border="0" alt="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" /&gt; &lt;/a&gt; &lt;/div&gt; &lt;?php } }else{ echo $product-&gt;cart_product_quantity; }

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

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