Skip Navigation

[Resolved] Using a form to submit a Woocommerce product & _regular_price does not register.

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by shaunV 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1692213

Tell us what you are trying to do?
I am using a toolset forms to submit products to my website from the front end.

I have enabled the hidden field _regular_price under "Manage non-Toolset Post Fields with Toolset Forms" as a numeric field, required, validate format and include in the scaffold.

I have tried both using a cred generic field and cred field, but don't work:

[cred_generic_field type='numeric' field='_regular_price' placeholder='0.00' class='form-control form-price' ]
{
"required":1,
"validate_format":1,
"default":""
}
[/cred_generic_field]

nor

[cred_field field='_regular_price' force_type='field' class='form-control' output='bootstrap']

The first cred_generic_field works fine with _sale_price, but does not work with _regular_price.
Other Woocommerce fields that are working fine: _manage_stock, _stock.
Also tried using "_price" field without registering it and didn't work either.

#1692661

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Here is the detailed information how you can create a new product using Toolset form and what fields you can use and what fields you need to registered:
=> https://toolset.com/course-lesson/creating-woocommerce-products-using-front-end-forms/

What if try to use the following generic field - where we use the attribute "persist":1, that will help system to automatically save the _regular_price field.

[cred_generic_field type='numeric' field='_regular_price' placeholder='0.00' class='form-control form-price' ]
{
"persist":1,
"required":1,
"validate_format":1,
"default":""
}
[/cred_generic_field]
#1693223

Ignore this. I messed up. I had a hidden field for _regular_price that was set to "0".
=0

Thank you!!

#1694505

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.