• Anonymous User 16358193

    (@anonymized-16358193)


    Set my limnit to 2 across all products and could check out more then 2 with no problems whilst not logged in.

    • This topic was modified 4 years, 6 months ago by Anonymous User 16358193.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @cure8music2,

    Sorry to hear you are having troubles with the plugin. As I understand the problem is that you could go over the maximum as a guest, correct? If that’s the case, there is “Block guests” checkbox option in “WooCommerce > Settings > Maximum Products per User > General”. It blocks non-logged users (i.e. guests) from buying products in your shop. Here you can also set the message your guests will see (e.g. “You need to register to buy products.”).

    Hope that helps. Please let me know if you have any questions.

    Thread Starter Anonymous User 16358193

    (@anonymized-16358193)

    ‘Block Guests’ stops guests from purchasing any products at all. I want everyone to have a maximum of 2 per day.

    I don’t understand why there is maximum options for everyone except guests? So you have to be logged in for the maximum options to apply. This defeats the point surely?

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @cure8music2,

    Well the problem here is how to identify each guest. I mean, he can order two pieces, then order again right after that.

    Plugin Author Algoritmika

    (@algoritmika)

    @cure8music2,

    As you’ve pointed this out, I’m now thinking that maybe we could identify each guest by his IP, or maybe by an email address he used on checkout… Let me check if I can implement it in plugin. Will get back to you shortly.

    Thread Starter Anonymous User 16358193

    (@anonymized-16358193)

    I managed to get the functionality I was looking for with custom code in my functions.php with the below variable and no plugin.

    $last_24_hours_from_ip_orders = wc_get_orders(array(
    ‘date_created’ => ‘>=’ . (time() – 86400), // time in seconds
    ‘customer_ip_address’ => WC_Geolocation::get_ip_address(),
    ));

    I understand that the guest feature is not actually the intended function of your plugin so I will remove the score. Hopefully you are able to implement the IP feature – I think it is a great feature to be able to limit guest orders.

    Thanks,

    Hi,

    I followed your instructions to prevent guests from buying products. However, it doesn’t work for me. My shop page and products pages use AJAX add-to-cart buttons.

    *** Do you think you could update your plugin to work with AJAX add-to-cart buttons in a future release?

    But even if that could work, it is still a workaround for me.

    I would rather limit purchases for guests too because my checkout requires guests to login or enter details for a new account. I understand that a more convenient purchase experience (i.e. allowing users to start shopping before being forced to create an account or login) increases sales.

    Not sure if this can easily be done, but ideally, the plugin would limit guests or logged-in users from adding too many items to the cart. Lets say I sell products A, B, C, D, E, F, G, H. Guests or logged in users can only buy 3 items of a particular category in a lifetime (e.g. items C, F and G).

    It would be great if a registered user is logged out and adds items C, F, G. But after the user logs in at checkout, the plugin checks their past orders and detects that they also bought item A. So their cart (current order) would carry them over the lifetime limit of 3 items, and after logging in at checkout, they would see a notice that their current order is not allowed because it would put them over the total purchase limit and that they should remove 1 item from the cart to allow the purchase to proceed.

    *** UPDATE – just tried it again, and the AJAX is working fine now. I might have refreshed the shop page too early before the plugin setting had updated. Slow internet!

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @ragrant0,

    Sorry for the late reply.

    Regarding limiting guests – I’m still working on that, there is a lot needs to be changed in the plugin code. Will get back to you about this asap.

    Regarding AJAX – I’ve just tested and I found one (small) issue – while product is not added to the cart (so everything is ok here), there is no “You need to register to buy products.” message displayed. This one should be easy to fix. Will try to release fix a bit later today.

    Plugin Author Algoritmika

    (@algoritmika)

    @ragrant0,

    As promised, we’ve just released new plugin v3.1.1, where I’ve fixed the guest message for the AJAX. Please take a look and let me know if there are still any issues.

    Yes, I did notice the message was missing on the shop page for guests clicking the AJAX the buy button. I forgot to mention it. Thanks for fixing that!

    Will let you know if I come across any other issues.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Doesn’t work (EDITED)’ is closed to new replies.