Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter usmanue

    (@usmanue)

    Anyone, please assist. It is very important.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @usmanue

    Grouped products are essentially folders of individual standard products. To achieve the functionality you’re after, you’ll need to create a custom button that adds your group product directly to the cart.

    Here’s a step-by-step guide on how you can do this:

    • Create a Custom Button: You can add a custom button to your product page or any other part of your website using a tool like a page builder or custom HTML. The button’s link should be a URL that adds the product to the cart.
    • Get the Add-to-Cart URL: For this, you need to know the ID of your group product. Once you have that, you can create the add-to-cart URL with the following format: https://yourwebsite.com/?add-to-cart=ID, replacing yourwebsite.com with your actual website URL and ID with the product’s ID.
    • Link the Button to the URL: Now, link your custom button to the add-to-cart URL you just created. When a user clicks this button, it will immediately add the group product to the cart.

    Additionally, If you’re looking to customize the “View Products” label with your own text, the WC Custom Add to Cart labels plugin is available for you to use!

    I hope this helps! Let us know if you have any other questions or if there’s anything else we can assist you with.

    Thanks!

    Thread Starter usmanue

    (@usmanue)

    Thanks for the response. But this method doesn’t work. It takes the user back to the homepage.
    I did some research and found out that we need to make a php function and write some javascript and using ajax call. We can add the products to the cart.
    This is very technical and requires alot of effort. Isn’t there an easy way to acheive this.

    Hi there @usmanue ??

    The page I need help with: https://printeazy.club/product/startup-package-standard/

    I went ahead with visiting the page and I encountered a 404 error message, I’m afraid:

    Direct link to image: https://snipboard.io/BcWAKr.jpg

    I did some research and found out that we need to make a php function and write some javascript and using ajax call. We can add the products to the cart.
    This is very technical and requires alot of effort.

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out. For context, here is our scope of support.

    If you are needing help with customizations or troubleshooting WooCommerce and do not have a developer or company you can depend on, then we’ve got recommendations for you.

    Visit https://woocommerce.com/customizations/ to find the right agency or developer for your specific needs.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    I hope this helps!

    Thread Starter usmanue

    (@usmanue)

    @anastas10s
    Thank Pepe for looking into this matter. So I am working on develop a custom fuction, using php, Javascript and an Ajax call. I have changed the things around as the php fuction takes the products ID seperately so there is no need for a grouped product.
    @shameemreza Mentioned a method, thanks for that; but unfortunately that didn’t work so have to build a custom function.

    Can you guide me to place where I can upload that function so everyone can use, when it is done? @anastas10s @shameemreza

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @usmanue

    We appreciate your initiative in developing a custom function and your willingness to share it with the community.

    To upload your custom function, you can follow the steps below:

    Please note that in all cases, your code will be reviewed before it is made available to the public. This ensures the code’s safety and compatibility with different environments.

    I hope this information helps. If you have any further questions, please feel free to ask.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Grouped Product for better usability’ is closed to new replies.