Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Show a message when there is no product
Tagged: cart value, get products in the cart, no product message, number of products in the cart, shortcodes
- This topic has 6 replies, 2 voices, and was last updated 14 years, 4 months ago by amin007.
-
AuthorPosts
-
July 22, 2010 at 3:54 pm #1537mudit.agarwalMember
Hi
How to show a message like “No products in the category, will be adding here soon”, when there are no products in a category.
2– How to get number of products in the cart? i want to show a hyperlink to the cart whose title will be the number of products in the cart OR the total price of the products in the cart.
July 23, 2010 at 9:10 am #22664amin007ParticipantWhich shortcode are you using? The idea sounds good so I might just add it to the plugin myself
How to get number of products in the cart? – You can use the following function to get the total number of cart items:
<?php echo eStore_get_total_cart_item_qty(); ?>
July 23, 2010 at 12:43 pm #22665mudit.agarwalMemberCurrently i am using “echo show_products_from_category(1);”. From where do i get these new short codes. Someone has provided me the this link — http://www.tipsandtricks-hq.com/ecommerce/wp-estore-shortcodes-and-functions-reference-460
is there any other link from where i can get these all short codes??
Plus, is there also a way to get the total price of item in the cart?
July 24, 2010 at 1:52 am #22666amin007ParticipantI have added the following message to be displayed when the category contains no products.
“No products in this category yet!”
This is the only page that has list of all the available shortcodes:
Do you want the subtotal or total (including shipping and tax)? The subtotal value is stored in the session that you can access like the following:
<?php echo $_SESSION; ?>
July 24, 2010 at 12:20 pm #22667mudit.agarwalMemberHi,
How do i install this “No product in the category” update?
I am getting a php warning while showing the number of items in the cart:
Warning: Invalid argument supplied for foreach() in /home/jt9yp9tp/public_html/wp-content/plugins/wp-cart-for-digital-products/eStore_cart.php on line 25
This shortcode works fine after i add a product to my cart. It displays number of product without any warning. Also works correct even if i clear my cart.
Issue in showing sub total:
This part is working pretty glitchy. I need to refresh the page explicitly to show the price on the page.(this refresh is different than the website do on adding a product to the cart). When i clear my cart, it still displays the last price of the cart, doesn’t change the value even after a explicit refresh. I need to close the browser window and than after reopening it shows a empty price value in stead of a “0”.
July 24, 2010 at 12:23 pm #22668mudit.agarwalMemberPlease also add this css change to the update. I need to change this manually after every update.
Link to discussion page:
https://support.tipsandtricks-hq.com/forums/topic/images-shifting-up-in-internet-explorer-7
Please see my response at the bottom of the page.
July 25, 2010 at 3:00 am #22669amin007ParticipantFixed it in the plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.