-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addToCart mutation on custom fields #440
Comments
@sn3h Did get a workaround for this? |
@jasminetracey Hi. Well there are few options, none of them perfect.
will add line item extraData array of objects
so you can modify the price of cart based on your extra data. You have to parse numbers as WC stores everything in extraData as string (no comment on that) . Big difference vs #1 is that you don't even get your extraData on cart___contents___nodes to show anywhere like if you add metaData to lineItems in createOrder, so you don't see them in the order in WC UI. and have to handle it again This is absolutely terrible and again custom logic is needed. I am forced to go with #2 but I am quite unhappy with it. So I was checking for option #3 which is another ecommerce solution, but there are some issues everywhere, so I am stuck with 2. Possitive thing about 2 is that you can use starters (gatsby and next) for the logic and save some time. If you can handle payments yourself and don't need some WP/WC heavylifting you can try https://cartql.com/ to manage cart or try snipcart and other headless solutions. I hope I helped at least a little |
Thanks for the suggestions i'll try them out and see which one works best |
@sn3h You should be able to your desired functionality with WooGraphQL Pro and Product Addons, otherwise your feature request is beyond the scope of WooGraphQL. I'll be closing this issue. |
Is your feature request related to a problem? Please describe.
I need to let a customer add custom value to product parameters, i.e. custom text on tshirt, and/or change value of the product based on those values.. Attributes have predefined values and cannot be customized.
Describe the solution you'd like
Set custom fields value using AFC(or other solution that adds custom fields to products, like Advanced Product Fields for WooCommerce).
Describe alternatives you've considered
After multiple fails to achieve this with WC + wpgqlWC, I am considering only calling login mutation with some private function not to expose JWT and creating product configured by the costumer before adding it to basket, but it has many problems such as I don't know if the order will be finished and paid at the moment of adding it.
Additional context
Images of what state is unreachable now, source is images taken from https://product-demo.studiowombat.com/
baseket :
The text was updated successfully, but these errors were encountered: