- Posts: 1
- Thank you received: 0
Disable quantity for some products not all
13 years 7 months ago #92954
by kristianp
Disable quantity for some products not all was created by kristianp
Hi,
I have the Business Version of Hikashop.
I realise that through the standard configuration it is not possible to disable the quantity box for some products but not others. You can turn it off or on but it will refect all products on a global basis.
Elsewhere in the view I have modified options on the basis of the product id e.g. if($this->row->product_id != 13){ blah blah } etc.
Therefore I was wondering can I edit a view somewhere and do the same for getting rid of the quantity box? I could probably do it with a bit of jquery and take it out of the DOM but that is a faff.
Any ideas in which view I should try my idea and where. I have looked in show and show_default but no matter what I do I can't get rid of it for a select few products.
Website is www.meridiancollege.co.uk and if you look at the clever way I have done shipping you will see I am well up for a bit of hacking of code here and there. See also the options for products where I have defaulted them to "Yes" for accommodation products.
Love Hikashop by the way, very clever system.
I have the Business Version of Hikashop.
I realise that through the standard configuration it is not possible to disable the quantity box for some products but not others. You can turn it off or on but it will refect all products on a global basis.
Elsewhere in the view I have modified options on the basis of the product id e.g. if($this->row->product_id != 13){ blah blah } etc.
Therefore I was wondering can I edit a view somewhere and do the same for getting rid of the quantity box? I could probably do it with a bit of jquery and take it out of the DOM but that is a faff.
Any ideas in which view I should try my idea and where. I have looked in show and show_default but no matter what I do I can't get rid of it for a select few products.
Website is www.meridiancollege.co.uk and if you look at the clever way I have done shipping you will see I am well up for a bit of hacking of code here and there. See also the options for products where I have defaulted them to "Yes" for accommodation products.
Love Hikashop by the way, very clever system.
Please Log in or Create an account to join the conversation.
13 years 7 months ago #92962
by nicolas
Replied by nicolas on topic Disable quantity for some products not all
Hi,
Yes, you can use something similar in the "quantity" view file for that:
if($this->row->product_id != 13){ $this->params->set('show_quantity_field',0); }
Yes, you can use something similar in the "quantity" view file for that:
if($this->row->product_id != 13){ $this->params->set('show_quantity_field',0); }
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds