Allow remove item from cart but not edit quantity?

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
3 years 11 months ago #327578

Hi,

A while back, I changed a setting that removed the option to edit the quantity on the cart / checkout process.

However, while i don't want users to edit the quantity. How can I do that?

Also, I assume that if the item had a quantity of 1, and it was removed from the cart, it would go back to the store with a quantity of 1?

Thanks!

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
3 years 11 months ago #327589

Hello,

I see 2 solutions for you :
1. Easy and quick => Use some Css to don't display quantity and relative elements with this kind of css command :

.checkout_html_class .quantity_input_class,
    .checkout_html_class .quantity_input_plus_class, 
    .checkout_html_class .quantity_input_minus_class {
        display: none;
}
Note : Have a look on this tutorial to see how to add custom css to your frontend css files

2. You directly edit your checkout cart view, this will required php/html knowledge, and will be more long to implement, but this for sure prevent the input quantity to be used because this will truly able you completely remove html element that display quantity input elements.
For this have a look on this documentation to create an override view.
Note : To find the required view to custom, you can use the display view file, from Main HikaShop Configuration, in Advanced tab


Hope this will help you to achieved what you need.
Regards

Last edit: 3 years 11 months ago by Philip.

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

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
3 years 11 months ago #327631

Hi,

Added the CSS, but it's still showing up. I had a look in the checkout / show_block_cart.php html, but I am not sure what I should be changing there. Can you give me some more information?

Thanks.

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
3 years 11 months ago #327645

Hello

Advice for create a good priority css command :
1. Check that your selector is well written, good class html and no mistake or typo
2. If your command is visible in your inspector tool, but is overrided (css command crossed out), then his priority isn't strong enough.

=> Some css priority system explanation :
From less to the highest priority :
.html_class_element {command: value}
.html_class_module .html_class_element {command: value}
.html_class_page .html_class_module .html_class_element {command: value}
.html_class_page .html_class_module .html_class_element {command: value !important;}


Note, that if 2 css command have strictly the same selector, then the last written in the css file will be the one used.

For override view, you can use with your display view file, the navigator inspector tool, for this you can point your quantity input, then right-click => Inspect (inspector tool etc...).
you will see a new window that will show you html elements and more especially this will help you to find this elements in your view file.
Then you can use comments in order to "shut down" this required part.

Hope this will help you to achieved what you need.
Regards

Last edit: 3 years 11 months ago by Philip.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum