- This topic has 8 replies, 3 voices, and was last updated 7 years, 11 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Function to check eStore cart status
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.
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.
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.
}
Thank you.
Is there any link where I can find such functions/api?
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 ?
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
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]
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.
Thanks for quick update.