Add my Looper content to all Woocommerce Single Product Page

I have built a Looper here: https://capsaviation.com/testing-loopers/

I would like this content to appear at the bottom of every single product page. Can you guide me on how to properly add that?


For more background information, I have built this Looper to replace the Woocommerce Product Recommendation plugin, which is not appearing consistently. Ideally, these suggested alternatives would only appear when the single product being shown is out of stock, but that’s not really necessary. It can happily appear on all Single Product Pages.

I’m having fun with the Looper capability on a couple of my sites! I appreciate your help in getting this looper (from the test page above) to appear on every Single Product Page in Woocommerce.

Thanks!

Hello @capodanno,

Thanks for writing in!

You can go to X > Global Blocks and create a new global block. The block can contain your Looper like what you have in your test page. Save your global block and take note of the global block shortcode so that you can easily insert the global to a page or on the sidebar. Regretfully you cannot edit the single product page. Adding the global block shortcode to the single product pages will require custom development since you are using the X theme. As this is all custom development, regretfully we won’t be able to assist further. Custom development is outside the scope of our support.

We highly recommend that you upgrade to the Pro theme. The Pro theme has the Layout Builder where you can create and edit a single product page layout. With this layout builder, you can easily insert a shortcode or create the looper directly within the single product layout.

Best Regards.

Thank you for this advice. I have upgraded to Pro, and created a new Single Product Layout page that includes my Looper.

But, there is much functionality on the original single product page that is not being included:
–My Gravity Form does not appear (I use Gravity Forms and the Woocommerce Gravity Forms Product Add On plugin to collect registration information about the person purchasing the product)
–The quantity remaining in stock does not appear

Is it possible to start a new layout using the current one as an example? That might give me the clues I need.

I worry that i will (once again) get the “that’s custom development, so we can’t help you” answer. I spend so much time learning new things, spending money to upgrade, and then still can’t seem to get to the final goal. Keeping my fingers crossed that’s not the case today!

I’ll give you some additional info in a secure note.

Hi @capodanno,

Regarding the default functionalities of the Single Product page, it seems that the Custom Layout does not have that option. I would suggest you select any of the existing ** templates** instead of creating it from scratch and add the additional elements after that. If that does not help, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– Specific Layout which you have assigned to these pages.
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

NOTE: Please find the answer to your query on the Layout below.

Is it possible to start a new layout using the current one as an example? --Yes you can duplicate any existing Layouts for further uses.

Theme-Options-Pro (79)

Thanks

I did use a template, and just made changes to it after. But to simplify, I have made another example from the “WC Single” template called “Product 1”. I didn’t customize it, except to add the “Available Class Dates” global block that includes my Looper. (I popped the Global Block in, below the Description box.) But nothing else is customized yet, so I’m not accidentally deleting anything.

This new layout called “Another Example” is assigned to this specific product only, for testing purposes: https://capsaviation.com/product/far-135-331-crewmember-emergency-training-course-registration-02-13-21/

This product has 1 in stock, so the Gravity Forms content should be appearing, but it is not.

I hope it’s helpful to include the response I got from Lucas Stark at Element Stark, as he’s the developer of the Woocommerce Gravity Forms Product Add On. Here’s what he said. It’s important to note that he says the custom layout I used (created with your Layout Builder) isn’t including the source code expected for a genuine product page, to properly interact:

Ticket: https://elementstark.freshdesk.com/helpdesk/tickets/11075

Well, first thing, on that last example, that isn’t even a product page. You’ll see that there is the add to cart button, but if you were to look though the source code of the page you will not find the actual WooCommerce element where the product would normally be. I’m not sure why this isn’t there, but of course that is specific to your page builder and how you are setting up the page. Since the form element isn’t present on that 3rd page I’m sure that the actions we need to hook into from Gravity Forms are not being fired, therefore the extension has no way to interact with that custom design.

Hope that helps explain things and if you need further assistance with this request please let me know.

Thanks!

Lucas Stark @ Element Stark

Extension Developer
https://elementstark.com/

Please note: Once we have replied to you, your ticket is set to pending and closes automatically if we do not hear from you within a week. You can always just reply to an automatically closed ticket to re-open it in the future.

On Tue, 13 Apr at 1:04 PM , capodanno <[email protected]> wrote:

I am using the X Pro them from themeco. They have the ability to create a customized single product page. But when I set the site to use this new single product page, your integration is no longer working. Is there a setting somewhere, so I can get this working properly?

Here are the examples that I sent to ThemeCo. I’m hoping either you or the theme builder (who suggested I upgrade, in order to make these custom single product pages) can help me integrate your functionality into a customized single product page.

Notice how the quantity available and gravity form fields are missing, even though the item is in stock.

I will add the other info you requested in a Secure Note.

Thank you!

Hey @capodanno,

Thanks for clarifying that you’re using a 3rd party plugin, Element Stark. According to the developer said, they are hooking into the WooCommerce Single Product page. If you assign a Layout to a page, it is no longer using the WP template system but instead Pro’s layout system.

The good news is Pro has an Element Condition feature and you could use the Product’s Stock as the condition. The way this will work is if the Stock is 0, it will display the element so for your case, you can insert the Gravity Form shortcode in a Text element and that element will show up based on the stock condition. However, I tested the setup and it doesn’t seem to work as there might be a bug.

I’ll forward this case to our development team maybe they will have a temporary solution or they can produce a fix in the coming releases.

Please stay tuned.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.