Skip Navigation

[Resolved] Problem when adding product to cart from the products page (DIVI)

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

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 10 replies, has 2 voices.

Last updated by Francisco Ramón Molina Busquiel 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#584887
2017-11-01_15-35-16.jpg
2017-11-01_15-29-31.jpg

Toolset WooCommerce Views last version.
When a product is added to the cart from the product page, the entire page is distorted because there is an empty space between the header and the title after adding the product to the cart.
hidden link
Look at the screenshots.
Thanks for your help.
Best regards,
Francisco R.

#585076
css.JPG

Dear Francisco,

Please check the HTML source codes of the problem page:
view-source:hidden link
There are some error message output above all other HTML contents, I suggest you fix it first, see the test result after remove those error message in my Chrome browser:
CSS.JPG

#585099

Errors?
What errors do you mean?
If there are errors in the html they are produced by Toolset or DIVI. I do not do anything special on this page.

#585110
error2.JPG

This error occurs after you add a product into the cart, please do as you mentioned above:
When a product is added to the cart from the product page

Then check the HTML source code again

<br />
<b>Notice</b>: wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 4.9.0.) in <b>/var/www/vhosts/sendasoft.com/httpdocs/es/wp-includes/functions.php</b> on line <b>4139</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/vhosts/sendasoft.com/httpdocs/es/wp-content/plugins/unicorn-assistant/unicorn-assistant.php</b> on line <b>115</b><br />

See screenshot error2.JPG

#585132

Although I disable the Unicorn Assistant plugin, the page is rendered incorrectly when I add a product to the cart.
I have not done the DIVI code, nor of Toolset.
These errors are from DIVI or Toolset and you will have to fix them yourself.
Dont you think?
If I disable the Unicorn Assistant plugin the error is:
<br />
<b>Notice</b>: wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 4.9.0.) in <b>/var/www/vhosts/sendasoft.com/httpdocs/es/wp-includes/functions.php</b> on line <b>4139</b><br />
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" lang="es-ES">
<![endif]-->
<!--[if IE 7]>

#585175

You can simply locate the problem plugin/theme by this:
1) deactivate other plugins and switch to wordpress default theme, and test again

2) If the problem is fixed, then activate the plugin/theme one by one, to locate the problem plugin/theme

#585195

I have disabled all the plugins, except Toolset Types, Views, WooCommerce Views and WooCommerce, and I have connected the Twenty Fifteen theme, and the error keeps showing:
---------------------------
<br />
<b>Notice</b>: wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 4.9.0.) in <b>/var/www/vhosts/sendasoft.com/httpdocs/es/wp-includes/functions.php</b> on line <b>4139</b><br />
<!DOCTYPE html>
<html lang="es-ES" class="no-js">
<head>
---------------------------
So the problem is with Toolset.
Please, solve this problem.

#585207

Please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

#585661
add-product.JPG
theme.JPG
plugins.JPG

Since your did not provide the database dump file, so I tested it in your website directly, with below steps:
1) Deactivate all plugins except Toolset plugins + Woocommerce plugin
see screenshot plugins.JPG
hidden link

2) Switch to wordpress default theme 2017, see screenshot: theme.JPG
hidden link

3) tried it again with the steps you mentioned above:
When a product is added to the cart from the product page
There isnt't the PHP error or warning message, see screenshot add-product.JPG

So the PHP error message should be outputted from other plugins/theme, you will need to locate the problem plugin/theme as I mentioned above:
https://toolset.com/forums/topic/problem-when-adding-product-to-cart-from-the-products-page-divi/#post-585175
1) deactivate other plugins and switch to wordpress default theme, and test again

2) If the problem is fixed, then activate the plugin/theme one by one, and locate the problem plugin/theme

#585746

I will study it carefully and I will tell you something.
Thanks for your help Luo.

#585833

I have researched more and the problem is with the WPBruiser plugin.
Thanks for your help.

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