WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Simple Paypal Shopping Cart
Your Cart is Empty. Visit our Shop does not show (3 posts)

  1. Marc73
    Member
    Posted 3 years ago #

    Hi. I noticed that when the Cart is empty, the WIDGET says : Your Cart is empty. Visit our Shop.

    Yet when you add the plug-in cart code to a page, this statement does NOT appear when your Cart is Empty, which basically leaves the customer unable to understand why that page is empty.

    Please Rohul Amin, I'd highly appreciate it if you kindly fix this.

    I wish I knew how to contact you directly.

  2. mrfixitct
    Member
    Posted 2 years ago #

    I just installed the plugin for the first time and I noticed the same problem. For now, until an update comes out. I manually fixed the code to resolve the problem.

    Problem:
    Cart not showing Empty message or 'Visit our Shop' link.

    Cause:
    Found a double redundant function which appears to be initially doing the same thing. However, the first function overrides the second and doesn't allow the second function to execute and the second one is the function that processes the empty cart page.

    Manual Edit Solution:
    Not sure if your familiar with PHP, but if you want to try the current fix yourself, here it is:

    1. If not already logged in, log into your website's wordpress dashboard/login page.

    2. Under the 'Plugins' section, click on 'Editor'

    3. Select 'WP Simple Paypal Shopping cart' under 'Select Plugin to Edit Menu'

    4. You'll see a list of plugin files to edit, the file you want to edit is:
    wordpress-paypal-shopping-cart/wp_shopping_cart.php

    5. Once you've selected/verified that you're editing that file, scroll not too far down to find the following function:

    function show_wp_shopping_cart_handler()
    {
        if (cart_not_empty())
        {
           	$output = print_wp_shopping_cart();
        }
        return $output;
    }

    Change it to the following code:

    function show_wp_shopping_cart_handler()
    {
        return print_wp_shopping_cart();
    }

    6. Click 'Update File' button and problem should be fixed.

    Good Luck!
    Regards,
    mrfixitct

  3. Marc73
    Member
    Posted 2 years ago #

    indeed. thank you very much.
    I highly appreciate your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic