• Resolved aadillm

    (@aadillm)


    Hi there im working on a website which has both
    1. food store created by your plugin.
    2. And a simple products page with all simple products not food items.

    So basically
    If a user is on ” FOOD STORE ” page and he add food items in cart.
    Than it should restrict the ” Simple product page products ”
    And same with ” Simple products” in cart so restrict ” Food Store ” products

    In simple words can we have a restriction that we can not add simple products and food store items at the same time.

    Note : I have seperate categories for both simple and food store products.
    So if we can restrict by the parent categories ? Or maybe any other way?

    I tried doing this through a code i found on internet but it only dispalys error message and restrict category for simple product page. And if we open the food items on as a single product page it restrict it too.
    But on the food store page where the whole menu is added it does not restrict the cart there. here is the link which restrict products by parent categories :

    https://stackoverflow.com/questions/56445384/only-allow-add-to-cart-from-products-of-the-same-parent-category-in-woocommerce

    I hope this makes sense ?? Let me know if there is a solution and sorry if this was asked before as i tried searching for but couldnt found a solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP Scripts

    (@wpscripts)

    Hello,

    The above method should work to achieve what exactly you are looking for. Not sure why that is not working. We are looking into it and hopefully, we will release an update for this functionality where you can achieve what you are looking for.

    Regards,

    Thread Starter aadillm

    (@aadillm)

    Okay sounds great would love to see this in future. And its actually very important for someone who is looking to sell other products too.

    For now im just clearing cart each time someone visit the food menu page. And same for shop page for other products. This is the only temp solution if someone else is looking for it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict add to cart.’ is closed to new replies.