Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Function to check eStore cart status

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Function to check eStore cart status

  • This topic has 8 replies, 3 voices, and was last updated 8 years, 2 months ago by grhapa.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • April 14, 2017 at 2:23 am #14186
    grhapa
    Member

    Hello,

    I am looking for correct the function to check whether cart is empty or not. I am planning to use that function for menu visibility check.

    I tried eStore_cart_when_not_empty()function but it’s not working.

    For example, I used wp_emember_is_member_logged_in() function for visibility check and it works fine.

    April 14, 2017 at 1:05 pm #75491
    wzp
    Moderator

    That PHP function will DISPLAY or RENDER the cart, if it is not empty.

    It is a “void” type function that does not return a (TRUE | FALSE) value, related to the “emptiness” of the cart.

    April 14, 2017 at 11:31 pm #75492
    admin
    Keymaster

    You can use the following function to see if the cart is empty or nor:

    if (digi_cart_not_empty()) {
    //Cart has item(s) in it. Do something.
    }

    April 15, 2017 at 12:26 pm #75493
    grhapa
    Member

    Thank you.

    Is there any link where I can find such functions/api?

    April 15, 2017 at 12:41 pm #75494
    grhapa
    Member

    Continuing the same thread.

    I noticed digi_cart_not_empty() doesn’t work across multiple machine.

    Is the cart update serialize into DB? How do I access that to enable cart visibility across machine ?

    April 15, 2017 at 1:15 pm #75495
    wzp
    Moderator

    Is there any link where I can find such functions/api?

    That is an internal (undocumented) function call.

    I noticed digi_cart_not_empty() doesn’t work across multiple machine.

    The scope of eStore functionality is limited to the WordPress instance on which it is installed.

    Is the cart update serialize into DB?

    The cart is maintained via the use of PHP sessions:

    [http://php.net/manual/en/features.sessions.php]

    However, if you use the “Save and Retrieve Cart Feature,” the cart will be saved in the database:

    https://www.tipsandtricks-hq.com/ecommerce/wp-estore-save-and-retrieve-cart-feature-2464

    April 15, 2017 at 1:57 pm #75496
    grhapa
    Member

    Thanks

    It doesn’t seems to work for me. I am using button url as below

    [http://www.mydomain.com/?wp_eStore_save_retrieve_cart=1]

    While following url works for me but per WP session (not across machine)

    [http://www.mydomain.com/?wp_eStore_add_to_cart=1]

    April 15, 2017 at 3:41 pm #75497
    wzp
    Moderator

    It doesn’t seems to work for me. I am using button url as below

    [http://www.mydomain.com/?wp_eStore_save_retrieve_cart=1]

    It will only work as a shortcode, on the same WordPress instance that it was installed on. You cannot invoke it, from another site, using a URL query.

    April 15, 2017 at 6:21 pm #75498
    grhapa
    Member

    Thanks for quick update.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ