Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum » WP eStore Tweaks

Showing Dynamic "View Cart" Button

(4 posts) (3 voices)
  • Started 2 years ago by bhadaway
  • Latest reply from askjayson
  • Possible Solutions (Related Topics):
    1. boxes showing around buttons in cart
    2. Show only the "Quantity: [ ]" field after my 'view cart' button
    3. "Add to cart" button...but with a link to "View Cart" if desired?
    4. Remove Add to Cart button in [wp_eStore_all_products_stylish:end] view
    5. View Cart button not working

Tags:

  • empty cart
  • price isn't showing up
  1. bhadaway
    Member

    Consider I don't want to show the shopping cart on every page and I have it appear only when someone adds to it, but if they for example leave the page and continue browsing or shopping I'd like them to be able to click "View Cart" and go directly back to it without trying to remember what page it was on, now I simply have a view cart link in the sidebar that always shows even if the cart is invisible/empty:

    <div style="text-align:right">
    <a href="http://www.website.com/main/gallery/#cart">VIEW CART</a>
    </div>

    Is there a way to show it only when something is in the cart and hide it otherwise?

    Posted 2 years ago #
  2. amin007
    Key Master

    You will have to use PHP... try something like this

    if (digi_cart_not_empty())
    {
    // code to show the "view cart"
    }

    Posted 2 years ago #
  3. askjayson
    Member

    How about is there a template tag or function I can write a conditional statement that allows me to display the product list or category list on my cart page, when the cart is empty vs. the blank page or default link to visit the shop?

    Thanks so much.

    Posted 2 years ago #
  4. askjayson
    Member

    Thanks Amin, I have this code in place and it works like a charm if anyone is interested in displaying the shortcode on their "empty cart" page.

    if (!digi_cart_not_empty()) {
    <?php echo do_shortcode('[wp_eStore_list_categories_fancy]'); ?>
    }

    Also I thought it would be a great benefit to have a URI redirect field for when shoppers do empty their cart.

    All the best.

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin