AgentWP

  • Tutorials
  • Themes
  • Plugins
  • Services
  • Contact

Fix | eShop Plugin Sidebar Shopping Cart Widget Showing Double of Total

There is a bug in the shopping cart widget (improved version) of the eshop plugin. The issue is that if you add a product to the shopping cart, the cart shows double of the total cost of the product.

eShop Shopping Cart Widget Showing Double of Total

The screenshot above showing the bug is taken from the eStore theme from ElegantThemes, but I have tested the issue with TwentyTen theme as well and the bug is still there. After checking the code, there seems to be an issue with the $sub_total variable.

So, to fix the issue, go to plugin editor screen, and select cart-functions.php file to edit for the eshop plugin. Then find this code in this file,

if($check > 0){
global $final_price, $sub_total;

Add this code to re-initialize $sub_total variable just after the above code,

$sub_total = 0;

The final code should look like this,

if($check > 0){
global $final_price, $sub_total;
$sub_total=0;

That’s it. This will fix the issue. Try adding a product to the shopping cart and the sidebar shopping cart widget will not double it.

Get useful WordPress related tricks, tips, tutorials and reviews delivered straight to your inbox.

StudioPress - Premium Wordpress Themes
ElegantThemes - Premium Wordpress Themes

Copyright © 2023 · AGENTWP · All Rights Reserved

Copyright © 2023 · awp on Genesis Framework · WordPress · Log in