ADD to cart form does not populate on a single page

Hi,

I built a product template where everything is working fine.

I want to create a new landing page (a simple WordPress page, not a product page) where I want to use the exact layout for a section as my product page.

I am able to use a shortcode to display product name, price etc. with shortcodes like this {{dc:woocommerce:product_price product=“4604”}} {{dc:woocommerce:currency_symbol product=“4604”}}.

My problem is that the Product Gallery and Add to Cart Form is not receiving any data. How can I associate the Product Gallery and Add to Cart From with my product? I don’t see any options to provide a product ID.

Thanks,
Gabriel

Hi Gabriel,

Thank you for writing in, you need to use it inside the Looper Consumer. You can build your Looper Provider as Query Builder, in the Posts choose Product, then you can have a specific product to output.

More information about loopers:
Loopers: Introduction & Your First Loop

Hope it helps,
Cheers!

Hi Friech,

Thanks for the useful details, I was able to solve the problem as you suggested. Everything is working fine now. :innocent:

Have a nice day,
Gabriel

Actually I was doing further testing a discovered an issue with the product gallery.

My product page template is built with Pro and the product variation galleries are working correctly (when I change the variation from Raspberry to Pineapple the correct gallery is loaded).

But my single page which is built with the same elements and loopers does not respond to variation changes (when I change the variation from Raspberry to Pineapple the gallery is not refreshing).

What is the right solution to load the proper gallery with loopers for each variation?

Hi Gabriel,

I have checked by selecting the Flavor selector and found that the specific product added into the cart with the selected flavor. Now it will be very difficult to recognize the issue without investigating through the admin dashboard. Can you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password
– Specific Layout where you are having this issue

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

Thanks

Hi Tristup,

I created the credentials, please let me know if you need anything else.

Thank you in advance for your help,
Gabriel

Hi Gabriel,

Unfortunately, the Add to Cart Form works perfectly with the predefined template of Layout Builders, I would suggest you use the Layouts instead of a single page on this.

Thanks

How is it not possible to use the Layouts for a Single page? I haven’t find any reference on that.

What is the difference in functionality between Layout and Single Page when it comes to displaying the product properties?

Hi Gabriel,

The Layout for WooCommerce single page comes with few predefined functionalities which fit with these elements. When a Layout assigned to a Product it automatically takes its product ID as a parameter of the Add to Cart form, which is not possible when you are using it on any page. And unfortunately, the Add to Cart form does not have an option to mention and product ID in it, to use it independently.

Thanks for understanding

Thanks for the explanation, I understand that this feature is currently not supported by Pro.

Are you planning to add this functionality anytime soon? (Where you can embed a product to a single page.)

(Other page builders already solved this.)

Hey @gzalaba,

We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.

Thanks!

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