Skip Navigation

[Resolved] Woocommerce elements not showing up

This support ticket is created 3 years, 10 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.

Our next available supporter will start replying to tickets in about 1.08 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 47 replies, has 2 voices.

Last updated by maiS 3 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1679599

Wait, now there is a product but it has a very strange name! Okay so status is that the following are missing:

1) No WooCommerce elements on the frontend template are showing. I need at least: Price and add to cart button
2) The product that is being created has a very strange name, and also when I look under my "Camps" which are where the listings are created, they have the same weird name even though the user types in the name of the camp. How do I change it to the name that the user types in?
3) Also right now there's 2 forms - 1 for the product info and 1 for additional info. Is it possible to combine those 2 or to add like normal text fields to the product form?

Thanks

#1681147

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-06-29 at 4.43.56 PM.png

Hi Mai,

I took a look at this for you .

1) No WooCommerce elements on the frontend template are showing. I need at least: Price and add to cart button

I'm not sure what you mean by no Woocommerce elements are showing up on the frontend. When you create a product this shows up by default as you can see here
hidden link

2) The product that is being created has a very strange name, and also when I look under my "Camps" which are where the listings are created, they have the same weird name even though the user types in the name of the camp. How do I change it to the name that the user types in?

This occurs because you created a secondary custom field for the title called Camp Title. This is unnecessary because there is a default field in wordpress for the Post Title itself. Whenever you don't provide the post with a title it is created with an Auto Draft title. I would recommend adding back the default post title field to your form. See Screenshot

This will essentially resolve the cred autodraft title issue.

3) Also right now there's 2 forms - 1 for the product info and 1 for additional info. Is it possible to combine those 2 or to add like normal text fields to the product form?

I'm not sure what you mean by Product Info and Additional info. Right now what you have are 2 forms that populate 2 separate post Types. There is one for Products and another for the Camp custom post type.

I know that woocommerce has a the default post body field and a field for additional info. Is this what you are referring to ?

Please let me know.
Thanks,
Shane

#1685131

Hi Shane,

1) No WooCommerce elements on the frontend template are showing. I need at least: Price and add to cart button
- What I mean is, that no WooCommerce elements are showing up on the Toolset templates and forms where I added forms. For example I created a Toolset template that should show price, add to cart etc., and I also created a form where the host needs to type in the product info about a camp - but on the Toolset forms and templates the WooCommerce elements are not showing. So I have a template with blank spaces and a complete blank form.

2) The product that is being created has a very strange name, and also when I look under my "Camps" which are where the listings are created, they have the same weird name even though the user types in the name of the camp. How do I change it to the name that the user types in?

This occurs because you created a secondary custom field for the title called Camp Title. This is unnecessary because there is a default field in wordpress for the Post Title itself. Whenever you don't provide the post with a title it is created with an Auto Draft title. I would recommend adding back the default post title field to your form. See Screenshot

This will essentially resolve the cred autodraft title issue.

- I am so sorry, but I do not see a screenshot - can you add it again?

3) Also right now there's 2 forms - 1 for the product info and 1 for additional info. Is it possible to combine those 2 or to add like normal text fields to the product form?

I'm not sure what you mean by Product Info and Additional info. Right now what you have are 2 forms that populate 2 separate post Types. There is one for Products and another for the Camp custom post type.

I know that woocommerce has a the default post body field and a field for additional info. Is this what you are referring to ?

- I basically just want to merge to 2 forms into 1 form with all the infos there. So instead of "products" and "camp" forms its just 1 form that contains all fields and informations. So you can type in price, product info etc., and it will still create a product even though not all of the informations are being used in the product. Some informations are just used on the final template that presents all the informations - but a WooCommerce product should still be created so you can actually buy via the website.

Do you follow? Please let me know or I will try to explain 🙂

#1685649

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot.png

Hi Mai,

1) No WooCommerce elements on the frontend template are showing. I need at least: Price and add to cart button
- What I mean is, that no WooCommerce elements are showing up on the Toolset templates and forms where I added forms. For example I created a Toolset template that should show price, add to cart etc., and I also created a form where the host needs to type in the product info about a camp - but on the Toolset forms and templates the WooCommerce elements are not showing. So I have a template with blank spaces and a complete blank form.

Can you send me an example page of Where the elements are not showing up? Are you creating a custom product template ?

- I am so sorry, but I do not see a screenshot - can you add it again?

I've re-attached the screenshot to this post.

- I basically just want to merge to 2 forms into 1 form with all the infos there. So instead of "products" and "camp" forms its just 1 form that contains all fields and informations. So you can type in price, product info etc., and it will still create a product even though not all of the informations are being used in the product. Some informations are just used on the final template that presents all the informations - but a WooCommerce product should still be created so you can actually buy via the website.

No this is not possible to do because 1 form is tied to 1 post type. So you're not able to create 1 form to populate 2 different post types.

Thanks,
Shane

#1688431

Hi Shane,

1) No WooCommerce elements on the frontend template are showing. I need at least: Price and add to cart button
- What I mean is, that no WooCommerce elements are showing up on the Toolset templates and forms where I added forms. For example I created a Toolset template that should show price, add to cart etc., and I also created a form where the host needs to type in the product info about a camp - but on the Toolset forms and templates the WooCommerce elements are not showing. So I have a template with blank spaces and a complete blank form.

Can you send me an example page of Where the elements are not showing up? Are you creating a custom product template ?

- no I didn't make a product template but a content template where I added the WooCommerce fields. You can see the content template here (use the login from earlier to see the elements). I added a "price field" from the product information form, but nothing shows. And then I need you to help me adding an "add to cart" button on this template. It's called: "Template for camps - final" under content templates.

hidden link

#1688473

Hi Shane,

2) The product that is being created has a very strange name, and also when I look under my "Camps" which are where the listings are created, they have the same weird name even though the user types in the name of the camp. How do I change it to the name that the user types in?

This occurs because you created a secondary custom field for the title called Camp Title. This is unnecessary because there is a default field in wordpress for the Post Title itself. Whenever you don't provide the post with a title it is created with an Auto Draft title. I would recommend adding back the default post title field to your form. See Screenshot

- I looked at the form and your screenshot but I don't see an element called "post title". How do I change it back to a post title field in my form?

#1690605

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-07-07 at 2.22.42 PM.png

Hi Mai,

I was able to check on this for you.

- no I didn't make a product template but a content template where I added the WooCommerce fields. You can see the content template here (use the login from earlier to see the elements). I added a "price field" from the product information form, but nothing shows. And then I need you to help me adding an "add to cart" button on this template. It's called: "Template for camps - final" under content templates.

From what I see this Post Type is not a Product. See screenshot

Only Woocommerce Products can have the Woocommerce elements added to it. So you won't be able to have an Add to Cart option for a page like this.

However i'm assuming that you want to display the price and information from the child product that should be attached. What you can do is to attach a child product to this post here .
hidden link

Then I can guide you on how you can setup the child post information to show the product and the add to cart button on this page.

I believe I have a good understanding of what you want to achieve now.

- I looked at the form and your screenshot but I don't see an element called "post title". How do I change it back to a post title field in my form?

From the screenshot you will see a field called Camp Title. This is the one that you will need to add to the form.

Please let me know if this helps.
Thanks,
Shane

#1705107
Skærmbillede 2020-07-13 kl. 14.02.09.png

Hi Shane,

Okay cool, that sounds good! Let me know what to do.

And yes, I want to attach the price information and add to cart button and quantity from the child product to the post. So that every "camp" gets the product child information that was typed in while creating the camp by using the user forms.

So let me know how to attach the child product informations to the camp template/post:
-Price
-Quantity (number of tickets for the camp)
-Add to cart button

I tried adding the post field as you told me and it works on the camp section - but I can't seem to remove the other field (see screenshot) which creates the name of the product. Is there a way to only have 1 post title box?

#1705415

Hi shane,

I might also need to attach the "product categories" info from the child product to the camp template. I need to be able to filter the camps after product categories. Is that possible too?

#1706819

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Mai,

You work flow is like this Correct?

Users will Visit a Camp Page and be able to book a camp Using the Woocommerce product correct?

So this camp here hidden link

Needs a product attached to it ? Where did you add the price and the category? As i'm not seeing any price or product category added to the post in the link above.

Please let me know.

Thanks,
Shane

#1708843

Hi Shane,

That's because the product is automatically created by a post form where you type in the information. But there are 2 forms since the post form and the product form can not be in the same form.

So when the product is being created now it is without the information from the product form. Only the post form information is being added to the product - and that is what I want to change.

That's why I went into the template that creates the products automatically by pulling informations from the post form, and tried to add the data fields from the product form so the template could pull informations from both the post form and the product form.

But the product form informations doesn't show up when the product is being automatically created. I can't get it to work. So right now the information from the product form is missing.

#1708953

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Mai,

So if I understand correctly when you are creating a new Camp you want to create a new product automatically as well ?

If so then you will need to use the method below.
https://wordpress.stackexchange.com/questions/137501/how-to-add-product-in-woocommerce-with-php-code

Given that you can't use 1 form to create 2 posts of separate post types.

That's why I went into the template that creates the products automatically by pulling informations from the post form, and tried to add the data fields from the product form so the template could pull informations from both the post form and the product form.

But the product form informations doesn't show up when the product is being automatically created. I can't get it to work. So right now the information from the product form is missing.

Can you send me a screenshot of how you are creating the product. I suspect that something isn't being done correctly. If you are not doing this by code then I want to see the method that you are using.

We need to work on the issues in steps rather than doing everything at once. Right now your issue is with creating the product automatically when the Camp form is submitted. Should this created product also be attached to the camp in a relationship ?

Please let me know.
Thanks,
Shane

#1710967
Camp info post form.png
the 2 post forms.png
product post form.png
product automatically created in woocommerce by using post product form.png
Camp template with WooCommerce view price field .png
camp template that was created automatically .png

Hi Shane,

"So if I understand correctly when you are creating a new Camp you want to create a new product automatically as well ?"
- Yes exactly. And som of the information from that product needs to show up on the camp template that has the correct design.

I will try out your guide and get back to you!

So, I made a lot of screenshots and I will try to describe the process to you:
1) You click on the button "Opret Camp"
2) You choose host because you want to create a camp
3) Now you arrive at a user from that creates your user.
4) Next up is the first post form. Here you type in a lot of info about the camp such as dates, description, title etc. These informations are working correctly on the Camp template. No problems here.
5) Now you get to the product post form. Here you chose the fitting categories, enter the price of the camp and a few more things. These informations only show up on the product under WooCommerce but not on the Camp template as I want them to.

I gave the screenshots names to tell you what they present. On the screenshots you see:
- Camp post form
- Product post form
- The product that WooCommerce automatically creates from the product post form
- The Camp template with the missing WooCommerce product informations
- The Camp template backend with a WooCommerce fields (price). I also don't have a lot of WooCommerce field options when I want to set in the dynamic field, so no doubts I'm doing something wrong.

Let me know if you need anything else. Feel free to login as well on the website.

Thanks Shane

#1712945

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-07-20 at 1.11.36 PM.png

Hi Mai,

<emThese informations only show up on the product under WooCommerce but not on the Camp template as I want them to.

I checked on your form for creating products and found that it was missing the field to set the relationship to the Camp itself. Without the Camp having a relationship with a created Product it is going to be impossible to pull the product data for a specific camp.

Add this relationship field to your product form. See Screenshot

Then create a product and use this field on the frontend to link the product to a camp.

After doing this you will need to edit the template for the Camp and create a View there for Product. Customize the view to what you want to display.

Then in the sidebar for the view where you can see all the settings for the block, you will need to scroll down to the query filters section and click to add a new Query Filter. Add a filter for Post Relationship then ensure that it is set to get the information from the current page.

Please let me know if this is clear for you or if further clarity is needed.

Thanks,
Shane

#1716205

Hi Shane,

Basically I think it works, except for the setup in the view. I added a Dynamic Post Title and the I want to add the image (Dynamic Featured image) and an dynamic "add to cart button" (WooCommerce element). I have the following products:

1) The image won't show up
2) The add to cart button keeps disappearing when I want to edit it
3) The Product Categories I simply can't find and I don't know how to add them to the camp template.
4) It seems like it is not the correct title that shows up but just some of the product titles.

Can you maybe login and take a look at the setup of the Content template: Camp Template Final, and the post forms? Sorry for the inconvenience.

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