Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › short code to show product price
Tagged: price including tax
- This topic has 22 replies, 6 voices, and was last updated 11 years, 10 months ago by admin.
-
AuthorPosts
-
January 23, 2012 at 1:08 am #5347hghorbanianMember
Hi,
Is there any short code I can use for showing the price only. I don’t intend to use ‘fancy’ or extra short codes. I just need on my post to show the price dynamically then use the short code ‘add to cart’ below it. I need it dynamically so when I cange the price in Product Management, it reflects/updated on all my posts and pages.
Thanks
Hessam
January 23, 2012 at 5:49 am #41049adminKeymasterUpdate: This functionality is now present in the plugin. The following post has detials now how to dynamically retrieve product details and show it:
We don’t have one but I am in the process of adding a shortcode that can allow you to dynamically retrieve any details of a product. You should be able to use that to retrieve the price of a product. I should be finished with that work in 2 or 3 days time.
January 23, 2012 at 9:25 pm #41050hghorbanianMemberLooking forward to it.
Thanks
January 24, 2012 at 8:43 am #41051adminKeymasterCompleted the addition of this shortcode. You can use the following shortcode to dynamically show a particular detail of a product:
[wp_eStore_product_details id=1 info="name"]
The above example will display the name of the product whose ID is 1. You can change the value of the “”info”” parameter to customize what details of the product you show. For example, the following shortcode will show the price:
[wp_eStore_product_details id=1 info="price"]
January 24, 2012 at 5:32 pm #41052justaguydesignMemberIs there a way to show this level of product detail using PHP template tags?
January 25, 2012 at 4:16 am #41053adminKeymasterYeah, Here is an example:
<?php echo eStore_show_product_details(1,"name"); ?>
The above will dynamically display a particular details of the specified product. This example will display the name of the product whose ID is 1. You can change the value of the 2nd parameter to customize what details of the product you show.
January 25, 2012 at 7:02 pm #41054hghorbanianMemberThanks Admin. It is very helpful and already started using it. Is there any other available values for “info” parameter other than Name and Price?
January 26, 2012 at 6:39 am #41055adminKeymasterYeah, you can retrieve any details of the product. For example:
description – The description of the product
available_copies – The number of copies available for this product
sales_count – The number of copies sold
thumbnail_url – The URL of the thumbnail image
January 31, 2012 at 2:19 am #41056justaguydesignMemberThank you very much — that will be very helpful for my current project. I appreciate your response and detail.
February 27, 2012 at 4:50 pm #41057dangermooseSpectatorThis looks great and just what I need. Weirdly, however when I place the shortcode in the editor (both html & visual) it just displays the shortcode in the page.
Sorry to hijack your thread justaguy!
February 27, 2012 at 11:11 pm #41058adminKeymasterYou will need to update the plugin to a slightly newer build as this was added recently.
February 28, 2012 at 5:58 pm #41059dangermooseSpectatorGreat thanks, the plugin is being updated so often its hard to keep up! Thanks!
February 29, 2012 at 10:01 pm #41060Chris LambrightMemberI’m very interested in the ability to show certain product details using new shortcodes. I purchased the plugin about 4 days ago, so would the shortcodes you’re talking about already have been included, or do I need to update already?
Also, how about more options to display specific product details in the shopping cart itself? The fancy cart 1 is great, but I haven’t seen a way to show the thumbnail inside the fancy cart. There’s shortcode to show the cart with the thumbnail, but it doesn’t display the ‘fancy’ look and feel. Any way to really tweak the shopping cart display to perhaps make it more unique…i.e. fancier or tailored to the site?
Thanks,
Chris
March 1, 2012 at 5:55 am #41061adminKeymasterYou won’t need to update if your purchased 4 days ago. The shortcodes mentioned on this thread will be available to you.
The shopping cart display is a lot more complex than the product display option so you will need to settle for an option that looks good enough for you. Feel free to look around for other cart solutions but I am pretty sure you won’t get one that will exactly match with what you are looking for (its one of those things that needs code or CSS tweaking to some level).
March 1, 2012 at 11:23 am #41062dangermooseSpectatorI know I can use the following line to display price for a specific product.
<?php echo eStore_show_product_details(1,"price"); ?>
Is there an easy method of making this more dynamic so it will display the price for whatever product ID is currently being displayed?
So something like this?
<?php echo eStore_show_product_details('get_product_ID',"price"); ?>
-
AuthorPosts
- You must be logged in to reply to this topic.