purchase limit per user of each item

  • Posts: 71
  • Thank you received: 0
11 years 10 months ago #83635

Hi
I have hikashop bussines.
How I can set a purchase limit for each user can buy each product only once? I'm using hikashop to buy events and each user can only buy each product only once.

Thanks!

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

  • Posts: 8
  • Thank you received: 2
11 years 10 months ago #83656

Dear vaughan, dear Hika.community!
I just wanted to create the same topic. In my case, HikaShop/HikaSerial should work with my Joomla User Databank and allow purchasing only one serial per user. In HikaShop Business an ACL-Management is included, so I hope there is a possibility to automatically remove the permission for a product after purchasing it. This would be perfect!

best regards, mandrael

The following user(s) said Thank You: vaughan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 10 months ago #83658

Hi,

In HikaShop you can configure limitation on products.
In the backend, in the product listing, there is in the toolbar a button named "limit".
The limitation could be set on products, on a group of products, with different time limitation, etc.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: vaughan

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

  • Posts: 71
  • Thank you received: 0
11 years 10 months ago #83783

ok thanks!

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

  • Posts: 8
  • Thank you received: 2
11 years 10 months ago #83875

Dear Hikashop-team,
thanks for the simple solution, you've really made a decent product!

best regards, michael

The following user(s) said Thank You: Jerome

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

  • Posts: 8
  • Thank you received: 2
10 years 11 months ago #137803

Dear HikaShop-Team!
The limitation doesn't work for some reason. The settings are:
===
Period: forever
Type: quantity
Value: 1
Weight symbols: kg (there is no weight, but I can't switch it off)
Currency: EUR (it should be for all currencies, but there is no "all" selectable)
1 product selected.
===
I made a testuser and tried the limit, but there was no. I could put the same manual into the basket as often as I wanted. Only the "Maximum quantity per order "=1 within the product worked.
===
We sell codes for digital manuals and each manual only should be sold once per user. This is for every manuals in all categories. I guess I have to make a limit for each manual?
Could you tell me what I made wrong or is there a more comprehensive tutorial for the limit-function somewhere?

Best regards, Michael

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 10 months ago #137965

Hi,

I've just tried the same settings on our end with the latest version of HikaShop and it's working fine.
Are you using an old version of HikaShop ? If so, I would recommend to update if that's not the case.

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

  • Posts: 8
  • Thank you received: 2
10 years 10 months ago #137977

Hi nicolas,
I now deleted the limit and created a new with the same config – don't now why, but it works now. :-)
btw. I have to enter over 140 limits and for each product the same. If there is an easier way than do this manually, please let me know.
Michael

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 10 months ago #137997

You can use the export/import CSV functions of your PHPMyAdmin to export/import your limits in/from the table hikashop_limit and open/edit the CSV with Excel to easily popuplate them.

The following user(s) said Thank You: mandrael

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

  • Posts: 25
  • Thank you received: 1
9 years 7 months ago #198386

Hi,
We have a website sellling course so jmoodle is entegrated. We put limit to the products in order to allow only one purchace as you discussed above. However, we want to replace the "buy" button with "go to course" button when a user have bought a course also. Is it possible?
Thanks.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #198390

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 25
  • Thank you received: 1
9 years 7 months ago #199610

I think there is a misunderstanding, I tried to ask if it is possible to replace "buy" button with "go to course" button when I custumer purchase a course. With "go to course" button links to the corresponding course.

Now, how it is working:
Products have limit allows only one purchase. When the user try to purcahe again, a system msj appears saying "you reach the limit etc.".

What I want:
When user purchase a product and come to the product's detail page again, this user shouldn't see "buy" button anymore but should see "go to course" button. Because the user have this product allready.

Joomdle is used to show the course content in between.

I hope it is clear what I'm trying to explain.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 7 months ago #199634

Hi,

In that case, it would require to customize the file "show_default" of the view "product" via the menu Display>Views to do a query in the database to see if the current product has already been bought, and if so add your link and don't display the quantity area.
If you're not a developer it would require the help from one.

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

  • Posts: 25
  • Thank you received: 1
9 years 7 months ago #199814

Hi,
I am a front-end devoloper so I have very little knowledge about database but if you help me in database query maybe I can handle.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 7 months ago #199858

Hi,

Something like that:

<?php
$db = JFactory:getDBO();
$db->setQuery('SELECT * FROM #__hikashop_order_product as p LEFT JOIN #__hikashop_order as o ON p.order_id=o.order_id WHERE p.product_id='.(int)$this->element->product_id.' AND o.order_status=\'confirmed\' AND o.order_user_id='.(int)hikashop_loadUser());
$rows_of_products_already_bought = $db->loadObjectList();
?>
Then it's up to you :)

The following user(s) said Thank You: nabukadnezar

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

  • Posts: 25
  • Thank you received: 1
9 years 5 months ago #205856

Hi,
How can I update the order-status of products as 'confirmed', manually in database.
Thank you.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 5 months ago #205952

Hi,

You can't update the order status of products ; you can update the order status of the order.
It's in the table "hikashop_order" and the easier is to change the order status directly in the HikaShop backend to process the different triggers ; changing it directly in the database might not be a good solution and could have some bad side effects.
But if you want to change the order status in the front-end ; you can use some PHP code ; if you use the HikaShop classes/functions, you won't break the order workflow.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 25
  • Thank you received: 1
9 years 5 months ago #206187

Hi,
Thank you for your answer. Actually I need a solution for the free products. In our website soft products are sold and joomdle is integrated. We put a "goto Course" button for the free products instead of "buy" button. In order to enroll the product in joomdle part , product's order-status must be "confirmed". My question is how I can trigger the corfirmation process with hikashop functions if updating database is not a proper way.

Thank you.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 4 months ago #207970

Hello,
Sorry for the late reply, can you give me more information about your "goto Course" button that you have for your free products ?
Will it redirect your customers to the checkout workflow and then create an order with the order status "created" ?
The best solution will be to use some PHP code, but also to using a trigger, so that your plugin code will be used only when an hikashop order will be created for example.
You'll find more information about Hikashop triggers through the developer documentation : www.hikashop.com/support/documentation/6...mentation.html#order

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

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
6 years 7 months ago #290772

Hi,
I have the same problem as mandrael, i want to allow users to by how many products they want but with limit of 1 quantity for each product.
But i use Hikashop with Hikamarket, the users add their own products and can not and is not ok for them to set this kind of limits.
But as I was writing this post, I realized that I would always approve each product manually, and then i can set the limit, but it would be preferable to have a setting for this functionality.

And some minors bug's i found on limit sistem:
HikaShop Business: 3.4.0
Limit: type: quantity | value: 1 | period: cart | status: NOT published.
Bug: If i add 1 product and after i try to add another one, i see the message "Product added to the cart", but in the cart remains only the first product that was added.
1) The message
2) The limit is activ if is not published.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum