- Posts: 29
- Thank you received: 0
Product: maximum quantity per order
I am trying to limit the quantity order of a product. I set this to 5.
I am still able to add to cart another 5 of a different characteristic, even though it's the same product? Doesn't this limit include characteristics?
Thanks
Please Log in or Create an account to join the conversation.
If you have characteristics for a product that limit parameter is indeed done for each possible variant of the product and not for all the variants as a whole.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 45
- Thank you received: 1
I am trying to set up our shop where every one of our products will have a min number of items to order with a price break depending on how many are ordered i.e.
Executive pen
50 - 150 - £1.90 - each minimum order of 50
151 - 250 - £1.70 - each minimum order of 151
251+ - £1.64 - each minimum order of 251
All of our products will be sold in this manner.
I have looked and I am not sure if I should be doing this using Characteristics & Variants or what?
Which tutorial or document should I be looking at please?
Still loving Hilkashop
Thanks Nicolas
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
If you want to do this :
You'll just have to do it through the "price" tab of your product configuration page by adding new price regarding the "Minimum quantity".50 - 150 - £1.90 - each minimum order of 50
151 - 250 - £1.70 - each minimum order of 151
251+ - £1.64 - each minimum order of 251
Please Log in or Create an account to join the conversation.
- Posts: 45
- Thank you received: 1
I will take a look.
Please Log in or Create an account to join the conversation.
- Posts: 45
- Thank you received: 1
I have attached 3 images to show you what is happening now.
I believe that i have done what you suggested and can be seen in image 1.png and image 2.png.
However looking at image 3.png the customer can still order 1 item and worst of all it shows the price as FREE. :ohmy:
Have I done something wrong or forgotten to do something?
Based on what I think I now need is there a way to force the customer to enter only the minimum number?
Or to make the shop only accept the minimum number or to give an error message to the customer if they do not order enough?
I am not too strong on writing my own code so hopefully I can do this by selecting an option which I have not yet selected, I hope.
Again thanks for your help
Please Log in or Create an account to join the conversation.
This request will require some custom code.
Actually the limit ca only limit the maximum of products in the cart, not the minimum.
The prices set as Mohamed said are only to have different prices depending on the quantity but it didn't restrict to a minimum of product to order.
In your case I think that the best way will be to use a plugin based on the function: onBeforeCartUpdate(&$cartClass,&$cart,$product_id,$quantity,$add,$type,$resetCartWhenUpdate,$force,&$do)
Then in this function, check the quantity of the added product, if it's less than desired, set the $do variable to false in order to not update the cart, and display a joomla system message.
Here is the link to the documentation:
www.hikashop.com/support/documentation/6...umentation.html#cart
It require some PHP skills
Please Log in or Create an account to join the conversation.
- Posts: 45
- Thank you received: 1
Am I understanding you correctly; are you saying that I will need to write my own custom coded plugin to handle this situation?
Are there any plugins that I could modify to help me get this started/done or do I need to start from scratch?
Thanks,
Keith
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1. Yes
2. No, but the best solution will be to read the documentation and follow the instructions that xavier gave you :
In your case I think that the best way will be to use a plugin based on the function: onBeforeCartUpdate(&$cartClass,&$cart,$product_id,$quantity,$add,$type,$resetCartWhenUpdate,$force,&$do)
Then in this function, check the quantity of the added product, if it's less than desired, set the $do variable to false in order to not update the cart, and display a joomla system message.
Please Log in or Create an account to join the conversation.
- Posts: 45
- Thank you received: 1
I thought I had read somewhere that it was possible to pay someone on the forum to help with specific coding problems; is this true?
I have been looking through the Forum and I can not see the area I should be looking in.
Is it possible to pay someone to write the code I need and if so where should I be posting a request / looking.
Many thanks,
Keith
Please Log in or Create an account to join the conversation.
Here is the forum category where you can post a commercial job:
hikashop.com/forum/9-commercial-jobs.html
Please Log in or Create an account to join the conversation.