- Posts: 259
- Thank you received: 22
Product Limit by Yearly Doesn't work
- rodfarrell
-
Topic Author
- Offline
-- Joomla version -- : 3.9.13
I have some products set to limit the quantity yearly but it only limits per cart. The limit works fine in a single cart but the customer can come back and create a new order as often as they like. We need the limit to be a yearly total.
A screen shot of the settings is attached. As you can see there should be a limit of 4 products from the selected category per year for users in the Vita-FT user group.
Please Log in or Create an account to join the conversation.
I see that you set a restriction to the "Store-polos" category. Please note that in that case, the limit will only apply to the products directly linked to that category.
So if you have products in sub categories of that category, this restriction won't apply to them.
Could this explain why the limit doesn't work for you ?
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
Please Log in or Create an account to join the conversation.
I did some tests on my end to try to reproduce but I don't have the issue.
Could you provide a user account with the issue, precise instructions to reproduce, a backend access to check your settings, a FTP access to do some debugging and a link to this thread for reference via our contact form so that we can look into the issue in depth ?
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
Please Log in or Create an account to join the conversation.
When you provide any backend reference via our Contact us form, don't forget to add in your message an Url link to this topic in order to keep the link with your elements.
Regards
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
Update, on further testing this is not working either. It seems to be that product variants are not limited beyond the number allowed in the cart. Previous orders even of the same variant are not being counted in the yearly total. I created a limit for a single product with no variants and the limits work as expected whether I selected the product or the product category in the limit config. When I change the category or product to one where the products have variants, the yearly limits are ignored. I've set up a test site for this client and will send the access and ftp details via contact page
Please Log in or Create an account to join the conversation.
I think I know what is the problem.
Replace the file administrator/components/com_hikashop/classes/limit.php by the one in the zip below and that should hopefully fix the problem.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
1. I have added a product that is subject to a limit to the cart succesfully (correct behaviour).
2. I try to add a different product that has its own limit (completely separate rule to the first product) to the cart but I choose too high a quantity for this product's limit. This product is not added to the cart (correct behaviour) but no popup message appears.
The popup message works in all other instances including when products that are not subject to any limits are in the cart.
Note that the site is using the modified limits.php file that you provided earlier.
Please Log in or Create an account to join the conversation.
First, I would recommend updating to the 4.2.3 and check if you still have the issue.
If you do, then please provide precise instructions so that we can reproduce the issue on your shop.
Please also provide a backend access and a FTP access with a link to this thread via our contact form so that we can analyze the situation:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
- Posts: 259
- Thank you received: 22
Does 4.2.3 include the changes in the limit.php file or do I need to replace it again?
Please Log in or Create an account to join the conversation.
Yes the change is included so no need to redo it.
Please Log in or Create an account to join the conversation.