Skip Navigation

[Closed] upload the "downloadable file" and add a product_tag to the product record

This support ticket is created 8 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 8 years ago.

Assisted by: Luo Yang.

Author
Posts
#377153

joe

I'm using the ToolSet plugins to create a list of songs for sale via Woocommerce, along with the front end forms required to manage the listings. I'm very close to a final solution but I've run into a couple snags--

On the "add song" form I want to be able to upload the "downloadable file" and add a product_tag to the product record upon form submission. Using a custom field to upload a sample MP3 file to each product record works fine. I haven't been able to get the product tag or the "downloadable file" to register. What is the best method to accomplish this?

Background: I'm working on a fresh install of WP on a shared host. Using the default twentysixteen theme, woocommerce, types, views, cred, woocommerce views, jcsubmenu plugins. This development site is registered with toolset--

#377421

Dear joe,

Are you using CRED form to Create/Edit the product post?

A) product tag
It is a custom taxonomy of woocommerce, you should be able to setup it with when you edit a product post CRED form, please check these:
1) edit your CRED form, make sure this:
in section "Post Type Settings", choose option "Products"
2) in section "Form Content", click button "Add Post Fields"-> Taxonomies-> "Product Tags"
it will be able to output shortcode in content like this:
[cred_field field='product_tag']

B) downloadable file
Woocommerce is using a hidden field "_downloadable_files", but store it in a serialized array, you can check it with mysql tools, table "wp_postmeta", the meta_key is "_downloadable_files", you will need to create some custom function to store it into database as the format of woocommerce.
More help:
cred_save_data: (action)
Hook to do custom action when post data are saved to database.
https://toolset.com/documentation/user-guides/cred-api/#csd

#378029

joe
Screen Shot 2016-03-24 at 5.36.14 AM.png

Hello and thank you for your help.

I inserted the [cred_field field='product_tag'] shortcode. It added a field to add a tag as well as an "add" button. The extra button on the form is confusing for users. How can I eliminate the "add" button to allow the entire form to be submitted with a single submit button?

btw~ The product tag field is used to populate the "artist" field on my form. Please see attached image.

#378213

Unfortunately, there isn't such a build-in feature within CRED, and if there isn't such a add button, how can your user setup the terms of "product_tag"?

Can you describe details for what your request? then I can put it into our to-do list as a feature request, thanks

#381757

joe

Here are some more details--

The concept is very simple -- an easy-to-use woocommerce song store:

The member may upload a song with title, artist name, price, genre, sample mp3, high-res downloadable file. The member may update or delete their listing. All member forms are front-end forms.

The visitor may browse for songs by artist name, genre, or globally browse the list using the woocommerce filtering. Songs may be added to a woocommerce cart for purchase. Upon successfully completed transaction the buyer will receive a link to the downloadable file.

Please have a look:

songlist: hidden link
add song form: hidden link
sample edit form: hidden link

Background: This development site is on a fresh install of WP on a shared host. Using the default twentysixteen theme, woocommerce, types, views, cred, woocommerce views, jcsubmenu plugins. This development site is registered with ToolSet.

The issues:

I'm using the ToolSet WP plugins to create a list of songs for sale via Woocommerce, along with the front end forms required to manage the listings. I'm very close to a final solution but I've run into a couple snags--

On the "add song" form I want to be able to add the artist name (using a product_tag) and upload the "downloadable file" to the product record upon form submission. Using a custom field to upload a sample MP3 file to each product record works fine. I haven't been able to get the product tag or the "downloadable file" to register on the database.

I want to use the product tag field for the artist name so I can have a dynamic drop down menu item in the page navigation. Please see the demo site.

I tried using the product_tag field
"[cred_field field='product_tag']"
supplied by Cred. It works but it requires the visitor to click "add" and then also click "submit". Too confusing -- The form submission needs to be completed with a single "submit" click.

Ideally, the "downloadable file" could be large so it should be saved to an external storage bucket such as AWS or Google.

Can we make this work?

#381857

Sorry for the misunderstand,
Q1) [cred_field field='product_tag']
you can setup the Hierarchical taxonomy field as dropdown menu,
Since the "product_tag" is a Non-hierarchical taxonomy, so I suggest you create another custom Hierarchical taxonomy to store the Artist information. see our document:
https://toolset.com/documentation/user-guides/create-custom-taxonomies/

And you will be able to setup it as dropdown menu in the CRED form, for example:
[cred_field field='artist ' display='select' single_select='true' ]
More help:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred-field
‘display’=> [optional] Used by fields for Hierarchical Taxonomies (like Categories) to signify the mode of display (ie. “select” or “checkbox”)
‘select’=> [optional] ‘true’ | ‘false’ (default) – if display=’select’, then single_select=’true’ will only allow a single option to be selected (by default multiple options can be selected)

Q2) Ideally, the "downloadable file" could be large so it should be saved to an external storage bucket such as AWS or Google.
There isn't such a feature within Toolset, but you can try other plugins, for example:
https://wordpress.org/plugins/search.php?q=google+drive

The topic ‘[Closed] upload the "downloadable file" and add a product_tag to the product record’ is closed to new replies.