
WooCommerce Create Variations & Attributes with AJAX
- or -
Post a project like this711
£30(approx. $40)
- Posted:
- Proposals: 1
- Remote
- #3919990
- Awarded
Description
Experience Level: Entry
I need a script to run within the Admin Dashboard > New Product edit screen. An admin will be shown a number of checkboxes, they will have predefined; names and prices connected to them.
There will be one global attribute name.
You must create a script that will allow the user to, on-the-fly, create variations from the checked boxes. It must happen with AJAX, ideally there should be no requirement to refresh the page.
A user should be able to visit post-new.php and whilst creating the initial, first draft, create attributes / variations from the checkboxes.
The built-in woocommerce 'publish' or 'save' button should not delete or remove these. If it is impossible to retrieve / save post meta without first publishing or saving an initial draft, we can write that in.
I will attach a script that another programmer has completed for me, it is far from perfect. The programmer could not complete to my specifications. Here are the instructions to use this script:
1. Install and Activate
2. Navigate to "Add Product" screen
3. First "Publish" the product
4. Then find the meta box to add attributes via Checkbox, select attribute(s). Press submit button "Add Attribute"
5. Navigate AWAY from the "Add Product" screen - DO NOT press 'Update' as you typically would.
6. If you now visit this product you'll see the attributes are correctly attached, can be edited, can be saved.
The obvious issue with the script I already have- it will not allow the attributes to be added without first publishing the post. Furthermore (most importantly): the user must not press 'Update' as this seems to remove the attributes / variations that have just been added via the checkboxes.
Please let me know if you can fix this.
There will be one global attribute name.
You must create a script that will allow the user to, on-the-fly, create variations from the checked boxes. It must happen with AJAX, ideally there should be no requirement to refresh the page.
A user should be able to visit post-new.php and whilst creating the initial, first draft, create attributes / variations from the checkboxes.
The built-in woocommerce 'publish' or 'save' button should not delete or remove these. If it is impossible to retrieve / save post meta without first publishing or saving an initial draft, we can write that in.
I will attach a script that another programmer has completed for me, it is far from perfect. The programmer could not complete to my specifications. Here are the instructions to use this script:
1. Install and Activate
2. Navigate to "Add Product" screen
3. First "Publish" the product
4. Then find the meta box to add attributes via Checkbox, select attribute(s). Press submit button "Add Attribute"
5. Navigate AWAY from the "Add Product" screen - DO NOT press 'Update' as you typically would.
6. If you now visit this product you'll see the attributes are correctly attached, can be edited, can be saved.
The obvious issue with the script I already have- it will not allow the attributes to be added without first publishing the post. Furthermore (most importantly): the user must not press 'Update' as this seems to remove the attributes / variations that have just been added via the checkboxes.
Please let me know if you can fix this.

Callum A.
100% (2)Projects Completed
3
Freelancers worked with
3
Projects awarded
75%
Last project
21 Apr 2023
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Dear Callum Sir,
Are you flexible with the budget ??
1057973
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies