Skip Navigation

[Resolved] Woocommerce Error Messages Not Shown when using Toolset Layout

This support ticket is created 4 years, 6 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 0.89 hours from now. Thank you for your understanding.

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 prasadS 4 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#1347809
Screenshot 2019-09-25 at 12.32.38 PM.png

I am trying to: Use toolset to design Woocommerce product pages. Error woocommerce messages are not showing up.

Example:
In the links below, product 2 is set as 'Sold Individually'. In this case, if I try to add the same product in the cart twice, an error message must show up on the product page saying 'You cannot add another "Pay 2" to your cart'. This is not happening. Instead, the error message is shown on the cart page when I manually click on the cart URL.

In product 1, the 'amount' and reason for payment' fields are required. If I click on 'Proceed' it should show and error message on the product page saying that the fields are required. This is not happening. Instead, the error messages are shown on the cart page when I manually click on the cart URL.

Link to a page where the issue can be seen:
Product 1: hidden link
Product 2: hidden link

I expected to see: Error message on the product page.

Instead, I got: No error message displayed on the product page.

#1347827

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

The theme you are using "OceanWP" is one of our recommended themes and already integrated theme with Layouts:
=> https://toolset.com/documentation/recommended-themes/

Here is the Doc how you can use this theme with Layouts:
=> https://toolset.com/documentation/recommended-themes/using-toolset-with-oceanwp-theme/

However, I need to check on your install, how the product is setup and need to investigate this further and for that I need wp-admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1348877

Minesh
Supporter

Languages: English (English )

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

In the links below, product 2 is set as 'Sold Individually'. In this case, if I try to add the same product in the cart twice, an error message must show up on the product page saying 'You cannot add another "Pay 2" to your cart'. This is not happening. Instead, the error message is shown on the cart page when I manually click on the cart URL.
====>

I've added the following shortcode that will return the woocommerce errors to the "Custom Code" section offered by Toolset:
- hidden link

function func_print_wc_errors($atts) {
    
      
    return wc_print_notices();
}
add_shortcode("custom_print_errors", "func_print_wc_errors");

And I've added the shortcode to your Layout:
=> hidden link

[custom_print_errors]

In product 1, the 'amount' and reason for payment' fields are required. If I click on 'Proceed' it should show and error message on the product page saying that the fields are required. This is not happening. Instead, the error messages are shown on the cart page when I manually click on the cart URL.
===>
Toolset do not offer such option/feature using which you can validate the custom fields on single product page. You should try to find any third-party plugin or you need to customize that on your own.

Maybe the following link may help you:
- https://stackoverflow.com/questions/50125902/custom-field-validation-in-woocommerce-single-product-pages

#1348965

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.